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

Unknown format "decimal" is used in schema #56

Closed
MostafaAbdlrazek opened this issue Sep 25, 2019 · 4 comments
Closed

Unknown format "decimal" is used in schema #56

MostafaAbdlrazek opened this issue Sep 25, 2019 · 4 comments
Assignees

Comments

@MostafaAbdlrazek
Copy link

Whenever I try to validate a request against an openapi.yaml file that contains a type: number with format: decimal I receive the following error:

{
    "errors": [
        {
            "message": "unknown format \"decimal\" is used in schema at path \"#/properties/amount\""
        }
    ]
}
@richdouglasevans
Copy link
Contributor

This may be related to #48

decimal isn't in the list of formats defined by the OAS so I guess that's why the OpenAPI validator is erroring. (I think this is a legit bug 'cos it shouldn't.)

However, to support documentation needs, the format property is an open string-valued property, and can have any value. Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification.

@cdimascio
Copy link
Owner

Thanks @richdouglasevans. Will look into providing a sane default.
@MostafaAbdlrazek if possible you can work around this by using one of the defined number types / formats

cdimascio pushed a commit that referenced this issue Oct 8, 2019
@cdimascio cdimascio self-assigned this Oct 8, 2019
cdimascio added a commit that referenced this issue Oct 8, 2019
Errors for unknown format #48 and #56
@cdimascio
Copy link
Owner

unknown formats are supported in v2.4.0.

@gonenduk
Copy link

I think this issue can be closed.

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

4 participants