Add zero-dependency REST demo and CI-friendly exits#1
Draft
device-kunkun wants to merge 2 commits into
Draft
Conversation
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 changed
GET /healthandPOST /echoendpoints--fail-on-failureso CI can receive exit code 1 after failed checks while reports are still writtenWhy
The existing REST example requires Java, MySQL, and local credentials, which makes the first OpenAPI workflow expensive to try. In addition, negative cases could be reported as passing when no HTTP response was received because a connection error was treated like the expected HTTP failure. The CLI also always returned success after completed validation, making report failures hard to enforce in CI.
User and developer impact
New users can run the full OpenAPI parse → generate → execute → validate → JSON/HTML report path with Python's standard library only. Existing commands keep their previous exit behavior unless
--fail-on-failureis supplied. The demo listens on127.0.0.1by default and uses only synthetic data.Validation
pip checksucceededpython -m unittest discover -s tests -v: 8/8 passedpython -m compileall -q src sample_targets tests: passedapi-testkitsmoke test against the local demo: 3/3 passed; JSON and HTML reports createdmvn -f java-springboot-sample/pom.xml -B -ntp verify: passedmvn -f java-springboot-sample/pom.xml -B -ntp dependency:analyze: completed successfully; it retains pre-existing Spring Boot starter aggregation warnings about transitive imports and apparently unused startersgit diff --check: passedScope and risk