Skip to content

schema: IntegerKind: multiple_of: change type to unsigned#97

Open
spikespaz wants to merge 1 commit intoglademiller:masterfrom
spikespaz-contrib:u/jacob/integer-type-multipleof-gt-0
Open

schema: IntegerKind: multiple_of: change type to unsigned#97
spikespaz wants to merge 1 commit intoglademiller:masterfrom
spikespaz-contrib:u/jacob/integer-type-multipleof-gt-0

Conversation

@spikespaz
Copy link

@spikespaz spikespaz commented Oct 22, 2025

Per the JSON Schema Specification, multipleOf must be strictly greater than 0, and <= 0 is an invalid value.

Reference:
https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-5.1

OAS 3.0.4 makes no adjustment to this keyword.

Reference:
https://spec.openapis.org/oas/v3.0.4.html#x4-7-24-1-json-schema-keywords

Note that changing the type to Option<u64> is insufficient to guarantee a parsing error upon an invalid specification, using NonZeroU64 will uphold this completely. If you prefer that change instead, I'm happy to adjust this PR.

Per the JSON Schema Specification, `multipleOf` must be strictly greater
than 0, and <= 0 is an invalid value.

Reference:
<https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-5.1>

OAS 3.0.4 makes no adjustment to this keyword.

Reference:
<https://spec.openapis.org/oas/v3.0.4.html#x4-7-24-1-json-schema-keywords>
@spikespaz spikespaz force-pushed the u/jacob/integer-type-multipleof-gt-0 branch from 2116ca4 to 1070ca4 Compare October 22, 2025 07:14
spikespaz added a commit to spikespaz/progeny that referenced this pull request Oct 22, 2025
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

Comments