pystapi-schema-generator, take 2 - #130
Open
jkeifer wants to merge 1 commit into
Open
Conversation
The conformance gate needs an OpenAPI document to validate against, and until
now there was nothing that produced one except the test application, whose
document describes the fixtures rather than the API generically.
`pystapi-schema-generator` builds a reference application out of the routers
and exports its document. It lives outside `tests/`, so what it publishes is
the API's own shape rather than a particular test's, and it templatizes the
product paths to `{productId}` so a multi-product deployment is described
once rather than per fixture.
Kept as the last commit on the branch and touching nothing before it: the
package, the workspace member and source entries, its place in the mypy and
test loops, and the lockfile. It can be lifted off onto its own branch
without disturbing the stapi-pydantic and stapi-fastapi releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I'm changing
pystapi-schema-generator, to generate a somewhat-normative openapi.yml spec doc via a specially-formulatedstapi-fastapiimplementation.How I did it
This was rather vibed via Claude Opus 5. I have not reviewed thoroughly, but the result seems "okay". Due to challenges with fastapi idiosyncracies and the reality of pydantic modeling, the result is not really good enough to be used in the
stapi-specrepo. I honestly don't know if we would want to keep this, but I figured it I should push it because I had it working.Checklist
./scripts/run-tests.shuv run pre-commit run --all-files