Skip to content

v0.4.0: Plugin-based architecture rewrite#20

Merged
jkbennemann merged 10 commits into
mainfrom
v2-rewrite
Feb 13, 2026
Merged

v0.4.0: Plugin-based architecture rewrite#20
jkbennemann merged 10 commits into
mainfrom
v2-rewrite

Conversation

@jkbennemann

Copy link
Copy Markdown
Owner

Summary

  • Complete rewrite replacing the monolithic v1 service layer with a plugin-based analysis engine
  • Six focused plugin interfaces (RequestBodyExtractor, ResponseExtractor,
    QueryParameterExtractor, SecuritySchemeDetector, OperationTransformer,
    ExceptionSchemaProvider) with priority-ordered chains
  • Schema registry with content-hash fingerprinting and automatic $ref deduplication
  • Three-layer merge engine (attributes > static analysis > runtime capture) with configurable priority
  • 7 built-in plugins (BearerAuth, Pagination, CodeSamples, Spatie Data, Spatie QueryBuilder, JSON:API,
    Laravel Actions)
  • New commands: api:generate, api:lint, api:diff, api:types, api:clear-cache, api:plugins
  • Rich tag documentation: descriptions, x-tagGroups, x-traitTag, externalDocs
  • 361 tests, comprehensive README rewrite

Breaking Changes

Area Change
Commands documentation:generateapi:generate (--file--domain).documentation:capture and documentation:validate removed.
OpenAPI default 3.0.23.1.0
Services layer All Services\* classes removed (replaced by plugin architecture)
Namespace move Services\CapturedResponseRepositoryRepository\CapturedResponseRepository
Config termsOfServiceterms_of_service, generation section restructured
Dependency phpstan/phpdoc-parser: ^2.0 added as required

Migration

  1. Update command calls: documentation:generateapi:generate
  2. Re-publish config: php artisan vendor:publish --tag="api-documentation-config"
  3. Replace any direct Services\* imports with plugin interfaces
  4. Verify generated specs against OpenAPI 3.1.0 (or set open_api_version to 3.0.2)

jakob.bennemann added 10 commits February 13, 2026 09:12
Remove the monolithic v1 architecture (Services/, old commands, old
test suite) to make way for the plugin-based v2 analysis engine.
Plugin-based analysis engine with priority-ordered analyzer chains,
$ref-deduplicating schema registry, AST caching, three-layer merge
engine, and route discovery with filtering.
OpenAPI spec builder with tag/security/schema support, multi-format
output (JSON, YAML, Postman), built-in plugins (BearerAuth, Pagination,
CodeSamples, Spatie Data/QueryBuilder, JSON:API, Laravel Actions),
spec linting, breaking-change diffing, and TypeScript type generation.
Rewrite config with plugin system, code samples, tag documentation
(descriptions, x-tagGroups, trait tags, externalDocs), analysis
priority, and multi-domain support. Add Tag description parameter,
ExcludeFromDocs attribute, and rewire service provider for the
plugin-based architecture.
361 tests covering the full v2 pipeline: route filtering, tag/summary
inference, request/response analysis, error detection, code samples,
pagination, deprecation, route constraints, model binding, policy
introspection, spec linting, breaking-change diffing, TypeScript
generation, Postman export, and tag documentation features.
Complete rewrite covering the plugin-based analysis engine, all PHP
attributes, configuration options, runtime capture, documentation
viewers, output formats, plugin system, built-in plugins, integrations,
CI/CD usage, and new tag documentation features (descriptions,
x-tagGroups, trait tags, externalDocs).
The ext-yaml extension uses different quoting conventions (double quotes,
~ for null) than the built-in converter. Use regex matching so tests
pass regardless of whether the extension is installed.
The ext-yaml extension uses different quoting conventions (double quotes,
~ for null) than the built-in converter. Use regex matching so tests
pass regardless of whether the extension is installed.
@jkbennemann jkbennemann merged commit 20dda17 into main Feb 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant