ci: add spectral lint workflow for openapi.yaml#2547
Draft
mandarini wants to merge 2 commits into
Draft
Conversation
| exit 1 | ||
|
|
||
| - name: Install Schemathesis | ||
| run: pip install --upgrade 'schemathesis>=3.36,<4' PyJWT |
There was a problem hiding this comment.
@mandarini Would you consider install the latest version of Schemathesis? Branch 3.x is unsupported and haven't had any updates for ~1.5 years already (and I don't have any plans for it)
| continue-on-error: true | ||
| run: | | ||
| schemathesis run openapi.yaml \ | ||
| --url=http://localhost:9999 \ |
There was a problem hiding this comment.
--url is 4.x only, 3.x had --base-url
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 this is
openapi.yaml:What maintainers need to do
continue-on-error: trueso initial findings don't block PRs.continue-on-error: falseto make it blocking.What it's used for
openapi.yamlis already consumed byoapi-codegento generate the Go client. Other-language SDKs need the same accuracy guarantee for their own code generation and type checks; today the spec can drift from server behavior with nothing to catch it.What was added and why
.spectral.yaml+.github/workflows/openapi-lint.yml— Spectral with a soft-start ruleset (errors on structural issues, warns on style). Cheap baseline..github/workflows/schemathesis.yml— mirrorstest.yml's postgres +make migrate_devpattern; builds viamake auth; starts the binary againsthack/test.env; mints an anon JWT inline (signed withtestsecret); runsschemathesis runagainsthttp://localhost:9999. Excludes endpoint patterns that send email/SMS, redirect to external OAuth providers, or perform destructive admin ops. Uploads JUnit +auth.logas artifacts.