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

OpenAPI Spec, try 2 #2803

Merged
merged 7 commits into from
Apr 20, 2024
Merged

OpenAPI Spec, try 2 #2803

merged 7 commits into from
Apr 20, 2024

Conversation

nichwall
Copy link
Contributor

@nichwall nichwall commented Apr 1, 2024

This is another attempt to do the OpenAPI spec better than initially done in #2671. That PR focused on the Collections endpoints, but this PR focuses on a stripped down version of the Author endpoints to make reviewing easier (the missing schemas will be added back in future PRs).

I changed from OpenAPI 3.1 to OpenAPI 3.0 due to better tool support as of March 2024. I still prefer 3.1, but migrating will be easier than writing it all from scratch twice.

I opted to create a new directory named docs/ for the API spec files which matches the source code structure. While swagger-jsdoc did work well, it makes editing the schemas more difficult because VSCode cannot assist with any formatting in the block comments. Separating the documentation and code into their own files but keeping it in the same repository should still help keep the API docs up to date as unit/integration testing is added.

Initial research shows other projects tend to keep their OpenAPI spec in the same repository as the source code.

I am using the vacuum tool for bundling and linting the spec. Running the tool is discussed in docs/README.md.

@advplyr
Copy link
Owner

advplyr commented Apr 20, 2024

Great start, thanks!

@advplyr advplyr merged commit 9102a00 into advplyr:master Apr 20, 2024
3 checks passed
@nichwall nichwall deleted the vacuum_bundling branch May 6, 2024 01:59
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

Successfully merging this pull request may close these issues.

2 participants