-
Notifications
You must be signed in to change notification settings - Fork 89
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
b5c87a4
commit fc75f0b
Showing
5 changed files
with
156 additions
and
5 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,69 @@ | ||
### array merge recursive distinct | ||
|
||
While resolving `allOf`s (pull request https://github.com/cebe/php-openapi/pull/208), if a duplicate property is found | ||
|
||
```yaml | ||
components: | ||
schemas: | ||
User: | ||
type: object | ||
required: | ||
- id | ||
- name # <-------------------------------------------------------------- | ||
properties: | ||
id: | ||
type: integer | ||
name: # <-------------------------------------------------------------- | ||
type: string | ||
maxLength: 10 # <-------------------------------------------------------------- | ||
Pet: | ||
type: object | ||
required: | ||
- id2 | ||
- name # <-------------------------------------------------------------- | ||
properties: | ||
id2: | ||
type: integer | ||
name: # <-------------------------------------------------------------- | ||
type: string | ||
maxLength: 12 # <-------------------------------------------------------------- | ||
Post: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
content: | ||
type: string | ||
user: | ||
allOf: | ||
- $ref: '#/components/schemas/User' | ||
- $ref: '#/components/schemas/Pet' | ||
- x-faker: true | ||
``` | ||
then property from the last component schema will be considered: | ||
```yaml | ||
Post: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
content: | ||
type: string | ||
user: | ||
type: object | ||
required: | ||
- id | ||
- name # <-------------------------------------------------------------- | ||
- id2 | ||
properties: | ||
id: | ||
type: integer | ||
name: # <-------------------------------------------------------------- | ||
type: string | ||
maxLength: 12 # <-------------------------------------------------------------- | ||
id2: | ||
type: integer | ||
x-faker: true | ||
``` |
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