fix: harden authoring schema and contract projections
This commit is contained in:
@@ -531,7 +531,9 @@ export const authoredRpcSchemas = {
|
||||
payload: Schema.Struct({
|
||||
workspace_id: Schema.String.pipe(Schema.minLength(1)),
|
||||
revision: PositiveIntegerSchema,
|
||||
selected_step_id: Schema.optional(Schema.NullOr(Schema.String)),
|
||||
selected_step_id: Schema.optional(
|
||||
Schema.NullOr(Schema.String.pipe(Schema.minLength(1))),
|
||||
),
|
||||
}),
|
||||
success: Schema.Union(AuthoringContractInventorySchema, DraftWorkspaceSchema),
|
||||
},
|
||||
|
||||
@@ -548,7 +548,11 @@ const parityCases: ReadonlyArray<ParityCase> = [
|
||||
revision: 7,
|
||||
selected_step_id: "render",
|
||||
},
|
||||
invalidPayload: { workspace_id: "console.demo", revision: 0 },
|
||||
invalidPayload: {
|
||||
workspace_id: "console.demo",
|
||||
revision: 7,
|
||||
selected_step_id: "",
|
||||
},
|
||||
validSuccess: authoringContractInventory,
|
||||
invalidSuccess: {
|
||||
...authoringContractInventory,
|
||||
|
||||
Reference in New Issue
Block a user