Skip to content

Commit

Permalink
OpenAPITools#14141 Add externalDocs to @operation to the JavaSpring g…
Browse files Browse the repository at this point in the history
…enerator: generate-samples.sh
  • Loading branch information
arey committed Dec 5, 2022
1 parent 328114d commit a06d0a8
Show file tree
Hide file tree
Showing 27 changed files with 88 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ paths:
x-accepts: application/json
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,8 @@ public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback<Pet> _callback
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws ApiException {
String basePath = null;
Expand Down Expand Up @@ -820,6 +822,8 @@ private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _cal
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public Pet updatePet(Pet pet) throws ApiException {
ApiResponse<Pet> localVarResp = updatePetWithHttpInfo(pet);
Expand All @@ -840,6 +844,8 @@ public Pet updatePet(Pet pet) throws ApiException {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public ApiResponse<Pet> updatePetWithHttpInfo(Pet pet) throws ApiException {
okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, null);
Expand All @@ -862,6 +868,8 @@ public ApiResponse<Pet> updatePetWithHttpInfo(Pet pet) throws ApiException {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public okhttp3.Call updatePetAsync(Pet pet, final ApiCallback<Pet> _callback) throws ApiException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ paths:
x-accepts: application/json
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ public ResponseEntity<Pet> getPetByIdWithHttpInfo(Long petId) throws RestClientE
* @param pet Pet object that needs to be added to the store (required)
* @return Pet
* @throws RestClientException if an error occurs while attempting to invoke the API
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public Pet updatePet(Pet pet) throws RestClientException {
return updatePetWithHttpInfo(pet).getBody();
Expand All @@ -332,6 +334,8 @@ public Pet updatePet(Pet pet) throws RestClientException {
* @param pet Pet object that needs to be added to the store (required)
* @return ResponseEntity&lt;Pet&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public ResponseEntity<Pet> updatePetWithHttpInfo(Pet pet) throws RestClientException {
Object localVarPostBody = pet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@ApiOperation(
tags = { "pet" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@ApiOperation(
tags = { "pet" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ paths:
x-accepts: application/json
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public Pet updatePet(Pet pet) throws ApiException {
return updatePetWithHttpInfo(pet).getData();
Expand All @@ -434,6 +436,8 @@ public Pet updatePet(Pet pet) throws ApiException {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
public ApiResponse<Pet> updatePetWithHttpInfo(Pet pet) throws ApiException {
Object localVarPostBody = pet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@Operation(
operationId = "updatePet",
Expand All @@ -232,7 +234,8 @@ ResponseEntity<Pet> getPetById(
},
security = {
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
}
},
externalDocs = @ExternalDocumentation(description = "API documentation for the updatePet operation", url = "http://petstore.swagger.io/v2/doc/updatePet")
)
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@Operation(
operationId = "updatePet",
Expand All @@ -232,7 +234,8 @@ ResponseEntity<Pet> getPetById(
},
security = {
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
}
},
externalDocs = @ExternalDocumentation(description = "API documentation for the updatePet operation", url = "http://petstore.swagger.io/v2/doc/updatePet")
)
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ default ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@Operation(
operationId = "updatePet",
Expand All @@ -307,7 +309,8 @@ default ResponseEntity<Pet> getPetById(
},
security = {
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
}
},
externalDocs = @ExternalDocumentation(description = "API documentation for the updatePet operation", url = "http://petstore.swagger.io/v2/doc/updatePet")
)
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ paths:
- tag: pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ default ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@Operation(
operationId = "updatePet",
Expand All @@ -307,7 +309,8 @@ default ResponseEntity<Pet> getPetById(
},
security = {
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
}
},
externalDocs = @ExternalDocumentation(description = "API documentation for the updatePet operation", url = "http://petstore.swagger.io/v2/doc/updatePet")
)
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ paths:
- tag: pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ default ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ paths:
- tag: pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
4 changes: 4 additions & 0 deletions samples/server/petstore/erlang-server/priv/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
},
"put" : {
"description" : "",
"externalDocs" : {
"description" : "API documentation for the updatePet operation",
"url" : "http://petstore.swagger.io/v2/doc/updatePet"
},
"operationId" : "updatePet",
"requestBody" : {
"$ref" : "#/components/requestBodies/Pet"
Expand Down
3 changes: 3 additions & 0 deletions samples/server/petstore/go-api-server/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
3 changes: 3 additions & 0 deletions samples/server/petstore/go-chi-server/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
3 changes: 3 additions & 0 deletions samples/server/petstore/go-echo-server/.docs/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
3 changes: 3 additions & 0 deletions samples/server/petstore/go-gin-api-server/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ public Mono<Pet> getPetById(
*
* @param pet Pet object that needs to be added to the store (required)
* @return Pet
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@Operation(
operationId = "updatePet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ paths:
x-accepts: application/json
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
3 changes: 3 additions & 0 deletions samples/server/petstore/python-fastapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ paths:
- pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ default ResponseEntity<Pet> getPetById(
* or Invalid ID supplied (status code 400)
* or Pet not found (status code 404)
* or Validation exception (status code 405)
* API documentation for the updatePet operation
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
*/
@RequestMapping(
method = RequestMethod.PUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ paths:
- tag: pet
put:
description: ""
externalDocs:
description: API documentation for the updatePet operation
url: http://petstore.swagger.io/v2/doc/updatePet
operationId: updatePet
requestBody:
$ref: '#/components/requestBodies/Pet'
Expand Down

0 comments on commit a06d0a8

Please sign in to comment.