feat(scaffolder): promote formDecorators out of experimental (#34180)
* feat(scaffolder): promote formDecorators out of experimental Signed-off-by: benjdlambert <ben@blam.sh> * fix(scaffolder): parse form decorator input through the configured zod schema Signed-off-by: benjdlambert <ben@blam.sh> * refactor(scaffolder-backend): emit single formDecorators field on the parameter-schema response Signed-off-by: benjdlambert <ben@blam.sh> * feat(scaffolder): promote form decorator blueprints to public API Signed-off-by: benjdlambert <ben@blam.sh> --------- Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -415,6 +415,10 @@ export interface TemplateEntityV1beta3 extends Entity {
|
||||
type: string;
|
||||
presentation?: TemplatePresentationV1beta3;
|
||||
EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3;
|
||||
formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
}[];
|
||||
EXPERIMENTAL_formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
@@ -481,6 +485,10 @@ export type TemplateParameterSchema = {
|
||||
description?: string;
|
||||
schema: JsonObject;
|
||||
}>;
|
||||
formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
}[];
|
||||
EXPERIMENTAL_formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"EXPERIMENTAL_formDecorators": {
|
||||
"formDecorators": {
|
||||
"type": "array",
|
||||
"description": "A list of decorators and their inputs that the form should trigger before submitting the job",
|
||||
"items": {
|
||||
@@ -198,11 +198,29 @@
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The form hook ID"
|
||||
"description": "The form decorator ID"
|
||||
},
|
||||
"input": {
|
||||
"type": "object",
|
||||
"description": "A object describing the inputs to the form hook."
|
||||
"description": "An object describing the inputs to the form decorator."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"EXPERIMENTAL_formDecorators": {
|
||||
"type": "array",
|
||||
"deprecated": true,
|
||||
"description": "Deprecated, use formDecorators instead.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The form decorator ID"
|
||||
},
|
||||
"input": {
|
||||
"type": "object",
|
||||
"description": "An object describing the inputs to the form decorator."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,14 @@ export interface TemplateEntityV1beta3 extends Entity {
|
||||
EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3;
|
||||
|
||||
/**
|
||||
* Form hooks to be run
|
||||
* Form decorators to be run before submission.
|
||||
*/
|
||||
formDecorators?: { id: string; input?: JsonObject }[];
|
||||
|
||||
/**
|
||||
* Form decorators to be run before submission.
|
||||
*
|
||||
* @deprecated Use `spec.formDecorators` instead.
|
||||
*/
|
||||
EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];
|
||||
|
||||
@@ -164,6 +171,10 @@ export type TemplateParameterSchema = {
|
||||
description?: string;
|
||||
schema: JsonObject;
|
||||
}>;
|
||||
formDecorators?: { id: string; input?: JsonObject }[];
|
||||
/**
|
||||
* @deprecated Use {@link TemplateParameterSchema.formDecorators} instead.
|
||||
*/
|
||||
EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user