[x] Enforce JSON parse checks on the variable Value property.
[x] Add a Type property to Varibles.
[x] Localize variables to specific scripts by adding a ScriptUUID property.
[x] Remove the Password Property.
Change the Variable property to Value
There are no existing implementations of RQL Scripts, so this change shouldn't be an issue.
Enforce JSON parse checks on all variable values
Please add a JSON parse check to the Variable create/edit api. Reject the configuration if it doesn't parse as JSON. We should consider whether there is a need for a type change from any to something more restrictive to JSON format.
Add a Type property to Varibles.
Variable Types will later be defined more specifically. This property will allow the UI to use the correct editor for the type of variable.
Localize variables to specific scripts by adding a ScriptUUID property.
RQL Scripts will need to have local variables. Adding a ScriptUUID property will allow us to return only the variables that are specific to the RQL Script.
Add a Required property
In future RQL Scripts will have variables that are required in order for the script to operate properly. This boolean flag will indicate to the UI whether it needs to be completed in order to function.
With the above improvements the updated RQLVariables struct should have this structure:
type RQLVariables struct {
UUID string `json:"uuid"`
ScriptUUID string `json:"script_uuid"`
Name string `json:"name"`
Type string `json:"type"`
Value any `json:"value"`
Required bool `json:"required"`
}
Please make the following improvements to RQL Script Variables:
Variable
property toValue
.Value
property.Type
property to Varibles.ScriptUUID
property.Password
Property.Change the
Variable
property toValue
There are no existing implementations of RQL Scripts, so this change shouldn't be an issue.Enforce JSON parse checks on all variable values Please add a JSON parse check to the Variable create/edit api. Reject the configuration if it doesn't parse as JSON. We should consider whether there is a need for a type change from
any
to something more restrictive to JSON format.Add a
Type
property to Varibles. Variable Types will later be defined more specifically. This property will allow the UI to use the correct editor for the type of variable.Localize variables to specific scripts by adding a
ScriptUUID
property. RQL Scripts will need to have local variables. Adding aScriptUUID
property will allow us to return only the variables that are specific to the RQL Script.Add a
Required
property In future RQL Scripts will have variables that are required in order for the script to operate properly. This boolean flag will indicate to the UI whether it needs to be completed in order to function.With the above improvements the updated
RQLVariables
struct should have this structure: