-
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.
Allow recursive nesting of AdditionalProperties in Attributes (#1490)
- Loading branch information
1 parent
bc6107f
commit e67dfd9
Showing
4 changed files
with
52 additions
and
1 deletion.
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
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 declare(strict_types=1); | ||
|
||
/** | ||
* @license Apache 2.0 | ||
*/ | ||
|
||
namespace OpenApi\Tests\Fixtures\Scratch; | ||
|
||
use OpenApi\Attributes as OAT; | ||
|
||
#[OAT\Info( | ||
title: 'Nested Additional Properties', | ||
version: '1.0' | ||
)] | ||
#[OAT\Get( | ||
path: '/api/endpoint', | ||
description: 'An endpoint', | ||
responses: [new OAT\Response(response: 200, description: 'OK')] | ||
)] | ||
#[OAT\Schema( | ||
additionalProperties: new OAT\AdditionalProperties( | ||
additionalProperties: new OAT\AdditionalProperties( | ||
type: 'string', | ||
) | ||
), | ||
type: 'object' | ||
)] | ||
class NestedAdditionalAttributes | ||
{ | ||
} |
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,18 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: 'Nested Additional Properties' | ||
version: '1.0' | ||
paths: | ||
/api/endpoint: | ||
get: | ||
description: 'An endpoint' | ||
responses: | ||
'200': | ||
description: OK | ||
components: | ||
schemas: | ||
NestedAdditionalAttributes: | ||
type: object | ||
additionalProperties: | ||
additionalProperties: | ||
type: string |