-
Notifications
You must be signed in to change notification settings - Fork 3
chore(server): Simplify OpenAPI schema generation #483
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #483 +/- ##
==========================================
+ Coverage 89.11% 89.20% +0.09%
==========================================
Files 28 28
Lines 1396 1390 -6
Branches 1 1
==========================================
- Hits 1244 1240 -4
+ Misses 152 150 -2
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
827fdba to
80e09f4
Compare
tang-mm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is neat! Thanks!
The only change that might have an impact is the removal of the schema endpoint. IWe'd need to confirm that no service relies on it. All other changes look good
pre-commit doesn't really work in mono-repo setups anyways
the openapi schema endpoint should be /openapi.json by default
this script makes it easier to check for diffs or generate the schema using Python and fastapi built-in functions
80e09f4 to
fceaa74
Compare
Description
toxconfigurationpre-commitis not designed for monorepo projectspre-commitwas flimsy and confusing (needed to be run from a specific directory)tox) that contributors would be used to and are expected to run to prevent CI failures (i.e., format and lint the code)Related Issue(s)
Untracked
Testing
Unit tests
Manual testing steps:
cd serveruvx tox run -e schemashould generate the schema file back to what is in the repouvx tox run -e check-schemashould generate a diff of the schema file and mark the test as failedChecklist
Additional Notes
This is inspired by canonical/testflinger#852.