OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
docs
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:03 AM
rwxr-xr-x
📁
.vitepress
-
08/07/2024 04:34:48 AM
rwxr-xr-x
📁
guide
-
08/07/2024 04:34:24 AM
rwxr-xr-x
📄
index.md
1.47 KB
08/07/2024 04:34:01 AM
rw-r--r--
📄
package.json
357 bytes
08/07/2024 04:34:01 AM
rw-r--r--
📁
reference
-
08/07/2024 04:34:24 AM
rwxr-xr-x
📄
related-projects.md
2.37 KB
08/07/2024 04:34:02 AM
rw-r--r--
📁
snippets
-
08/07/2024 04:35:07 AM
rwxr-xr-x
Editing: index.md
Close
--- home: true actionText: User Guide → actionLink: /guide/ features: - title: OpenAPI conformant details: Generate OpenAPI documents in version 3.0 or 3.1. - title: Document your API inside PHP source code details: Using swagger-php lets you write the API documentation inside the PHP source files which helps keeping the documentation up-to-date. - title: Annotation and Attribute support details: Annotations can be either docblocks or PHP 8.1 attributes. --- ### 1. Install with composer: ```shell > composer require zircote/swagger-php ``` ### 2. Update your code Add `swagger-php` attributes or annotations to your source code. <codeblock id="minimal"> <template v-slot:at> <<< @/snippets/minimal_api_at.php </template> <template v-slot:an> <<< @/snippets/minimal_api_an.php </template> </codeblock> ### 3. Generate OpenAPI documentation ```shell > ./bin/openapi src -o openapi.yaml ``` ### 4. Explore and interact with your API Use an OpenAPI tool like [Swagger UI ](https://swagger.io/tools/swagger-ui/) to explore and interact with your API. ## Links - [User Guide](guide/index.md) - [Reference](reference/index.md) - [OpenApi Documentation](https://learn.openapis.org/) - [OpenApi Specification](https://spec.openapis.org/oas/v3.1.0.html) - [Learn by example](https://github.com/zircote/swagger-php/tree/master/Examples) - [Related projects](related-projects.md) - [Swagger-php 2.x documentation](https://github.com/zircote/swagger-php/tree/2.x/docs)