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

Consider using swagger-php to automatically generated OpenAPI docs #1640

Open
1 task
acelaya opened this issue Dec 17, 2022 · 2 comments
Open
1 task

Consider using swagger-php to automatically generated OpenAPI docs #1640

acelaya opened this issue Dec 17, 2022 · 2 comments

Comments

@acelaya
Copy link
Member

acelaya commented Dec 17, 2022

https://zircote.github.io/swagger-php/guide/annotations.html

Back in the day, I made a conscious decision of manually writing the swagger/open API spec.

The reason is that I always felt tooling that generates them automatically, frequently requires annotating your source code with API docs info that pollutes it and mixes/spreads docs inside your source code.

However, very often I find myself almost forgetting to document changes due to the docs being separated from the source code, or even worried that I might make a mistake and document something incorrectly and not matching the actual behavior.

Because of this I want to do a POC, using swagger-php to document one endpoint and see how it feels, what are the pros and cons of both options and try to decide if manual documentation is still the way to go or not.

  • Document the decision on an architectural decision record.
@webysther
Copy link

This will be great, more easy to import as collection on postman because the open api 3.

@acelaya
Copy link
Member Author

acelaya commented Jul 2, 2023

This will be great, more easy to import as collection on postman because the open api 3.

The project already provides OAS specs. This ticket is just to investigate a different approach to generate them.

You can find spec definitions for every version here https://github.com/shlinkio/shlink-open-api-specs

These are all fed to https://api-spec.shlink.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants