# swagger **Repository Path**: motion-code/swagger ## Basic Information - **Project Name**: swagger - **Description**: madong 管理后台swagger扩展服务 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-13 - **Last Updated**: 2025-11-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Swagger Annotation Library ## Introduction This is a PHP-based Swagger annotation library designed to define API documentation information via annotations within your project. It provides a set of attribute classes and processor interfaces to help developers quickly generate API documentation compliant with the OpenAPI specification. ## Key Features - Provides various annotations to define API operations, response formats, request parameters, etc. - Supports automatic generation of JSON-formatted API response examples - Offers a base processor interface for extending custom document processing logic ## Core Components - `ProcessorInterface` - Interface specification for document processors - `AbstractProcessor` - Abstract base class for processors - `ApiOperation` - Defines metadata for API operations - `FormRequest` - Defines the structure of form request parameters - `ResultResponse` and its subclasses - Define response formats for different scenarios - `Property` - Defines data model properties ## Usage Example ```php // Use annotations in controller methods #[ApiOperation('User Login')] #[ReadResponse(User::class)] public function login() { // Your business logic } ``` ## Installation Install via Composer: ```bash composer require madong/swagger ``` ## Contribution Guidelines Contributions to code and documentation are welcome. Please fork the project, create a new branch for development, and submit a Pull Request. ## License MIT License - See the LICENSE file for details.