|
| 1 | +# Release Notes - Ray.WebQuery 1.0.0-rc1 |
| 2 | + |
| 3 | +## 🚀 Initial Release |
| 4 | + |
| 5 | +Ray.WebQuery 1.0.0-rc1 is the first release candidate of our new web API access mapping framework, extracted from Ray.MediaQuery to provide dedicated HTTP client functionality. |
| 6 | + |
| 7 | +## ✨ Key Features |
| 8 | + |
| 9 | +### Web API Query System |
| 10 | +- **`#[WebQuery]` Annotation**: Mark interface methods for automatic HTTP request mapping |
| 11 | +- **Multiple Response Types**: Support for JSON arrays, raw strings, and PSR-7 MessageInterface |
| 12 | +- **URI Template Support**: Dynamic URL parameter binding using `{param}` syntax |
| 13 | +- **AOP Integration**: Seamless method interception using Ray.Aop |
| 14 | + |
| 15 | +### Configuration Management |
| 16 | +- **JSON Configuration**: Define web APIs in structured JSON files |
| 17 | +- **Schema Validation**: Complete JSON schema for web query definitions |
| 18 | +- **Template Bindings**: Support for global URI template parameter bindings |
| 19 | + |
| 20 | +### HTTP Client Integration |
| 21 | +- **Guzzle HTTP Client**: Built on the reliable Guzzle HTTP library |
| 22 | +- **PSR-7 Compatibility**: Full support for PSR-7 HTTP message interfaces |
| 23 | +- **Parameter Injection**: Automatic parameter conversion and injection |
| 24 | + |
| 25 | +## 🏗️ Architecture |
| 26 | + |
| 27 | +The framework follows a clean separation of concerns: |
| 28 | + |
| 29 | +- **MediaQueryWebModule**: Dependency injection configuration |
| 30 | +- **WebQueryInterceptor**: AOP-based method interception |
| 31 | +- **WebQueryConfig**: Configuration loading and validation |
| 32 | +- **WebApiQuery**: HTTP request execution |
| 33 | + |
| 34 | +## 📋 Requirements |
| 35 | + |
| 36 | +- PHP 8.1+ |
| 37 | +- Ray.MediaQuery 1.0.0-rc1 |
| 38 | +- Guzzle HTTP 7.2+ |
| 39 | + |
| 40 | +## 🔧 Installation |
| 41 | + |
| 42 | +```bash |
| 43 | +composer require ray/web-query |
| 44 | +``` |
| 45 | + |
| 46 | +## 📝 Basic Usage |
| 47 | + |
| 48 | +```php |
| 49 | +<?php |
| 50 | +use Ray\MediaQuery\Annotation\WebQuery; |
| 51 | + |
| 52 | +interface ApiInterface |
| 53 | +{ |
| 54 | + #[WebQuery('user.get')] |
| 55 | + public function getUser(string $id): array; |
| 56 | +} |
| 57 | +``` |
| 58 | + |
| 59 | +```json |
| 60 | +{ |
| 61 | + "webQuery": [ |
| 62 | + { |
| 63 | + "id": "user.get", |
| 64 | + "method": "GET", |
| 65 | + "path": "https://api.example.com/users/{id}" |
| 66 | + } |
| 67 | + ] |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +## 🧪 Testing |
| 72 | + |
| 73 | +This release includes comprehensive test coverage for all major functionality, ensuring reliability and stability for production use. |
| 74 | + |
| 75 | +## 🔗 Dependencies |
| 76 | + |
| 77 | +This package builds upon: |
| 78 | +- ray/media-query 1.0.0-rc1 for core query functionality |
| 79 | +- ray/di and ray/aop for dependency injection and AOP |
| 80 | +- guzzlehttp/guzzle for HTTP client capabilities |
| 81 | +- rize/uri-template for URI template processing |
| 82 | + |
| 83 | +## 🎯 Next Steps |
| 84 | + |
| 85 | +As a release candidate, we welcome feedback and testing from the community. The API is considered stable, but we may make minor adjustments based on user feedback before the final 1.0.0 release. |
0 commit comments