Skip to content

Allow booleans for exclusiveMinimum/exclusiveMaximum#66

Open
justenstall wants to merge 2 commits intogoogle:mainfrom
justenstall:exlusive-minmax-boolean
Open

Allow booleans for exclusiveMinimum/exclusiveMaximum#66
justenstall wants to merge 2 commits intogoogle:mainfrom
justenstall:exlusive-minmax-boolean

Conversation

@justenstall
Copy link

@justenstall justenstall commented Feb 20, 2026

  • Add fields ExclusiveMinimumBoolean and ExclusiveMaximumBoolean to Schema
  • Updates Schema.UnmarshalJSON, Schema.MarshalJSON, Schema.basicChecks, lookupSchemaField, and the init() function with new cases based on how Items and ItemsArray are handled
  • Updated state.validate behavior when exclusive{Minimum,Maximum} are booleans

Before JSON Schema draft-06, the exclusiveMinimum/exclusiveMaximum keywords used boolean values that changed the interpretation of the minimum/maximum keyword's value.

Links:

Motivation: I would like to use this library for parsing existing JSON Schemas and OpenAPI descriptions, but the files are written in draft-04, so they fail to parse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant