diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 9991e19aaf7a..18886b3d1cd7 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -8,6 +8,7 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} {{#swagger2AnnotationLibrary}} +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -160,7 +161,8 @@ public interface {{classname}} { {{#authMethods}} @SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes={ {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}} {{/authMethods}} - }{{/hasAuthMethods}} + }{{/hasAuthMethods}}{{#externalDocs}}, + externalDocs = @ExternalDocumentation(description = "{{externalDocs.description}}", url = "{{externalDocs.url}}"){{/externalDocs}} ) {{/swagger2AnnotationLibrary}} {{#swagger1AnnotationLibrary}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index aaaf66525fea..361d808ca9c3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -1243,6 +1243,48 @@ public void shouldPurAdditionalModelTypesOverAllModels() throws IOException { } } + @Test + public void shouldGenerateExternalDocs() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/petstore.yaml", null, new ParseOptions()).getOpenAPI(); + SpringCodegen codegen = new SpringCodegen(); + codegen.setLibrary(SPRING_BOOT); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SpringCodegen.USE_TAGS, "true"); + codegen.additionalProperties().put(BeanValidationFeatures.USE_BEANVALIDATION, "true"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false"); + generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true"); + generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); + + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("PetApi.java")) + .printFileContent() + .hasImports("io.swagger.v3.oas.annotations.ExternalDocumentation") + .assertMethod("updatePet") + .assertMethodAnnotations() + .containsWithName("Operation") + .containsWithNameAndAttributes("Operation", + ImmutableMap.of( + "operationId", "\"updatePet\"", + //"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\")" + ) + ); + } + @Test public void testHandleDefaultValue_issue8535() throws Exception { Map additionalProperties = new HashMap<>(); diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml index 0971c554414a..a8f9809a1249 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml @@ -49,6 +49,9 @@ paths: summary: Update an existing pet description: '' operationId: updatePet + externalDocs: + url: "http://petstore.swagger.io/v2/doc/updatePet" + description: "API documentation for the updatePet operation" responses: '200': description: successful operation diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml index de4b48c1c439..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml @@ -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' diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java index 23240917649a..016518223687 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/PetApi.java @@ -747,6 +747,8 @@ public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback _callback 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public okhttp3.Call updatePetCall(Pet pet, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -820,6 +822,8 @@ private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _cal 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public Pet updatePet(Pet pet) throws ApiException { ApiResponse localVarResp = updatePetWithHttpInfo(pet); @@ -840,6 +844,8 @@ public Pet updatePet(Pet pet) throws ApiException { 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { okhttp3.Call localVarCall = updatePetValidateBeforeCall(pet, null); @@ -862,6 +868,8 @@ public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public okhttp3.Call updatePetAsync(Pet pet, final ApiCallback _callback) throws ApiException { diff --git a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml index de4b48c1c439..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml @@ -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' diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java index cd8e0ddb790d..6dcab96f8cd2 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/PetApi.java @@ -317,6 +317,8 @@ public ResponseEntity 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 Update an existing pet Documentation */ public Pet updatePet(Pet pet) throws RestClientException { return updatePetWithHttpInfo(pet).getBody(); @@ -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<Pet> * @throws RestClientException if an error occurs while attempting to invoke the API + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public ResponseEntity updatePetWithHttpInfo(Pet pet) throws RestClientException { Object localVarPostBody = pet; diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java index 933565438467..703cebdb12ff 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/PetApi.java @@ -212,6 +212,8 @@ ResponseEntity 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 Update an existing pet Documentation */ @ApiOperation( tags = { "pet" }, diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 933565438467..703cebdb12ff 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -212,6 +212,8 @@ ResponseEntity 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 Update an existing pet Documentation */ @ApiOperation( tags = { "pet" }, diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml index de4b48c1c439..6058c2b8c8d5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml @@ -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' diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/PetApi.java index 9883a1a16408..b08f6fccba59 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/PetApi.java @@ -415,6 +415,8 @@ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public Pet updatePet(Pet pet) throws ApiException { return updatePetWithHttpInfo(pet).getData(); @@ -434,6 +436,8 @@ public Pet updatePet(Pet pet) throws ApiException { 404 Pet not found - 405 Validation exception - + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { Object localVarPostBody = pet; diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index e1ca2b53dfc2..f49c25ff559a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -216,6 +217,8 @@ ResponseEntity 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 Update an existing pet Documentation */ @Operation( operationId = "updatePet", @@ -233,7 +236,8 @@ ResponseEntity 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, diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index 96ba8c264322..fa840a489023 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index a950097594e4..c43ad49af790 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 3b16fd102836..d33fefe73a56 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index b9f04a6d8155..14b3681c72e1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 51492b39a72f..41d3cac1b4a2 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index c3136412d9d1..7503589c190d 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8b1637a81396..32199a871600 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 8ae237eb738f..c651474a4d10 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -15,6 +15,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index 17e1dda0fa02..fa5fbb022783 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index cb2b400e6eee..986eb905274e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index 7605f77897e4..abe1384e7d53 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index a2aadee3ea56..3b2da4c60cfd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index 792108d13a13..389737620359 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -9,6 +9,7 @@ import org.springframework.data.domain.Pageable; import org.springdoc.api.annotations.ParameterObject; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 0bfc14bacec9..c300f07e170e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index c935ef199c66..1ee849064eb0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 4a0e2eca0e85..4d07d323f33d 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -216,6 +217,8 @@ ResponseEntity 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 Update an existing pet Documentation */ @Operation( operationId = "updatePet", @@ -233,7 +236,8 @@ ResponseEntity 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, diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index ffabbb88143e..3a95f8a69ac7 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index e80f41369b78..7db24e38ea35 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index 002638053e47..80362e3f91c8 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index d712b5a63fa0..344411660aef 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index 00a7cb61010c..c2fd64613ddf 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 88f421ce4b48..6d176b349e49 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index c6224aecf7b3..80ee85befb80 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 90e0bee89f28..c3e72f2a2fb2 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java index 4d9555770aa6..b081f682688b 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/BarApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.Bar; import org.openapitools.model.BarCreate; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java index 59d263d010c5..a2c962148bab 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/api/FooApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.Foo; import org.openapitools.model.FooRefOrValue; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index 882fce0a98a7..1d075e158cc0 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -291,6 +292,8 @@ default ResponseEntity 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 Update an existing pet Documentation */ @Operation( operationId = "updatePet", @@ -308,7 +311,8 @@ default ResponseEntity 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, diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 8b9abfd24df8..3e46706a98ab 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index 447e35aa773d..c9f27c7eada0 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml index ce4ba1e4a4ea..65092456cbdb 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index f2f3c493b41b..2241fd03b7ba 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -291,6 +292,8 @@ default ResponseEntity 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 Update an existing pet Documentation */ @Operation( operationId = "updatePet", @@ -308,7 +311,8 @@ default ResponseEntity 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, diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index 0ea5dd3d34be..79ff70c8a43f 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index cc1f53baef0f..b16023157df8 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml index ce4ba1e4a4ea..65092456cbdb 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8e292d1b615f..b2818af0506b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 720be5e7eafe..9be60b9e27d9 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 64158a0141d9..39b86c6231f5 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 986c5172d231..7c73d22299c2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index b096b1361c8e..8ca44329f55b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 0a7d52d80442..59134bc852f2 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index e085bd710626..2be1e53db1d5 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index aae40e37703a..77afae47c2ae 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index ff9d8f79ba76..2f13c4c298a4 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 0c05eb88ae4e..2547013cf7bb 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 58e5a4d346f4..7ec3511b0b87 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index dee9ad46b135..30b688c810ff 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8e292d1b615f..b2818af0506b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index df80f94c55ea..30833ccc9735 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 64158a0141d9..39b86c6231f5 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index e517af98896b..9e666d7080a8 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index b096b1361c8e..8ca44329f55b 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 0a7d52d80442..59134bc852f2 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index e2bad8139ca8..32c9b150b71f 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index d86473e41ad2..a4ac9e891072 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 40ab43f07138..c8111bd54755 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index 2143006592ab..b95c57e6d852 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 2d4586d490d8..99795aec9f4d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index 3666e0b62caa..6b6471732c23 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java index 4fa05d41a4cc..c6606cbe3789 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/PetApi.java @@ -204,6 +204,8 @@ default ResponseEntity 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 Update an existing pet Documentation */ @RequestMapping( method = RequestMethod.PUT, diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml index ce4ba1e4a4ea..65092456cbdb 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index 8e292d1b615f..b2818af0506b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index a4ac45815563..52ceb7e5039d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 64158a0141d9..39b86c6231f5 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 38da0e20b90f..dbcba40c341b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index b096b1361c8e..8ca44329f55b 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 0a7d52d80442..59134bc852f2 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 5defcf762f40..36bce7cd1345 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -7,6 +7,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -292,6 +293,8 @@ default ResponseEntity 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 Update an existing pet Documentation */ @Operation( operationId = "updatePet", @@ -309,7 +312,8 @@ default ResponseEntity 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, diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index bb39e31baa0f..bae8ed3285d8 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 66eb5fcd6e97..d3a91bc74bdc 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml index ce4ba1e4a4ea..65092456cbdb 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index 83b1101abe0e..8c95563cbadb 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -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" diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index 6c5ca4308aaa..9a95adaefff2 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -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' diff --git a/samples/server/petstore/go-chi-server/api/openapi.yaml b/samples/server/petstore/go-chi-server/api/openapi.yaml index 6c5ca4308aaa..9a95adaefff2 100644 --- a/samples/server/petstore/go-chi-server/api/openapi.yaml +++ b/samples/server/petstore/go-chi-server/api/openapi.yaml @@ -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' diff --git a/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml b/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml index 6c5ca4308aaa..9a95adaefff2 100644 --- a/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml +++ b/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml @@ -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' diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index 6c5ca4308aaa..9a95adaefff2 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -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' diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java index 3046d5f95b47..a7aca80cd393 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java @@ -217,6 +217,8 @@ public Mono getPetById( * * @param pet Pet object that needs to be added to the store (required) * @return Pet + * API documentation for the updatePet operation + * @see Update an existing pet Documentation */ @Operation( operationId = "updatePet", diff --git a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml index 3020b80831ad..23317e7c3044 100644 --- a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml +++ b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml index 6c5ca4308aaa..9a95adaefff2 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/server/petstore/python-fastapi/openapi.yaml b/samples/server/petstore/python-fastapi/openapi.yaml index d082ad070905..acbac25807e3 100644 --- a/samples/server/petstore/python-fastapi/openapi.yaml +++ b/samples/server/petstore/python-fastapi/openapi.yaml @@ -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' diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index 72b5e51b6956..3c60ba0bd587 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index 3718c18dcb03..b6142cd816e3 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.model.OuterComposite; import org.openapitools.model.User; import org.openapitools.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index b2f75096ab8a..c26d98c47b9c 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index 9529c5a6ad08..0464ac703602 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 383a8e9ad696..e972e9199a36 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index f0c258bb212b..8cefda91a097 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index a34db54ab7e2..1119556d1584 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -6,6 +6,7 @@ package org.openapitools.api; import org.openapitools.model.ObjectWithUniqueItems; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java index 78108702158a..7bedca5d28cc 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/PetApi.java @@ -202,6 +202,8 @@ default ResponseEntity 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 Update an existing pet Documentation */ @RequestMapping( method = RequestMethod.PUT, diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml index ce4ba1e4a4ea..65092456cbdb 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml @@ -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' diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index f3902a094da6..46e5bc929d30 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -6,6 +6,7 @@ package org.openapitools.virtualan.api; import org.openapitools.virtualan.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 281b5a0b13c4..8663f2173f1b 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -16,6 +16,7 @@ import org.openapitools.virtualan.model.OuterComposite; import org.openapitools.virtualan.model.User; import org.openapitools.virtualan.model.XmlItem; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index 3bbab83efc55..9dbe544bdf79 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -6,6 +6,7 @@ package org.openapitools.virtualan.api; import org.openapitools.virtualan.model.Client; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index d8916def975e..964f2b15f1af 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -8,6 +8,7 @@ import org.openapitools.virtualan.model.ModelApiResponse; import org.openapitools.virtualan.model.Pet; import java.util.Set; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 2fe6a209a8b9..8ad22baae595 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -7,6 +7,7 @@ import java.util.Map; import org.openapitools.virtualan.model.Order; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index 6cd881b02d55..77348a845f23 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -8,6 +8,7 @@ import java.util.List; import java.time.OffsetDateTime; import org.openapitools.virtualan.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters;