forked from loafle/openapi-generator-original
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver * remove commented code * better request body naming * fix unique naming * minor code format change * removed additional underscore from names, fix test * more fixes, update tests * fix all tests * undo changes to default codegen * update samples * update python tests * add new files * update samples
This commit is contained in:
@@ -262,18 +262,10 @@ paths:
|
||||
type: integer
|
||||
style: simple
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object'
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
description: Updated name of the pet
|
||||
type: string
|
||||
status:
|
||||
description: Updated status of the pet
|
||||
type: string
|
||||
type: object
|
||||
$ref: '#/components/schemas/updatePetWithForm_request'
|
||||
responses:
|
||||
"405":
|
||||
description: Invalid input
|
||||
@@ -301,19 +293,10 @@ paths:
|
||||
type: integer
|
||||
style: simple
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object_1'
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
type: object
|
||||
$ref: '#/components/schemas/uploadFile_request'
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -794,29 +777,10 @@ paths:
|
||||
type: number
|
||||
style: form
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object_2'
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
enum_form_string_array:
|
||||
description: Form parameter enum test (string array)
|
||||
items:
|
||||
default: $
|
||||
enum:
|
||||
- '>'
|
||||
- $
|
||||
type: string
|
||||
type: array
|
||||
enum_form_string:
|
||||
default: -efg
|
||||
description: Form parameter enum test (string)
|
||||
enum:
|
||||
- _abc
|
||||
- -efg
|
||||
- (xyz)
|
||||
type: string
|
||||
type: object
|
||||
$ref: '#/components/schemas/testEnumParameters_request'
|
||||
responses:
|
||||
"400":
|
||||
description: Invalid request
|
||||
@@ -852,83 +816,10 @@ paths:
|
||||
가짜 엔드 포인트
|
||||
operationId: testEndpointParameters
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object_3'
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
integer:
|
||||
description: None
|
||||
maximum: 100
|
||||
minimum: 10
|
||||
type: integer
|
||||
int32:
|
||||
description: None
|
||||
format: int32
|
||||
maximum: 200
|
||||
minimum: 20
|
||||
type: integer
|
||||
int64:
|
||||
description: None
|
||||
format: int64
|
||||
type: integer
|
||||
number:
|
||||
description: None
|
||||
maximum: 543.2
|
||||
minimum: 32.1
|
||||
type: number
|
||||
float:
|
||||
description: None
|
||||
format: float
|
||||
maximum: 987.6
|
||||
type: number
|
||||
double:
|
||||
description: None
|
||||
format: double
|
||||
maximum: 123.4
|
||||
minimum: 67.8
|
||||
type: number
|
||||
string:
|
||||
description: None
|
||||
pattern: "/[a-z]/i"
|
||||
type: string
|
||||
pattern_without_delimiter:
|
||||
description: None
|
||||
pattern: "^[A-Z].*"
|
||||
type: string
|
||||
byte:
|
||||
description: None
|
||||
format: byte
|
||||
type: string
|
||||
binary:
|
||||
description: None
|
||||
format: binary
|
||||
type: string
|
||||
date:
|
||||
description: None
|
||||
format: date
|
||||
type: string
|
||||
dateTime:
|
||||
default: 2010-02-01T10:20:10.11111+01:00
|
||||
description: None
|
||||
example: 2020-02-02T20:20:20.22222Z
|
||||
format: date-time
|
||||
type: string
|
||||
password:
|
||||
description: None
|
||||
format: password
|
||||
maxLength: 64
|
||||
minLength: 10
|
||||
type: string
|
||||
callback:
|
||||
description: None
|
||||
type: string
|
||||
required:
|
||||
- byte
|
||||
- double
|
||||
- number
|
||||
- pattern_without_delimiter
|
||||
type: object
|
||||
$ref: '#/components/schemas/testEndpointParameters_request'
|
||||
responses:
|
||||
"400":
|
||||
description: Invalid username supplied
|
||||
@@ -1034,21 +925,10 @@ paths:
|
||||
description: ""
|
||||
operationId: testJsonFormData
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object_4'
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
properties:
|
||||
param:
|
||||
description: field1
|
||||
type: string
|
||||
param2:
|
||||
description: field2
|
||||
type: string
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
$ref: '#/components/schemas/testJsonFormData_request'
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
@@ -1209,21 +1089,10 @@ paths:
|
||||
type: integer
|
||||
style: simple
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/inline_object_5'
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
required:
|
||||
- requiredFile
|
||||
type: object
|
||||
$ref: '#/components/schemas/uploadFileWithRequiredFile_request'
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
@@ -1302,36 +1171,6 @@ components:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
description: Pet object that needs to be added to the store
|
||||
required: true
|
||||
inline_object:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object'
|
||||
inline_object_1:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object_1'
|
||||
inline_object_2:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object_2'
|
||||
inline_object_3:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object_3'
|
||||
inline_object_4:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object_4'
|
||||
inline_object_5:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_object_5'
|
||||
schemas:
|
||||
Foo:
|
||||
example:
|
||||
@@ -2344,7 +2183,7 @@ components:
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Dog_allOf'
|
||||
- $ref: '#/components/schemas/ArrayOfInlineAllOf_array_allof_dog_propertyItems_allOf_1'
|
||||
- $ref: '#/components/schemas/ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf'
|
||||
type: array
|
||||
required:
|
||||
- name
|
||||
@@ -2357,7 +2196,7 @@ components:
|
||||
string:
|
||||
$ref: '#/components/schemas/Foo'
|
||||
type: object
|
||||
inline_object:
|
||||
updatePetWithForm_request:
|
||||
properties:
|
||||
name:
|
||||
description: Updated name of the pet
|
||||
@@ -2366,7 +2205,7 @@ components:
|
||||
description: Updated status of the pet
|
||||
type: string
|
||||
type: object
|
||||
inline_object_1:
|
||||
uploadFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
@@ -2376,7 +2215,7 @@ components:
|
||||
format: binary
|
||||
type: string
|
||||
type: object
|
||||
inline_object_2:
|
||||
testEnumParameters_request:
|
||||
properties:
|
||||
enum_form_string_array:
|
||||
description: Form parameter enum test (string array)
|
||||
@@ -2396,7 +2235,7 @@ components:
|
||||
- (xyz)
|
||||
type: string
|
||||
type: object
|
||||
inline_object_3:
|
||||
testEndpointParameters_request:
|
||||
properties:
|
||||
integer:
|
||||
description: None
|
||||
@@ -2470,7 +2309,7 @@ components:
|
||||
- number
|
||||
- pattern_without_delimiter
|
||||
type: object
|
||||
inline_object_4:
|
||||
testJsonFormData_request:
|
||||
properties:
|
||||
param:
|
||||
description: field1
|
||||
@@ -2482,7 +2321,7 @@ components:
|
||||
- param
|
||||
- param2
|
||||
type: object
|
||||
inline_object_5:
|
||||
uploadFileWithRequiredFile_request:
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
@@ -2504,7 +2343,7 @@ components:
|
||||
declawed:
|
||||
type: boolean
|
||||
type: object
|
||||
ArrayOfInlineAllOf_array_allof_dog_propertyItems_allOf_1:
|
||||
ArrayOfInlineAllOf_array_allof_dog_property_inner_allOf:
|
||||
properties:
|
||||
color:
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user