-
Notifications
You must be signed in to change notification settings - Fork 937
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
d4aab3d
commit f712c8a
Showing
2 changed files
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php declare(strict_types=1); | ||
|
||
/** | ||
* @license Apache 2.0 | ||
*/ | ||
|
||
namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Schema] | ||
class Types31 | ||
{ | ||
#[OAT\Property(type: ['string', 'integer'])] | ||
public string|int $stringInteger = ''; | ||
|
||
#[OAT\Property(type: ['string', 'number', 'integer', 'boolean', 'array', 'object', 'null'])] | ||
public mixed $massiveTypes = ''; | ||
} | ||
|
||
#[OAT\OpenApi(openapi: '3.1.0')] | ||
#[OAT\Info( | ||
title: 'List of types', | ||
version: '1.0' | ||
)] | ||
#[OAT\Get( | ||
path: '/api/endpoint', | ||
description: 'An endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
class Types31Endpoint | ||
{ | ||
} |
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 @@ | ||
openapi: 3.1.0 | ||
info: | ||
title: 'List of types' | ||
version: '1.0' | ||
paths: | ||
/api/endpoint: | ||
get: | ||
description: 'An endpoint' | ||
operationId: 20a99cdde4e09b297c7555321c7cdb6f | ||
responses: | ||
'200': | ||
description: OK | ||
components: | ||
schemas: | ||
Types31: | ||
properties: | ||
stringInteger: | ||
type: | ||
- string | ||
- integer | ||
massiveTypes: | ||
type: | ||
- string | ||
- number | ||
- integer | ||
- boolean | ||
- array | ||
- object | ||
- 'null' | ||
type: object |