add openapi helper script - #187
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a controller-side helper script for generating an OpenAPI 3.2.0 specification from CloudStack listApis, along with accompanying documentation and packaging/ignore updates.
Changes:
- Add
scripts/cs_openapi.pyto generate an OpenAPI document (optionally probing response payload keys). - Add
scripts/README.mddescribing mapping rules and how to view output in Swagger UI. - Update top-level docs and project metadata (
README.md,CLAUDE.md,galaxy.yml,.gitignore) to reference the new tooling and adjust build/ignore behavior.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/README.md | Documents how to use/browse the generated OpenAPI spec and mapping rules. |
| scripts/cs_openapi.py | New generator script that translates listApis to OpenAPI 3.2.0 with schema deduplication and optional probing. |
| README.md | Adds a short “OpenAPI specification” section referencing the helper script. |
| galaxy.yml | Excludes scripts/ (and a few other paths) from the built collection via build_ignore. |
| CLAUDE.md | Adds contributor guidance for generating the OpenAPI document and clarifies scripts directory expectations. |
| .gitignore | Expands ignore rules for common Python/IDE artifacts and build/test outputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+736
to
+738
| source = parser.add_mutually_exclusive_group() | ||
| source.add_argument("--from-api", action="store_true", help="query a live endpoint (default)") | ||
| source.add_argument("--from-json", metavar="FILE", help="read a saved listApis response instead of querying") |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.