Skip to content

feat: v6.0.2 release#146

Merged
usernane merged 6 commits into
mainfrom
dev
Jun 21, 2026
Merged

feat: v6.0.2 release#146
usernane merged 6 commits into
mainfrom
dev

Conversation

@usernane

Copy link
Copy Markdown
Member

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 serializes JsonI objects directly without metadata
  • OpenAPIGenerator::generateFromNamespace() and OpenAPISpecService for namespace scanning and built-in spec endpoints
  • New example at examples/04-advanced/05-openapi-namespace-scan/

How to Test / Verify

php vendor/bin/phpunit --configuration tests/phpunit.xml

625 tests, 1852 assertions pass.

Breaking Changes and Migration Steps

None.

Checklist

  • I reviewed my own diff before requesting review
  • My commits follow Conventional Commits
  • The title of the pull request follows Conventional Commits
  • I added/updated tests (or explained why not)
  • I updated docs (if needed)
  • I ran lint/cs-fixer (if applicable)
  • I considered backward compatibility
  • I considered security

Related issues

Closes #141, Closes #142, Closes #143, Closes #144

Ibrahim BinAlshikh and others added 6 commits June 21, 2026 23:56
… 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
@usernane usernane merged commit 79a25aa into main Jun 21, 2026
9 checks passed
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.79592% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.86%. Comparing base (2b9a2e3) to head (4b3efd3).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
WebFiori/Http/WebService.php 89.79% 5 Missing ⚠️
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              
Flag Coverage Δ
php-8.1 93.86% <89.79%> (+0.06%) ⬆️
php-8.2 93.74% <89.79%> (+0.07%) ⬆️
php-8.3 93.74% <89.79%> (+0.07%) ⬆️
php-8.4 93.74% <89.79%> (+0.07%) ⬆️
php-8.5 93.74% <89.79%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant