swagger-php
swagger-php copied to clipboard
A php swagger annotation and parsing library
There is nothing wrong with the following writing, but it cannot be used in GET ` #[OA\RequestBody(content: new OA\MediaType(mediaType: 'application/x-www-form-urlencoded', schema: new OA\Schema(ref: '#/components/schemas/DistrictRequest')))]` The following way of writing in...
 I noted that from some moment, all properties for certain schemas were marked as Deprecated. I found the reason. Before the Schema description, I also have...
I have used the Java `springdoc-openapi-starter-webmvc-ui` package. In the global configuration, I think it is better than the existing PHP swagger package configuration scheme. This is a solution that I...
Example with annotations: https://zircote.github.io/swagger-php/guide/cookbook.html#reusing-responses ``` /** * @OA\Response( * response="product", * description="All information about a product", * @OA\JsonContent(ref="#/components/schemas/Product") * ) */ class ProductResponse {} // ... class ProductController { /**...
Fixes issue with parsing 'processor' config option, it would always fall through to `new Pipeline($config['processors'])` which would throw as its null ``` TypeError: OpenApi\Pipeline::__construct(): Argument #1 ($pipes) must be of...
I am trying to generate the following OpenAPI JSON but I am having trouble generating the `"not": { "required": [` array. I can't really find any examples of doing this...
I have defined the same tag in different classes. It is recommended to keep only one tag to avoid duplication. "tags": [ { "name": "Auth", "description": "认证" }, { "name":...
Hey There, I found a possible bug (possible because maybe that's intentional? I hope not 😆 ): Currently all our Docs are generated with OpenAPI 3.0.0 even though some of...
(Edit: This is now a feature request, not a failure - see comment chain) Schema generation fails, when inside a JsonContent element. Steps to reproduce: With composer.json containing ` "zircote/swagger-php":...
We are using a discriminator to model two types of inputs into our API using something like the following in an annotation ```php use Nelmio\ApiDocBundle\Annotation\Model; use OpenApi\Attributes as OA; ......