feat: Response schema $ref deduplication and type accuracy improvements#23
Merged
Merged
Conversation
added 4 commits
February 13, 2026 16:05
- Update Node\Expr\ArrayItem to Node\ArrayItem across analyzers and plugins - Add resolveSchemaRef test helper to TestCase for $ref-aware assertions - Add auto_detect_api_routes config to filter non-API routes automatically - Use getRoutes()->getRoutes() for proper route iteration - Ensure array schemas always include items (OpenAPI best practice) - Use SchemaObject for rate limit response headers - Fix PHPDoc header type on ResponseResult - Remove unused ResultMerger and TypeMapper from ReturnTypeAnalyzer - Fix ClassSchemaResolver::resolveSpatieData return type
…am improvements - Register FormRequest schemas as components via SchemaRegistry for $ref reuse - Resolve enum classes from validation rules (Enum::class) into OpenAPI enum schemas - Support array_merge() and conditional rule merging in FormRequest AST parsing - Add DELETE to query-method list for FormRequestQueryAnalyzer - Detect $request['key'] array access as query parameters - Recognize additional request variable names ($req, $rq) and $request->get() - Update tests to use resolveSchemaRef for $ref-aware assertions
…ection - Detect explicit type casts ((int), (bool), (float), (array)) in resource arrays - Handle Resource::collection() static calls as array-wrapped schemas - Treat string literals as single-value enums for type discriminators - Add database column introspection as step 5 in EloquentModelAnalyzer - Map DB column types (integer, boolean, datetime, etc.) to OpenAPI schemas - Graceful fallback when no database connection is available
- Register error response schemas (401/403/404/422/429) as shared components in PathBuilder via SchemaRegistry, eliminating duplicate inline schemas - Map error sources to named components (AuthenticationError, ValidationError, etc.) - Pass SchemaRegistry to PathBuilder, request analyzers, and CodeSamplePlugin - Resolve $ref schemas in CodeSamplePlugin example extraction - Wire SchemaRegistry through ServiceProvider to all analyzers and plugins - Update error response tests to use resolveSchemaRef helper
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