This change implements dynamic option schemas. Option schemas are a new type which allow the blueprint wizard to load sections of the wizard from synthesis. This approach allows a blueprint itself, to control what options are shown in the wizard.
To accomplish this, we introduce several new types:
OptionsSchema<T>: Used to declare and register a new options schema. For now, schemas can be defined using the existing DynamicKVInput type. For example:
OptionsSchemaDefinition<Identifier extends string, SchemaType extends OptionsSchemaType, ReturnType extends any = any> = ReturnType?: Used to declare that a section of the wizard should be loaded dynamically. The Identifier must match the schema identifier declared when instantiation an OptionsSchema (i.e. my-options from the example above). For example:
Based on customer demand, we plan on releasing support for additional schemas, such as react-jsonschema. For schema support requests, please provide feedback through issues.
This change also includes an update to the AST parser to support inline array types that do not have a formal type. This is required to support the example OptionsSchemaDefinition above.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue
N/A
Description
This change implements dynamic
option schemas
. Option schemas are a new type which allow the blueprint wizard to load sections of the wizard from synthesis. This approach allows a blueprint itself, to control what options are shown in the wizard.To accomplish this, we introduce several new types:
OptionsSchema<T>
: Used to declare and register a new options schema. For now, schemas can be defined using the existingDynamicKVInput
type. For example:OptionsSchemaDefinition<Identifier extends string, SchemaType extends OptionsSchemaType, ReturnType extends any = any> = ReturnType?
: Used to declare that a section of the wizard should be loaded dynamically. TheIdentifier
must match the schema identifier declared when instantiation anOptionsSchema
(i.e.my-options
from the example above). For example:Testing
Local testing using a consuming blueprint.
Additional context
Based on customer demand, we plan on releasing support for additional schemas, such as react-jsonschema. For schema support requests, please provide feedback through issues.
This change also includes an update to the AST parser to support inline array types that do not have a formal type. This is required to support the example
OptionsSchemaDefinition
above.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.