Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to process schema for OpenAPI v3.0 #10

Open
StochasticTinkr opened this issue May 29, 2023 · 3 comments
Open

Fails to process schema for OpenAPI v3.0 #10

StochasticTinkr opened this issue May 29, 2023 · 3 comments

Comments

@StochasticTinkr
Copy link

I'm trying to process this file: https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.0/schema.json

It's failing on:

        "multipleOf": {
          "type": "number",
          "minimum": 0,
          "exclusiveMinimum": true
        }

with the message:
> Must be number (was true) - /definitions/Schema/properties/multipleOf/exclusiveMinimum

It looks like the code is expecting exclusiveMinimum and exclusiveMaximum to be numeric values, but they're supposed to be booleans.

@StochasticTinkr
Copy link
Author

It looks like this doesn't support http://json-schema.org/draft-04/schema, which is where they are defined as booleans instead of numbers. That means this isn't so much a bug as a feature request to support draft-04 schemas as well.

@pwall567
Copy link
Owner

Hi – sorry about the delay in responding. Yes, exclusiveMinimum was originally a boolean property, indicating that the minimum was to be interpreted as an exclusive bound. This changed in draft-06, and exclusiveMinimum now takes a number, the exclusive minimum value. It is the later form that this project uses.

I have had a new version of the project in the works for some time now; this version will accept multiple schema specification drafts based on the $schema element in the schema document. Unfortunately, I can't promise any delivery date on the new version.

Regards,
Peter Wall

@StochasticTinkr
Copy link
Author

Thanks for the response. Only reason this even became an issue I cared about was because of the SpaceTraders io game, which exposed the game only through OpenAPI. Honestly I got bored with it pretty quickly, so this isn't really an important feature for me any more.

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

No branches or pull requests

2 participants