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

Init the middleware with the required openapi formats #70

Closed
kobik opened this issue Jun 16, 2019 · 3 comments · Fixed by #96
Closed

Init the middleware with the required openapi formats #70

kobik opened this issue Jun 16, 2019 · 3 comments · Fixed by #96

Comments

@kobik
Copy link
Collaborator

kobik commented Jun 16, 2019

Currently in order to support openapi formats which are part of the standard and are not supported by ajv, we required to pass them explicitly when calling init function. otherwise, we'll get an exception when a definitions file with these formats is passed to the middleware.

My proposal is to init the middleware with these formats by default.

@kibertoad
Copy link
Collaborator

Can you provide a list of these formats?

@aryehb
Copy link

aryehb commented Jul 22, 2019

Formats for type number (source) (some of these are mentioned in the README):

  • float
  • double
  • int32
  • int64

Formats for type string (source):

  • date
  • date-time
  • password
  • byte
  • binary

However, format is an open value, so you can use any formats, even not those defined by the OpenAPI Specification, such as:

  • email
  • uuid
  • uri
  • hostname
  • ipv4
  • ipv6

@kobik
Copy link
Collaborator Author

kobik commented Sep 7, 2019

I've prepared a fix in PayU/api-schema-builder#37 which awaits for review, to finally handle this issue.

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

Successfully merging a pull request may close this issue.

3 participants