breadboard icon indicating copy to clipboard operation
breadboard copied to clipboard

[FR] constrain `type` property of schema type

Open Mearman opened this issue 1 year ago • 5 comments

Mearman avatar Mar 21 '24 13:03 Mearman

Tell me more.

dglazkov avatar Mar 21 '24 20:03 dglazkov

so for example updating the schema type to be:

type Schema = {
    type: "string" | "boolean" | "object"
}

Mearman avatar Mar 21 '24 20:03 Mearman

"number" | "array" -- yup, got it.

dglazkov avatar Mar 21 '24 20:03 dglazkov

"number" | "array" -- yup, got it.

We'll ideally integer too as it's being used for input validation

Mearman avatar Mar 22 '24 06:03 Mearman

@aomarks This feels potentially related to the new-new-syntax discussion we were having yesterday on the use of anyOf in schema types.

paullewis avatar Mar 26 '24 11:03 paullewis