Skip to content

Fix OpenAPI schema numeric bound parsing#54

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-schema-parsing-error
Draft

Fix OpenAPI schema numeric bound parsing#54
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-schema-parsing-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

OpenAPI schema bounds such as maximum and minimum may be encoded as JSON integers, floats, or numeric strings. The v3.0 parser assumed .float, which failed on valid integer-valued specs.

  • Schema parsing

    • Added optionalFloat handling for .integer, .float, and .number_string.
    • Applied it to multipleOf, maximum, and minimum in v3.0 and v3.2 schema parsers.
  • Regression coverage

    • Added focused tests for integer and numeric-string schema bounds.
.maximum = optionalFloat(obj.get("maximum")),
.minimum = optionalFloat(obj.get("minimum")),

Copilot AI changed the title [WIP] Fix schema parsing error for integer and float union Fix OpenAPI schema numeric bound parsing May 28, 2026
Copilot AI requested a review from christianhelle May 28, 2026 11:35
@christianhelle christianhelle added the enhancement New feature or request label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema parsing assume float when integer is active in JSON object union

2 participants