mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 21:26:11 +00:00
Better handling of allOf in request body (#16991)
* better handling of allOf in request body, add tests * additional checks * fix description
This commit is contained in:
@@ -421,6 +421,24 @@ paths:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/echo/body/allOf/Pet:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
operationId: test/echo/body/allOf/Pet
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/AllOfPet'
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
description: Successful operation
|
||||
summary: Test body parameter(s)
|
||||
tags:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/echo/body/Pet/response_string:
|
||||
post:
|
||||
description: Test empty response body
|
||||
@@ -541,6 +559,13 @@ components:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
description: Pet object that needs to be added to the store
|
||||
AllOfPet:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Pet'
|
||||
description: Pet object that needs to be added to the store
|
||||
Tag:
|
||||
content:
|
||||
application/json:
|
||||
|
||||
@@ -101,6 +101,35 @@ public interface BodyApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @return Pet
|
||||
*/
|
||||
@RequestLine("POST /echo/body/allOf/Pet")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
Pet testEchoBodyAllOfPet(Pet pet);
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Similar to <code>testEchoBodyAllOfPet</code> but it also returns the http response headers .
|
||||
* Test body parameter(s)
|
||||
* @param pet Pet object that needs to be added to the store (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/allOf/Pet")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Pet> testEchoBodyAllOfPetWithHttpInfo(Pet pet);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
|
||||
Reference in New Issue
Block a user