-
-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e6c4c0
commit ea5ef80
Showing
5 changed files
with
127 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the NelmioApiDocBundle package. | ||
* | ||
* (c) Nelmio | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Nelmio\ApiDocBundle\Tests\Functional\Controller; | ||
|
||
use Nelmio\ApiDocBundle\Attribute\Model; | ||
use Nelmio\ApiDocBundle\Tests\Functional\Entity\Article81; | ||
use OpenApi\Attributes as OA; | ||
use Symfony\Component\HttpFoundation\JsonResponse; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
class DeprecationController | ||
{ | ||
#[Route(path: '/legacy/null_options', name: 'legacy_null_options', methods: 'POST')] | ||
#[OA\Response( | ||
response: 200, | ||
content: new Model(type: Article81::class, options: null), | ||
)] | ||
public function __invoke(Article81 $requestDTO): JsonResponse | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "", | ||
"version": "0.0.0" | ||
}, | ||
"paths": { | ||
"/legacy/null_options": { | ||
"post": { | ||
"operationId": "post_legacy_null_options", | ||
"responses": { | ||
"200": { | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/Article81" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"Article81": { | ||
"required": [ | ||
"id", | ||
"type", | ||
"intBackedType", | ||
"notBackedType" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "integer" | ||
}, | ||
"type": { | ||
"$ref": "#/components/schemas/ArticleType81" | ||
}, | ||
"intBackedType": { | ||
"$ref": "#/components/schemas/ArticleType81IntBacked" | ||
}, | ||
"notBackedType": { | ||
"$ref": "#/components/schemas/ArticleType81NotBacked" | ||
}, | ||
"nullableType": { | ||
"nullable": true, | ||
"oneOf": [ | ||
{ | ||
"$ref": "#/components/schemas/ArticleType81" | ||
} | ||
] | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"ArticleType81": { | ||
"type": "string", | ||
"enum": [ | ||
"draft", | ||
"final" | ||
] | ||
}, | ||
"ArticleType81IntBacked": { | ||
"type": "integer", | ||
"enum": [ | ||
0, | ||
1 | ||
] | ||
}, | ||
"ArticleType81NotBacked": { | ||
"required": [ | ||
"name" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters