OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
docs
/
guide
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:25 AM
rwxr-xr-x
📄
annotations.md
3.44 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
attributes.md
1.14 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
common-techniques.md
6.98 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
cookbook.md
15.6 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
faq.md
5.25 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
generating-openapi-documents.md
1.91 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
index.md
990 bytes
08/07/2024 04:34:24 AM
rw-r--r--
📄
installation.md
455 bytes
08/07/2024 04:34:24 AM
rw-r--r--
📄
migrating-to-v3.md
1.74 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
migrating-to-v4.md
5.33 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
required-elements.md
1.11 KB
08/07/2024 04:34:24 AM
rw-r--r--
📄
under-the-hood.md
1.8 KB
08/07/2024 04:34:24 AM
rw-r--r--
Editing: index.md
Close
# What is Swagger-PHP? `swagger-php` is a library that extracts API metadata from your PHP source code files. The idea is to add `swagger-php` [annotations](annotations.md) or [attributes](attributes.md) next to the relevant PHP code in your application. These will contain the details about your API and `swagger-php` will convert those into machine-readable [OpenAPI documentation](https://spec.openapis.org/oas/v3.1.0.html). By adding your API documentation next to the corresponding source code (same file!) makes it easy to keep it up-to-date as all details can be modified in one place. ::: tip Annotating vs. Annotations When talking about annotating your code we mean the act of adding meta-data to your codebase. This can be done by either adding [`Annotations`](annotations.md) or [`Attributes`](attributes.md). ::: ::: warning Requirements Using `swagger-php` requires a minimum of **PHP 7.2** for using annotations and at least **PHP 8.1** to use attributes. :::