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

support YAML format for the specification in OpenAPI framework #51

Closed
stevehu opened this issue Aug 16, 2018 · 0 comments
Closed

support YAML format for the specification in OpenAPI framework #51

stevehu opened this issue Aug 16, 2018 · 0 comments

Comments

@stevehu
Copy link
Contributor

stevehu commented Aug 16, 2018

When we adding the OpenAPI framework late last year, the design was influenced by the Swagger framework which can only support JSON format for the specification as there are limitations in the swagger.io libraries. In the OpenAPI framework, we had implemented our own openapi-parser as there was no existing parser at the time. The library does support both JSON and YAML for the specification but the handler class set the expectation of JSON format.

With some requests from the community and the multiple chain support introduced. It is time to support both YAML and JSON. The /health and /server/info won't be injected to the specification anymore in the future and the user can just copy the specification to the config folder once the spec is updated and chances are most users will use YAML format instead.

After the update, the OpenAPI framework will look up the specification file in the following sequence.

  • openapi.yml
  • openapi.yaml
  • openapi.json

If openapi.yml exists, it won't look up others anymore. If openapi.yaml exists, it won't look up the .json anymore.

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

1 participant