LiteralsToLaunchFormJson
LiteralsToLaunchFormJson converts a list of NamedLiterals accompanied by a VariableMap to RSJF-compliant JSON schema format.
def LiteralsToLaunchFormJson(
ctx: context.Context,
literals: []*task.NamedLiteral,
variableMap: *core.VariableMap
) - > *structpb.Struct
Converts a list of NamedLiterals accompanied by a VariableMap to RSJF-compliant JSON schema format. This function is used to generate a launch form schema based on the provided literals and their corresponding variable definitions.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for logging and cancellation. |
| literals | []*task.NamedLiteral | A slice of NamedLiteral objects, each representing a named input field for the launch form. |
| variableMap | *core.VariableMap | A map containing variable definitions, used to retrieve type information and constraints for each NamedLiteral. |
Returns
| Type | Description |
|---|---|
*structpb.Struct | A structpb.Struct representing the RSJF-compliant JSON schema for the launch form, or an error if the conversion fails. |