[python-nextgen] fix empty dict in body parameter (#15336)

* add more tests for python-nextgen

* update samples

* add fix for empty dict body

* update samples
This commit is contained in:
William Cheng
2023-04-28 14:06:27 +08:00
committed by GitHub
parent f4c041e496
commit 2bd1a15217
32 changed files with 1873 additions and 46 deletions

View File

@@ -349,6 +349,46 @@ paths:
- body
x-content-type: application/json
x-accepts: text/plain
/echo/body/Tag/response_string:
post:
description: Test empty json (request body)
operationId: test/echo/body/Tag/response_string
requestBody:
$ref: '#/components/requestBodies/Tag'
responses:
"200":
content:
text/plain:
schema:
type: string
description: Successful operation
summary: Test empty json (request body)
tags:
- body
x-content-type: application/json
x-accepts: text/plain
/echo/body/FreeFormObject/response_string:
post:
description: Test free form object
operationId: test/echo/body/FreeFormObject/response_string
requestBody:
content:
application/json:
schema:
type: object
description: Free form object
responses:
"200":
content:
text/plain:
schema:
type: string
description: Successful operation
summary: Test free form object
tags:
- body
x-content-type: application/json
x-accepts: text/plain
/binary/gif:
post:
description: Test binary (gif) response body
@@ -373,6 +413,12 @@ components:
schema:
$ref: '#/components/schemas/Pet'
description: Pet object that needs to be added to the store
Tag:
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
description: Tag object
schemas:
Category:
example: