Skip to content

feat: Add PHPDoc to SDK - #456

Merged
razor-x merged 2 commits into
mainfrom
codex/add-docstring-support-to-codegen
Jul 29, 2026
Merged

feat: Add PHPDoc to SDK#456
razor-x merged 2 commits into
mainfrom
codex/add-docstring-support-to-codegen

Conversation

@razor-x

@razor-x razor-x commented Jul 28, 2026

Copy link
Copy Markdown
Member

Motivation

  • Emit rich PHPDoc for generated resource classes, properties and client methods to improve IDE hints and API discoverability.
  • Propagate resource/method/property descriptions and deprecation metadata from the blueprint into the PHP SDK generation pipeline.
  • Make generated client methods self-documenting so users can see parameter/return information and deprecation notices directly in the code.

Description

  • Added Handlebars helpers to produce properly-formatted PHPDoc blocks (handlebars-helpers.ts) and a methodPhpDoc helper used by route-method.hbs to emit method docs for client methods.
  • Extended codegen models to carry description and deprecation metadata (class-model.ts, resource-model.ts, routes.ts) and adjusted layout context builders (layouts/resource.ts, layouts/seam-client.ts) to include those fields for templates.
  • Updated templates/layouts (codegen/layouts/partials/route-method.hbs, codegen/layouts/resource.hbs) and regenerated outputs to include class-level and property-level PHPDoc comments and annotated client methods, resulting in many resource files and SeamClient.php being enriched with docblocks.

Testing

  • Built the TypeScript generator (tsc / project build) to ensure the changed codegen compiles successfully; build succeeded.
  • Ran the test suite for the codegen (project tests) after the changes; tests passed.
  • Generated the PHP SDK and ran a PHP syntax check (php -l) over the produced files to validate emitted code; no syntax errors found.

Codex Task

@razor-x razor-x changed the title Generate PHPDoc for generated PHP resources and client methods; propagate descriptions and deprecations through codegen feat: Add PHPDoc to SDK Jul 29, 2026
@razor-x
razor-x merged commit 1a10f96 into main Jul 29, 2026
5 checks passed
@razor-x
razor-x deleted the codex/add-docstring-support-to-codegen branch July 29, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant