Skip to content

Add OpenAPI generation command - #30

Merged
rtcoder merged 2 commits into
masterfrom
release/v0.22.0
Jun 17, 2026
Merged

Add OpenAPI generation command#30
rtcoder merged 2 commits into
masterfrom
release/v0.22.0

Conversation

@rtcoder

@rtcoder rtcoder commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Changes

  • Add ./shift openapi to generate an OpenAPI 3.0 JSON document from registered module routes.
  • Support ./shift openapi --output=docs/openapi.json for writing the generated document to a file.
  • Add ./shift openapi --validate and include OpenAPI validation in ./shift qa.
  • Add ./shift openapi --live to start a local Swagger-like documentation server backed by generated openapi.json.
  • Support live server binding options with --host= and --port=, defaulting to http://127.0.0.1:8088.
  • Add OpenAPI documentation attributes: Summary, Description, Tag, Response, Deprecated, Security, and Schema.
  • Generate paths, methods, operation ids, tags, summaries, descriptions, path parameters, query parameters, request bodies, DTO schemas, response statuses, response headers, security metadata, deprecation metadata, formats, enums, nullable fields, and required fields from code.
  • Improve the live viewer with endpoint search, tag filtering, dark mode, operation counts, security display, and JSON download.
  • Add api:docs as an alias for the OpenAPI command.
  • Document the command and attributes in README, docs/index.html, and REFACTORING.md.
  • Add tests for command discovery, route attribute generation, OpenAPI attributes, DTO schemas, output files, module route generation, validation, live page rendering, and live option help.

Verification

  • composer test
  • ./shift lint
  • ./shift qa
  • ./shift openapi
  • ./shift openapi --validate
  • ./shift openapi --output=
  • ./shift openapi --live --port=8099 with HTTP checks for / and /openapi.json
  • ./shift help openapi
  • Documentation anchor check for all in-page navigation links

Release

  • Version label: v0.22.0

@rtcoder rtcoder added the v0.22.0 Release v0.22.0 label Jun 17, 2026
@rtcoder
rtcoder merged commit 29f113e into master Jun 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.22.0 Release v0.22.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant