Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
============================================
+ Coverage 92.12% 92.32% +0.19%
- Complexity 1268 1292 +24
============================================
Files 39 39
Lines 3049 3128 +79
============================================
+ Hits 2809 2888 +79
Misses 240 240
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
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
OpenAPI spec generator now reads
#[RequestParam]annotations and includes parameter definitions in the generated spec.Motivation
toOpenAPI()generated specs with correct paths and methods but no parameter definitions, making Swagger UI less useful for API consumers. Fixes #100.Changes
OperationObj: AddedparametersandrequestBodyfields with serialization support.WebService::toPathItemObj(): Reflects on#[RequestParam]annotations grouped by HTTP method:parametersarray (query params with name, type, required)requestBodywithapplication/x-www-form-urlencodedschema (properties, required array)ParamTypemapped to OpenAPI types (STRING→string, INT→integer, EMAIL→string+email format, URL→string+uri format)OpenAPIGetPostServicetest service (mixed GET/POST with various param types).OpenAPIRequestParamTestwith 9 test cases.How to Test / Verify
php vendor/bin/phpunit --configuration tests/phpunit10.xml --filter OpenAPIRequestParamTest php vendor/bin/phpunit --configuration tests/phpunit10.xml # full suite: 431 tests, 0 failuresBreaking Changes and Migration Steps
None. Previously empty operations now include parameter metadata. No existing fields are removed or changed.
Checklist
Related issues
Closes #100