Conversation
… descriptions - Create WebFiori\Http\Annotations\ApiResponse repeatable attribute - Modify toPathItemObj() to read #[ApiResponse] from mapped methods - Programmatic addResponse() takes priority over annotations - Methods without #[ApiResponse] fall back to default '200 - Successful operation' Closes #143
…#[ResponseBody] - JsonI/Json return values are now stringified immediately via toJSON() - Non-JSON content type branch now handles JsonI/Json without wrapping in 'data' key - Internal public properties of JsonI objects no longer leak into response Closes #142
- Add optional 'path' parameter to RestController for custom route paths - Add getPath()/setPath() methods to WebService - Update OpenAPIGenerator to use getPath() for spec path generation - Path supports multi-segment URLs (e.g., 'auth/login') - Falls back to service name when no path is set Closes #141
- Add OpenAPIGenerator::generateFromNamespace() for auto-discovery - Add OpenAPIGenerator::discoverServices() static helper - Add OpenAPISpecService: ready-to-use service that exposes spec via GET - Namespace scan finds #[RestController] classes, excludes abstract/non-annotated Closes #144
feat: OpenAPI annotations, path routing, and JsonI serialization
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
============================================
+ Coverage 93.79% 93.86% +0.06%
- Complexity 1347 1361 +14
============================================
Files 39 39
Lines 3273 3310 +37
============================================
+ Hits 3070 3107 +37
Misses 203 203
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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
Release v6.0.2 with OpenAPI enhancements, annotation improvements, and serialization fixes.
Motivation
Brings four new features to the main branch for release.
Changes
#[ApiResponse]repeatable attribute for declarative OpenAPI response descriptions#[RestController(path:)]property for custom multi-segment route paths#[ResponseBody]now serializesJsonIobjects directly without metadataOpenAPIGenerator::generateFromNamespace()andOpenAPISpecServicefor namespace scanning and built-in spec endpointsexamples/04-advanced/05-openapi-namespace-scan/How to Test / Verify
625 tests, 1852 assertions pass.
Breaking Changes and Migration Steps
None.
Checklist
Related issues
Closes #141, Closes #142, Closes #143, Closes #144