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

Add OpenApi support (formerly Swagger) #3938

Open
3 tasks
RobThree opened this issue Apr 28, 2024 · 0 comments
Open
3 tasks

Add OpenApi support (formerly Swagger) #3938

RobThree opened this issue Apr 28, 2024 · 0 comments

Comments

@RobThree
Copy link

RobThree commented Apr 28, 2024

It would be really cool if the json api also served a (static) swagger.json file which would make 'discovering' and more importantly implementing the API a lot simpler (automatic client generation on most plaforms and languages). It also serves as (machine readable) documentation. Adding a (also static) swagger-UI would be extra bonuspoints.

Basic steps:

  • Write the swagger.json
  • handle the /json/swagger.json request by serving the static file (I guess here somehwere)
  • (Optional) Also serve the required (static) swagger-ui files

Ofcourse, this would mean that when changes are made to the api this document needs to be kept in sync. But I do really think it would be worth the effort.

This would require some storage, naturally, but the files can be saved pre-gzipped (or brotli or whatever is hot nowadays) and served as-is (with the correct headers).

I could (help with) write the swagger.json file, but I'm not sure on the other two steps. If anyone is interested in helping or teaming up I would love to prepare a PR. But if there's no interest then I won't make all these efforts in the first place. So: is there interest?

@RobThree RobThree changed the title Add swagger Add OpenApi support (formerly Swagger) Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant