Better inline model resolver to handle inline schema in array item (#12104)

* better support of inline schema in array item

* update tests

* update samples

* regenerate samples

* fix allof naming, remove files

* add files

* update samples

* update readme

* fix tests

* update samples

* update samples

* add new files

* update test spec

* add back tests

* remove unused files

* comment out python test

* update js test using own spec

* remove files

* remove unused files

* remove files

* remove unused files

* better handling of allOf with a single type

* comment out go test

* remove test_all_of_with_single_ref_single_ref_type.py

* fix inline resolver, uncomment go test
This commit is contained in:
William Cheng
2022-04-20 10:28:15 +08:00
committed by GitHub
parent 12454de3ac
commit 8330e16d66
200 changed files with 7495 additions and 975 deletions

View File

@@ -1491,7 +1491,6 @@ components:
userStatus: 6
phone: phone
id: 0
userType: ""
email: email
username: username
properties:
@@ -1515,18 +1514,9 @@ components:
description: User Status
format: int32
type: integer
userType:
allOf:
- $ref: '#/components/schemas/UserType'
type: object
xml:
name: User
UserType:
enum:
- admin
- user
title: UserType
type: string
Tag:
example:
name: name
@@ -2124,6 +2114,20 @@ components:
$ref: '#/components/schemas/Bar'
type: array
type: object
AllOfWithSingleRef:
properties:
username:
type: string
SingleRefType:
allOf:
- $ref: '#/components/schemas/SingleRefType'
type: object
SingleRefType:
enum:
- admin
- user
title: SingleRefType
type: string
inline_response_default:
example:
string: