Add framework-service-documentation plugin with OpenAPI spec generation - #1
Merged
Merged
Conversation
OpenAPI documentation plugin: the /documentation.yaml route, how swagger-php scans \app and framework src, and how to annotate controllers/models so they appear in the spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHMzRj65pSTe2yv6f9UAs8
CI failed at composer install because the `repositories` path pointed to a
Windows-only absolute path (c:/inetpub/www/packages/framework), which is a
fatal error on the Linux runner.
- composer.json: replace that path repo with an optional sibling glob
("../framework*", symlink). When a framework checkout exists as a sibling
it is used for local development; otherwise (CI and normal installs) the
glob matches nothing and gcgov/framework:dev-main resolves from Packagist.
- ci.yml: bump the PHP matrix to ['8.3', '8.4'] because framework dev-main
requires php >=8.3 (the 8.1/8.2 legs could never install it).
- ci.yml: enable required PHP extensions (mongodb, sodium, fileinfo, pdo) so the framework
dependency satisfies its platform requirements at install time.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHMzRj65pSTe2yv6f9UAs8
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.
Summary
Introduces a new framework service plugin that generates OpenAPI (Swagger) YAML documentation on demand by scanning application and framework source code for OpenAPI annotations.
Changes
gcgov/framework-service-documentationthat adds a singleGET /documentation.yamlroute@OA\*attributes) and generates a live OpenAPI speccontrollers/,exceptions/,models/, andservices/directories while excludingvendor/CLAUDE.mddocumenting plugin architecture, installation, route registration, generation logic, and annotation patterns for documenting APIsImplementation Details
zircote/swagger-php(^6.1) anddoctrine/annotationsOpenApi\GeneratorwithOpenApi\SourceFinderfor intelligent source scanningdie()after output to bypass normal framework response handling (documented exception)https://claude.ai/code/session_01VHMzRj65pSTe2yv6f9UAs8