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: migrating-to-v3.md
Close
# Migrating to v3 Swagger-PHP 3.x generates an openapi.json file that follows the [OpenAPI Version 3.0.x Specification](https://github.com/OAI/OpenAPI-Specification). If you need to output the older 2.x specification use OpenApi-php 2.x ## The default output changed from json to yaml This aligns better with the direction of the swagger documentation and examples. Annotations can't be used as string anymore, you'll need to call `toYaml()` or `toJson()` if you prefer the json format. ## Updated CLI - Added colors - No output for successful execution (Removed summary) - non-zero exit when an error occurred. - Defaults to yaml - Defaults to stdout. To save to openapi.yaml use `-o` or `>` ## Changed annotations ### SWG is renamed to OA The namespace is renamed from SWG (Swagger) to OA (OpenApi) ### @SWG\Swagger() is renamed to @OA\OpenApi() ### @SWG\Path() is renamed to @OA\PathItem() The specification uses the term "Path Item Object", updated the annotation to reflect that. ### @SWG\Definition() is removed Use @OA\Schema() instead of @OA\Definition() and update the references from "#/definitions/something" to "#/components/schemas/something". ### @SWG\Path is removed Use @OA\PathItem instead of @SWG\Path and update references. ### Consumes, produces field is removed from OpenAPI specification Use @OA\MediaType to set data format. ### Rename parameter references Rename `#/parameters/{parameter_name}` to `#/components/parameters/{parameter_name}` ### Rename response references Rename `#/responses/{response}` to `#/components/responses/{response}` ### Renamed cli Renamed swagger to openapi ### More details about differences: [A Visual Guide to What's New in Swagger 3.0](https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/)