From cb514a9c0e811a4b2a79590dd7b56eebb75ade33 Mon Sep 17 00:00:00 2001 From: GlobeDaBoarder Date: Wed, 10 Jan 2024 21:32:23 +0200 Subject: [PATCH 1/5] addition: api response examples; spring's api.mustache generates response examples --- .../openapitools/codegen/DefaultCodegen.java | 16 +++- .../codegen/utils/ExamplesUtils.java | 94 +++++++++++++++++++ .../main/resources/JavaSpring/api.mustache | 15 ++- .../assertions/AbstractAnnotationAssert.java | 29 ++++++ .../java/spring/SpringCodegenTest.java | 10 ++ .../api-response-examples_issue17610.yaml | 80 ++++++++++++++++ 6 files changed, 239 insertions(+), 5 deletions(-) create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java create mode 100644 modules/openapi-generator/src/test/resources/3_0/spring/api-response-examples_issue17610.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 0eb4fa5c55d5..6795de9c9bb4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen; -import com.fasterxml.jackson.annotation.JsonCreator; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.Ticker; @@ -64,6 +63,7 @@ import org.openapitools.codegen.serializer.SerializerUtils; import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.templating.mustache.*; +import org.openapitools.codegen.utils.ExamplesUtils; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.OneOfImplementorAdditionalData; import org.slf4j.Logger; @@ -2433,6 +2433,10 @@ public Schema unaliasSchema(Schema schema) { return ModelUtils.unaliasSchema(this.openAPI, schema, schemaMapping); } + private List> unaliasExamples(Map examples){ + return ExamplesUtils.unaliasExamples(this.openAPI, examples); + } + /** * Return a string representation of the schema type, resolving aliasing and references if necessary. * @@ -4913,9 +4917,13 @@ public CodegenResponse fromResponse(String responseCode, ApiResponse response) { } r.schema = responseSchema; r.message = escapeText(response.getDescription()); - // TODO need to revise and test examples in responses - // ApiResponse does not support examples at the moment - //r.examples = toExamples(response.getExamples()); + + // adding examples to API responses + Map examples = ExamplesUtils.getExamplesFromResponse(openAPI, response); + + if (examples != null && !examples.isEmpty()) + r.examples = unaliasExamples(examples); + r.jsonSchema = Json.pretty(response); if (response.getExtensions() != null && !response.getExtensions().isEmpty()) { r.vendorExtensions.putAll(response.getExtensions()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java new file mode 100644 index 000000000000..f0185c3c48c3 --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java @@ -0,0 +1,94 @@ +package org.openapitools.codegen.utils; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.examples.Example; +import io.swagger.v3.oas.models.media.Content; +import io.swagger.v3.oas.models.media.MediaType; +import io.swagger.v3.oas.models.responses.ApiResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; + +import static org.openapitools.codegen.utils.OnceLogger.once; + +public class ExamplesUtils { + private static final Logger LOGGER = LoggerFactory.getLogger(ExamplesUtils.class); + + /** + * Return examples of API response. + * + * @param openAPI OpenAPI spec. + * @param response ApiResponse of the operation + * @return examples of API response + */ + public static Map getExamplesFromResponse(OpenAPI openAPI, ApiResponse response) { + ApiResponse result = ModelUtils.getReferencedApiResponse(openAPI, response); + if (result == null) { + return Collections.emptyMap(); + } else { + return getExamplesFromContent(result.getContent()); + } + } + + private static Map getExamplesFromContent(Content content) { + if (content == null || content.isEmpty()) { + return Collections.emptyMap(); + } + Map.Entry entry = content.entrySet().iterator().next(); + if (content.size() > 1) { + once(LOGGER).debug("Multiple API response examples found in the OAS 'content' section, returning only the first one ({})", + entry.getKey()); + } + return entry.getValue().getExamples(); + } + + + /** + * Return actual examples objects of API response with values and processed from references (unaliased) + * + * @param openapi OpenAPI spec. + * @param apiRespExamples examples of API response + * @return unaliased examples of API response + */ + public static List> unaliasExamples(OpenAPI openapi, Map apiRespExamples) { + Map actualComponentsExamples = getAllExamples(openapi); + + List> result = new ArrayList<>(); + for (Map.Entry example : apiRespExamples.entrySet()) { + try { + Map exampleRepr = new LinkedHashMap<>(); + String exampleName = ModelUtils.getSimpleRef(example.getValue().get$ref()); + + // api response example can both be a reference and specified directly in the code + // if the reference is null, we get the value directly from the example -- no unaliasing is needed + // if it isn't, we get the value from the components examples + Object exampleValue; + if(example.getValue().get$ref() != null){ + exampleValue = actualComponentsExamples.get(exampleName).getValue(); + LOGGER.trace("Unaliased example value from components examples: {}", exampleValue); + } else { + exampleValue = example.getValue().getValue(); + LOGGER.trace("Retrieved example value directly from the api response example definition: {}", exampleValue); + } + + exampleRepr.put("exampleName", exampleName); + exampleRepr.put("exampleValue", new ObjectMapper().writeValueAsString(exampleValue) + .replace("\"", "\\\"")); + + result.add(exampleRepr); + } catch (JsonProcessingException e) { + LOGGER.error("Failed to serialize example value", e); + throw new RuntimeException(e); + } + } + + return result; + } + + private static Map getAllExamples(OpenAPI openapi) { + return openapi.getComponents().getExamples(); + } +} diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index 71af750223a1..62f8d736093d 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; {{/swagger2AnnotationLibrary}} {{#swagger1AnnotationLibrary}} import io.swagger.annotations.*; @@ -171,7 +172,19 @@ public interface {{classname}} { {{#responses}} @ApiResponse(responseCode = {{#isDefault}}"default"{{/isDefault}}{{^isDefault}}"{{{code}}}"{{/isDefault}}, description = "{{{message}}}"{{#baseType}}, content = { {{#produces}} - @Content(mediaType = "{{{mediaType}}}", {{#isArray}}array = @ArraySchema({{/isArray}}schema = @Schema(implementation = {{{baseType}}}.class){{#isArray}}){{/isArray}}){{^-last}},{{/-last}} + @Content(mediaType = "{{{mediaType}}}", {{#isArray}}array = @ArraySchema({{/isArray}}schema = @Schema(implementation = {{{baseType}}}.class){{#isArray}}){{/isArray}}{{^examples.0}}{{#-last}}){{/-last}}{{^-last}}),{{/-last}}{{/examples.0}}{{#examples.0}}, examples = { + {{#examples}} + @ExampleObject( + name = "{{{exampleName}}}", + value = "{{{exampleValue}}}" + ){{^-last}},{{/-last}} + {{/examples}} + {{#-last}} + }) + {{/-last}} + {{^-last}} + }), + {{/-last}}{{/examples.0}} {{/produces}} }{{/baseType}}){{^-last}},{{/-last}} {{/responses}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java index fac2af8f7b08..92aa60aca9b0 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/AbstractAnnotationAssert.java @@ -6,6 +6,7 @@ import java.util.Objects; import java.util.stream.Collectors; +import com.github.javaparser.ast.Node; import org.assertj.core.api.ListAssert; import org.assertj.core.util.CanIgnoreReturnValue; @@ -72,4 +73,32 @@ private static boolean hasAttributes(final AnnotationExpr annotation, final Map< private ACTUAL myself() { return (ACTUAL) this; } + + public ACTUAL recursivelyContainsWithName(String name) { + super + .withFailMessage("Should have annotation with name: " + name) + .anyMatch(annotation -> containsSpecificAnnotationName(annotation, name)); + + return myself(); + } + + private boolean containsSpecificAnnotationName(Node node, String name) { + if (node == null || name == null) + return false; + + if (node instanceof AnnotationExpr) { + AnnotationExpr annotation = (AnnotationExpr) node; + + if(annotation.getNameAsString().equals(name)) + return true; + + } + + for(Node child: node.getChildNodes()){ + if(containsSpecificAnnotationName(child, name)) + return true; + } + + return false; + } } 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 1ca5bc0af9db..74538f2e1e3d 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 @@ -4427,4 +4427,14 @@ public void testMultiInheritanceParentRequiredParams_issue15796() throws IOExcep .hasParameter("race").toConstructor() ; } + + @Test + public void testExampleAnnotationGeneration_issue17610() throws IOException { + final Map generatedCodeFiles = generateFromContract("src/test/resources/3_0/spring/api-response-examples_issue17610.yaml", SPRING_BOOT); + + JavaFileAssert.assertThat(generatedCodeFiles.get("DogsApi.java")) + .assertMethod("createDog") + .assertMethodAnnotations() + .recursivelyContainsWithName("ExampleObject"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/api-response-examples_issue17610.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/api-response-examples_issue17610.yaml new file mode 100644 index 000000000000..fcbe2ebd07ee --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/spring/api-response-examples_issue17610.yaml @@ -0,0 +1,80 @@ +openapi: 3.0.3 +info: + title: No examples in annotation example API + description: No examples in annotation example API + version: 1.0.0 +servers: + - url: 'https://localhost:8080' +paths: + /dogs: + post: + summary: Create a dog + operationId: createDog + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dog' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Dog' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + examples: + dog name length: + $ref: '#/components/examples/DogNameBiggerThan50Error' + dog name contains numbers: + $ref: '#/components/examples/DogNameContainsNumbersError' + dog age negative: + $ref: '#/components/examples/DogAgeNegativeError' + +components: + schemas: + Dog: + type: object + properties: + name: + type: string + maxLength: 50 + pattern: '^[a-zA-Z]+$' + x-pattern-message: Name must contain only letters + example: 'Rex' + age: + type: integer + format: int32 + minimum: 0 + example: 5 + # NOTE: not picked up by the generator + # TODO: consider adding support for this + # example: + # name: 'Rex' + # age: 5 + Error: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + examples: + DogNameBiggerThan50Error: + value: + code: 400 + message: name size must be between 0 and 50 + DogNameContainsNumbersError: + value: + code: 400 + message: Name must contain only letters + DogAgeNegativeError: + value: + code: 400 + message: age must be greater than or equal to 0 \ No newline at end of file From 6ecd3366be7c977da85709dfd87ce0b734e7cf97 Mon Sep 17 00:00:00 2001 From: GlobeDaBoarder Date: Sun, 14 Jan 2024 14:05:37 +0200 Subject: [PATCH 2/5] update samples --- .../java/apache-httpclient/api/openapi.yaml | 14 +- .../java/feign-no-nullable/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 20 +-- .../org/openapitools/client/api/StoreApi.java | 8 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../petstore/java/feign/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 20 +-- .../org/openapitools/client/api/StoreApi.java | 8 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../java/google-api-client/api/openapi.yaml | 14 +- .../api/openapi.yaml | 14 +- .../java/jersey2-java8/api/openapi.yaml | 14 +- .../petstore/java/jersey3/api/openapi.yaml | 14 +- .../java/native-async/api/openapi.yaml | 14 +- .../java/native-jakarta/api/openapi.yaml | 18 +-- .../petstore/java/native/api/openapi.yaml | 14 +- .../okhttp-gson-3.1/.openapi-generator/FILES | 2 - .../petstore/java/okhttp-gson-3.1/README.md | 1 - .../java/okhttp-gson-3.1/api/openapi.yaml | 145 ++++++------------ .../java/okhttp-gson-3.1/docs/Animal.md | 4 +- .../java/okhttp-gson-3.1/docs/AnyTypeTest.md | 2 +- .../petstore/java/okhttp-gson-3.1/docs/Cat.md | 2 +- .../java/okhttp-gson-3.1/docs/Category.md | 4 +- .../okhttp-gson-3.1/docs/ModelApiResponse.md | 6 +- .../java/okhttp-gson-3.1/docs/Order.md | 10 +- .../petstore/java/okhttp-gson-3.1/docs/Pet.md | 8 +- .../petstore/java/okhttp-gson-3.1/docs/Tag.md | 4 +- .../java/okhttp-gson-3.1/docs/User.md | 16 +- .../java/org/openapitools/client/JSON.java | 1 - .../org/openapitools/client/model/Animal.java | 30 ++-- .../client/model/AnyTypeTest.java | 22 +-- .../org/openapitools/client/model/Cat.java | 20 ++- .../openapitools/client/model/Category.java | 31 ++-- .../org/openapitools/client/model/Dog.java | 12 ++ .../client/model/ModelApiResponse.java | 42 ++--- .../client/model/OneOfStringOrInt.java | 50 +++--- .../org/openapitools/client/model/Order.java | 72 +++++---- .../org/openapitools/client/model/Pet.java | 109 +++++-------- .../org/openapitools/client/model/Tag.java | 31 ++-- .../org/openapitools/client/model/User.java | 94 ++++++------ .../api/openapi.yaml | 18 +-- .../src/main/resources/openapi/openapi.yaml | 14 +- .../api/openapi.yaml | 10 +- .../api/openapi.yaml | 14 +- .../api/openapi.yaml | 14 +- .../okhttp-gson-swagger1/api/openapi.yaml | 18 +-- .../okhttp-gson-swagger2/api/openapi.yaml | 18 +-- .../java/okhttp-gson/api/openapi.yaml | 14 +- .../rest-assured-jackson/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 6 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../org/openapitools/client/api/UserApi.java | 4 +- .../java/rest-assured/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 6 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../org/openapitools/client/api/UserApi.java | 4 +- .../petstore/java/resteasy/api/openapi.yaml | 14 +- .../resttemplate-jakarta/api/openapi.yaml | 18 +-- .../resttemplate-swagger1/api/openapi.yaml | 18 +-- .../resttemplate-swagger2/api/openapi.yaml | 18 +-- .../resttemplate-withXml/api/openapi.yaml | 14 +- .../java/resttemplate/api/openapi.yaml | 14 +- .../java/retrofit2-play26/api/openapi.yaml | 14 +- .../petstore/java/retrofit2/api/openapi.yaml | 14 +- .../java/retrofit2rx2/api/openapi.yaml | 14 +- .../java/retrofit2rx3/api/openapi.yaml | 14 +- .../java/vertx-no-nullable/api/openapi.yaml | 14 +- .../petstore/java/vertx/api/openapi.yaml | 14 +- .../java/webclient-jakarta/api/openapi.yaml | 14 +- .../java/webclient-swagger2/api/openapi.yaml | 14 +- .../petstore/java/webclient/api/openapi.yaml | 14 +- .../java/org/openapitools/api/PetApi.java | 7 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/PetController.java | 6 +- .../org/openapitools/api/StoreController.java | 4 +- .../org/openapitools/api/UserController.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../jersey2-java8-swagger1/api/openapi.yaml | 18 +-- .../jersey2-java8-swagger2/api/openapi.yaml | 18 +-- .../java/jersey2-java8/api/openapi.yaml | 14 +- .../petstore/python-aiohttp/docs/ArrayTest.md | 2 +- .../python-aiohttp/docs/NullableClass.md | 8 +- .../petstore_api/models/array_test.py | 2 +- .../petstore_api/models/nullable_class.py | 8 +- .../client/petstore/python/docs/ArrayTest.md | 2 +- .../petstore/python/docs/NullableClass.md | 8 +- .../python/petstore_api/models/array_test.py | 2 +- .../petstore_api/models/nullable_class.py | 8 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 11 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 11 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/DefaultApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 3 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTags123Api.java | 1 + .../java/org/openapitools/api/PetApi.java | 7 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 7 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 11 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 11 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/PetApi.java | 11 +- .../java/org/openapitools/api/StoreApi.java | 5 +- .../java/org/openapitools/api/UserApi.java | 5 +- .../java/org/openapitools/api/BarApi.java | 1 + .../java/org/openapitools/api/FooApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 18 +-- .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 18 +-- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 14 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/META-INF/openapi.yml | 14 +- .../src/main/resources/META-INF/openapi.yml | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 2 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../java-play-framework/public/openapi.json | 14 +- .../src/main/resources/config/openapi.json | 18 +-- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/resources/META-INF/openapi.yaml | 14 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 14 +- .../org/openapitools/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/api/FakeApi.java | 1 + .../api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/api/PetApi.java | 1 + .../java/org/openapitools/api/StoreApi.java | 1 + .../java/org/openapitools/api/UserApi.java | 1 + .../org/openapitools/api/NullableApi.java | 1 + .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../java/org/openapitools/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 14 +- .../virtualan/api/AnotherFakeApi.java | 1 + .../openapitools/virtualan/api/FakeApi.java | 1 + .../virtualan/api/FakeClassnameTestApi.java | 1 + .../openapitools/virtualan/api/PetApi.java | 1 + .../openapitools/virtualan/api/StoreApi.java | 1 + .../openapitools/virtualan/api/UserApi.java | 1 + .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- 208 files changed, 1186 insertions(+), 1156 deletions(-) diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java index 5903156bae08..f9524104c9f9 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,7 +83,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) List findPetsByStatus(@Param("status") List status); @@ -96,7 +96,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByStatusWithHttpInfo(@Param("status") List status); @@ -118,7 +118,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) List findPetsByStatus(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -136,7 +136,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -162,7 +162,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Set findPetsByTags(@Param("tags") Set tags); @@ -177,7 +177,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByTagsWithHttpInfo(@Param("tags") Set tags); @@ -201,7 +201,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Set findPetsByTags(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -221,7 +221,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -245,7 +245,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Pet getPetById(@Param("petId") Long petId); @@ -258,7 +258,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getPetByIdWithHttpInfo(@Param("petId") Long petId); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java index b6c2b9c1f67c..e88030d0db43 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java @@ -74,7 +74,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Order getOrderById(@Param("orderId") Long orderId); @@ -87,7 +87,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getOrderByIdWithHttpInfo(@Param("orderId") Long orderId); @@ -102,7 +102,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: */*", - "Accept: application/json,application/xml", + "Accept: application/json", }) Order placeOrder(Order body); @@ -116,7 +116,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: */*", - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse placeOrderWithHttpInfo(Order body); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java index 6098c23db15f..07a260168578 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java @@ -131,7 +131,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) User getUserByName(@Param("username") String username); @@ -144,7 +144,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getUserByNameWithHttpInfo(@Param("username") String username); @@ -159,7 +159,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) String loginUser(@Param("username") String username, @Param("password") String password); @@ -173,7 +173,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password); @@ -196,7 +196,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) String loginUser(@QueryMap(encoded=true) LoginUserQueryParams queryParams); @@ -215,7 +215,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse loginUserWithHttpInfo(@QueryMap(encoded=true) LoginUserQueryParams queryParams); diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index b2da825ffdaf..9a6c3da5e77d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,7 +83,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) List findPetsByStatus(@Param("status") List status); @@ -96,7 +96,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByStatusWithHttpInfo(@Param("status") List status); @@ -118,7 +118,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) List findPetsByStatus(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -136,7 +136,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -162,7 +162,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Set findPetsByTags(@Param("tags") Set tags); @@ -177,7 +177,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByTagsWithHttpInfo(@Param("tags") Set tags); @@ -201,7 +201,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Set findPetsByTags(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -221,7 +221,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -245,7 +245,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Pet getPetById(@Param("petId") Long petId); @@ -258,7 +258,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getPetByIdWithHttpInfo(@Param("petId") Long petId); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index 15d02d6d952b..7a4bfd120f11 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -74,7 +74,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) Order getOrderById(@Param("orderId") Long orderId); @@ -87,7 +87,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getOrderByIdWithHttpInfo(@Param("orderId") Long orderId); @@ -102,7 +102,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: application/json", - "Accept: application/json,application/xml", + "Accept: application/json", }) Order placeOrder(Order order); @@ -116,7 +116,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: application/json", - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse placeOrderWithHttpInfo(Order order); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java index 404290d569a8..b2a98b3df016 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java @@ -131,7 +131,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) User getUserByName(@Param("username") String username); @@ -144,7 +144,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse getUserByNameWithHttpInfo(@Param("username") String username); @@ -159,7 +159,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) String loginUser(@Param("username") String username, @Param("password") String password); @@ -173,7 +173,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password); @@ -196,7 +196,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) String loginUser(@QueryMap(encoded=true) LoginUserQueryParams queryParams); @@ -215,7 +215,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json,application/xml", + "Accept: application/json", }) ApiResponse loginUserWithHttpInfo(@QueryMap(encoded=true) LoginUserQueryParams queryParams); diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index 8f79a7c4c5a8..814354567b04 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 048456607eb6..07a440cfe9dc 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native-jakarta/api/openapi.yaml b/samples/client/petstore/java/native-jakarta/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/native-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/native-jakarta/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 048456607eb6..07a440cfe9dc 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES index 5ba46e594fb5..f752384599d8 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES @@ -18,7 +18,6 @@ docs/Order.md docs/Pet.md docs/PetApi.md docs/StoreApi.md -docs/StringOrInt.md docs/Tag.md docs/User.md docs/UserApi.md @@ -67,6 +66,5 @@ src/main/java/org/openapitools/client/model/ModelApiResponse.java src/main/java/org/openapitools/client/model/OneOfStringOrInt.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/Pet.java -src/main/java/org/openapitools/client/model/StringOrInt.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/okhttp-gson-3.1/README.md b/samples/client/petstore/java/okhttp-gson-3.1/README.md index cb3486b20fb6..35d517693aa9 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/README.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/README.md @@ -152,7 +152,6 @@ Class | Method | HTTP request | Description - [OneOfStringOrInt](docs/OneOfStringOrInt.md) - [Order](docs/Order.md) - [Pet](docs/Pet.md) - - [StringOrInt](docs/StringOrInt.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml index 5816eb63139e..3bef14f1df3f 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -340,7 +340,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -397,7 +397,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -511,7 +511,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -578,7 +578,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser @@ -744,138 +744,106 @@ components: Order: description: An order for a pets from the pet store example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed + petId: "" + quantity: "" + id: "" + shipDate: "" + complete: "" + status: "" properties: id: format: int64 - type: integer petId: format: int64 - type: integer quantity: format: int32 - type: integer shipDate: format: date-time - type: string status: description: Order Status enum: - placed - approved - delivered - type: string complete: default: false - type: boolean title: Pet Order xml: name: Order Category: description: A category for a pet example: - name: name - id: 6 + name: "" + id: "" properties: id: format: int64 - type: integer name: pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" - type: string title: Pet category xml: name: Category User: description: A User who is purchasing from the pet store example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username + firstName: "" + lastName: "" + password: "" + userStatus: "" + phone: "" + id: "" + email: "" + username: "" properties: id: format: int64 - type: integer - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string + username: {} + firstName: {} + lastName: {} + email: {} + password: {} + phone: {} userStatus: description: User Status format: int32 - type: integer title: a User xml: name: User Tag: description: A tag for a pet - example: - name: name - id: 1 properties: id: format: int64 - type: integer - name: - type: string + name: {} title: Pet Tag xml: name: Tag Pet: description: A pet for sale in the pet store example: - photoUrls: - - photoUrls - - photoUrls + photoUrls: "" name: doggie - id: 0 + id: "" category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available + name: "" + id: "" + tags: "" + status: "" properties: id: format: int64 - type: integer category: $ref: '#/components/schemas/Category' name: example: doggie - type: string photoUrls: - items: - type: string - type: array + items: {} xml: name: photoUrl wrapped: true tags: items: $ref: '#/components/schemas/Tag' - type: array xml: name: tag wrapped: true @@ -886,7 +854,6 @@ components: - available - pending - sold - type: string required: - name - photoUrls @@ -896,29 +863,22 @@ components: ApiResponse: description: Describes the result of uploading an image resource example: - code: 0 - type: type - message: message + code: "" + type: "" + message: "" properties: code: format: int32 - type: integer - type: - type: string - message: - type: string + type: {} + message: {} title: An uploaded response StringOrInt: - anyOf: - - type: string - - format: int32 - type: integer description: string or int OneOfStringOrInt: description: string or int (onefOf) oneOf: - type: string - - type: integer + - {} Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -929,17 +889,14 @@ components: allOf: - $ref: '#/components/schemas/Animal' - properties: - declawed: - type: boolean + declawed: {} Animal: discriminator: propertyName: className properties: - className: - type: string + className: {} color: default: red - type: string required: - className simple_text: @@ -951,17 +908,13 @@ components: description: test array in 3.1 spec items: type: string - type: array HTTPValidationError: properties: {} title: HTTPValidationError - type: object AnyOfArray: anyOf: - - items: - type: string - - items: - type: integer + - items: {} + - items: {} updatePetWithForm_request: properties: name: diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md index d9b32f14c88a..79206dd6e28c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**className** | **String** | | | -|**color** | **String** | | [optional] | +|**className** | **Object** | | | +|**color** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md index 7c46d45edb4d..82fec4a0a5ed 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**anyTypeProperty** | **Object** | | [optional] | -|**arrayProp** | **List<String>** | test array in 3.1 spec | [optional] | +|**arrayProp** | **Object** | test array in 3.1 spec | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md index 390dd519c8ce..545c4f78c3aa 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | +|**declawed** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md index a7fc939d252e..1a3cbfcc5e38 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md @@ -8,8 +8,8 @@ A category for a pet | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**name** | **String** | | [optional] | +|**id** | **Object** | | [optional] | +|**name** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md index cd7e3c400be6..d476e3a42aab 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md @@ -8,9 +8,9 @@ Describes the result of uploading an image resource | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | | [optional] | -|**type** | **String** | | [optional] | -|**message** | **String** | | [optional] | +|**code** | **Object** | | [optional] | +|**type** | **Object** | | [optional] | +|**message** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md index 0c33059b8b6a..2d80a0d37fb8 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md @@ -8,12 +8,12 @@ An order for a pets from the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**petId** | **Long** | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**shipDate** | **OffsetDateTime** | | [optional] | +|**id** | **Object** | | [optional] | +|**petId** | **Object** | | [optional] | +|**quantity** | **Object** | | [optional] | +|**shipDate** | **Object** | | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | -|**complete** | **Boolean** | | [optional] | +|**complete** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md index 8bb363301232..b69b3b537404 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md @@ -8,11 +8,11 @@ A pet for sale in the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | +|**id** | **Object** | | [optional] | |**category** | [**Category**](Category.md) | | [optional] | -|**name** | **String** | | | -|**photoUrls** | **List<String>** | | | -|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**name** | **Object** | | | +|**photoUrls** | **Object** | | | +|**tags** | **Object** | | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md index abfde4afb501..6b5547b120b7 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md @@ -8,8 +8,8 @@ A tag for a pet | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**name** | **String** | | [optional] | +|**id** | **Object** | | [optional] | +|**name** | **Object** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md index 426845227bd3..02cacc0b6aaf 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md @@ -8,14 +8,14 @@ A User who is purchasing from the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**username** | **String** | | [optional] | -|**firstName** | **String** | | [optional] | -|**lastName** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**password** | **String** | | [optional] | -|**phone** | **String** | | [optional] | -|**userStatus** | **Integer** | User Status | [optional] | +|**id** | **Object** | | [optional] | +|**username** | **Object** | | [optional] | +|**firstName** | **Object** | | [optional] | +|**lastName** | **Object** | | [optional] | +|**email** | **Object** | | [optional] | +|**password** | **Object** | | [optional] | +|**phone** | **Object** | | [optional] | +|**userStatus** | **Object** | User Status | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java index 72223340f53d..c30fa9e523d0 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java @@ -138,7 +138,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OneOfStringOrInt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Order.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StringOrInt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Tag.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.User.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java index e93327f47e76..e4d09f656104 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,17 +54,17 @@ public class Animal { public static final String SERIALIZED_NAME_CLASS_NAME = "className"; @SerializedName(SERIALIZED_NAME_CLASS_NAME) - protected String className; + protected Object className = null; public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private String color = "red"; + private Object color = red; public Animal() { this.className = this.getClass().getSimpleName(); } - public Animal className(String className) { + public Animal className(Object className) { this.className = className; return this; } @@ -72,17 +73,17 @@ public Animal className(String className) { * Get className * @return className **/ - @javax.annotation.Nonnull - public String getClassName() { + @javax.annotation.Nullable + public Object getClassName() { return className; } - public void setClassName(String className) { + public void setClassName(Object className) { this.className = className; } - public Animal color(String color) { + public Animal color(Object color) { this.color = color; return this; } @@ -92,11 +93,11 @@ public Animal color(String color) { * @return color **/ @javax.annotation.Nullable - public String getColor() { + public Object getColor() { return color; } - public void setColor(String color) { + public void setColor(Object color) { this.color = color; } @@ -160,11 +161,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, animal.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(className, color, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java index 30d571e2cdc8..cd1b0f6169e5 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java @@ -20,9 +20,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -60,7 +58,7 @@ public class AnyTypeTest { public static final String SERIALIZED_NAME_ARRAY_PROP = "array_prop"; @SerializedName(SERIALIZED_NAME_ARRAY_PROP) - private List arrayProp; + private Object arrayProp = null; public AnyTypeTest() { } @@ -84,29 +82,21 @@ public void setAnyTypeProperty(Object anyTypeProperty) { } - public AnyTypeTest arrayProp(List arrayProp) { + public AnyTypeTest arrayProp(Object arrayProp) { this.arrayProp = arrayProp; return this; } - public AnyTypeTest addArrayPropItem(String arrayPropItem) { - if (this.arrayProp == null) { - this.arrayProp = new ArrayList<>(); - } - this.arrayProp.add(arrayPropItem); - return this; - } - /** * test array in 3.1 spec * @return arrayProp **/ @javax.annotation.Nullable - public List getArrayProp() { + public Object getArrayProp() { return arrayProp; } - public void setArrayProp(List arrayProp) { + public void setArrayProp(Object arrayProp) { this.arrayProp = arrayProp; } @@ -235,10 +225,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("array_prop") != null && !jsonObj.get("array_prop").isJsonNull() && !jsonObj.get("array_prop").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `array_prop` to be an array in the JSON string but got `%s`", jsonObj.get("array_prop").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java index 876f2c52bb26..b400a874c4e9 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,13 +55,13 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Boolean declawed; + private Object declawed = null; public Cat() { this.className = this.getClass().getSimpleName(); } - public Cat declawed(Boolean declawed) { + public Cat declawed(Object declawed) { this.declawed = declawed; return this; } @@ -70,11 +71,11 @@ public Cat declawed(Boolean declawed) { * @return declawed **/ @javax.annotation.Nullable - public Boolean getDeclawed() { + public Object getDeclawed() { return declawed; } - public void setDeclawed(Boolean declawed) { + public void setDeclawed(Object declawed) { this.declawed = declawed; } @@ -138,11 +139,22 @@ public boolean equals(Object o) { super.equals(o); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(declawed, super.hashCode(), additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java index f12855dae504..bfacb4af2974 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,16 +54,16 @@ public class Category { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Long id; + private Object id = null; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private String name; + private Object name = null; public Category() { } - public Category id(Long id) { + public Category id(Object id) { this.id = id; return this; } @@ -72,16 +73,16 @@ public Category id(Long id) { * @return id **/ @javax.annotation.Nullable - public Long getId() { + public Object getId() { return id; } - public void setId(Long id) { + public void setId(Object id) { this.id = id; } - public Category name(String name) { + public Category name(Object name) { this.name = name; return this; } @@ -91,11 +92,11 @@ public Category name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { + public Object getName() { return name; } - public void setName(String name) { + public void setName(Object name) { this.name = name; } @@ -159,11 +160,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, category.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, name, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -213,9 +225,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java index 52f9e1adea2a..671bfe24f7c4 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.Animal; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -138,11 +139,22 @@ public boolean equals(Object o) { super.equals(o); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(breed, super.hashCode(), additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 59645dcffcc2..39fc2d56905a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,20 +54,20 @@ public class ModelApiResponse { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; + private Object code = null; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private String type; + private Object type = null; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; + private Object message = null; public ModelApiResponse() { } - public ModelApiResponse code(Integer code) { + public ModelApiResponse code(Object code) { this.code = code; return this; } @@ -76,16 +77,16 @@ public ModelApiResponse code(Integer code) { * @return code **/ @javax.annotation.Nullable - public Integer getCode() { + public Object getCode() { return code; } - public void setCode(Integer code) { + public void setCode(Object code) { this.code = code; } - public ModelApiResponse type(String type) { + public ModelApiResponse type(Object type) { this.type = type; return this; } @@ -95,16 +96,16 @@ public ModelApiResponse type(String type) { * @return type **/ @javax.annotation.Nullable - public String getType() { + public Object getType() { return type; } - public void setType(String type) { + public void setType(Object type) { this.type = type; } - public ModelApiResponse message(String message) { + public ModelApiResponse message(Object message) { this.message = message; return this; } @@ -114,11 +115,11 @@ public ModelApiResponse message(String message) { * @return message **/ @javax.annotation.Nullable - public String getMessage() { + public Object getMessage() { return message; } - public void setMessage(String message) { + public void setMessage(Object message) { this.message = message; } @@ -183,11 +184,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, _apiResponse.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(code, type, message, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -239,12 +251,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java index 12dfabf77564..4da4e790e613 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java @@ -63,7 +63,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); - final TypeAdapter adapterInteger = gson.getDelegateAdapter(this, TypeToken.get(Integer.class)); + final TypeAdapter adapterObject = gson.getDelegateAdapter(this, TypeToken.get(Object.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -79,13 +79,13 @@ public void write(JsonWriter out, OneOfStringOrInt value) throws IOException { elementAdapter.write(out, primitive); return; } - // check if the actual instance is of the type `Integer` - if (value.getActualInstance() instanceof Integer) { - JsonPrimitive primitive = adapterInteger.toJsonTree((Integer)value.getActualInstance()).getAsJsonPrimitive(); + // check if the actual instance is of the type `Object` + if (value.getActualInstance() instanceof Object) { + JsonPrimitive primitive = adapterObject.toJsonTree((Object)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Integer, String"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Object, String"); } @Override @@ -111,19 +111,19 @@ public OneOfStringOrInt read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'String'", e); } - // deserialize Integer + // deserialize Object try { // validate the JSON object to see if any exception is thrown if(!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } - actualAdapter = adapterInteger; + actualAdapter = adapterObject; match++; - log.log(Level.FINER, "Input data matches schema 'Integer'"); + log.log(Level.FINER, "Input data matches schema 'Object'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Integer'", e); + errorMessages.add(String.format("Deserialization for Object failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Object'", e); } if (match == 1) { @@ -145,7 +145,7 @@ public OneOfStringOrInt() { super("oneOf", Boolean.FALSE); } - public OneOfStringOrInt(Integer o) { + public OneOfStringOrInt(Object o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } @@ -157,7 +157,7 @@ public OneOfStringOrInt(String o) { static { schemas.put("String", String.class); - schemas.put("Integer", Integer.class); + schemas.put("Object", Object.class); } @Override @@ -168,7 +168,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Integer, String + * Object, String * * It could be an instance of the 'oneOf' schemas. */ @@ -179,19 +179,19 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof Integer) { + if (instance instanceof Object) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Integer, String"); + throw new RuntimeException("Invalid instance type. Must be Object, String"); } /** * Get the actual instance, which can be the following: - * Integer, String + * Object, String * - * @return The actual instance (Integer, String) + * @return The actual instance (Object, String) */ @Override public Object getActualInstance() { @@ -209,14 +209,14 @@ public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** - * Get the actual instance of `Integer`. If the actual instance is not `Integer`, + * Get the actual instance of `Object`. If the actual instance is not `Object`, * the ClassCastException will be thrown. * - * @return The actual instance of `Integer` - * @throws ClassCastException if the instance is not `Integer` + * @return The actual instance of `Object` + * @throws ClassCastException if the instance is not `Object` */ - public Integer getInteger() throws ClassCastException { - return (Integer)super.getActualInstance(); + public Object getObject() throws ClassCastException { + return (Object)super.getActualInstance(); } /** @@ -239,18 +239,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Integer + // validate the json string with Object try { if(!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Object failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for OneOfStringOrInt with oneOf schemas: Integer, String. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for OneOfStringOrInt with oneOf schemas: Object, String. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java index 53a96c763a7c..290f1b323e07 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java @@ -20,8 +20,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,19 +54,19 @@ public class Order { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Long id; + private Object id = null; public static final String SERIALIZED_NAME_PET_ID = "petId"; @SerializedName(SERIALIZED_NAME_PET_ID) - private Long petId; + private Object petId = null; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) - private Integer quantity; + private Object quantity = null; public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate"; @SerializedName(SERIALIZED_NAME_SHIP_DATE) - private OffsetDateTime shipDate; + private Object shipDate = null; /** * Order Status @@ -79,13 +79,13 @@ public enum StatusEnum { DELIVERED("delivered"); - private String value; + private Object value; - StatusEnum(String value) { + StatusEnum(Object value) { this.value = value; } - public String getValue() { + public Object getValue() { return value; } @@ -94,13 +94,13 @@ public String toString() { return String.valueOf(value); } - public static StatusEnum fromValue(String value) { + public static StatusEnum fromValue(Object value) { for (StatusEnum b : StatusEnum.values()) { if (b.value.equals(value)) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -111,29 +111,29 @@ public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) thr @Override public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); + Object value = jsonReader.nextObject(); return StatusEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); + Object value = jsonElement.getAsObject(); StatusEnum.fromValue(value); } } public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; + private StatusEnum status = null; public static final String SERIALIZED_NAME_COMPLETE = "complete"; @SerializedName(SERIALIZED_NAME_COMPLETE) - private Boolean complete = false; + private Object complete = false; public Order() { } - public Order id(Long id) { + public Order id(Object id) { this.id = id; return this; } @@ -143,16 +143,16 @@ public Order id(Long id) { * @return id **/ @javax.annotation.Nullable - public Long getId() { + public Object getId() { return id; } - public void setId(Long id) { + public void setId(Object id) { this.id = id; } - public Order petId(Long petId) { + public Order petId(Object petId) { this.petId = petId; return this; } @@ -162,16 +162,16 @@ public Order petId(Long petId) { * @return petId **/ @javax.annotation.Nullable - public Long getPetId() { + public Object getPetId() { return petId; } - public void setPetId(Long petId) { + public void setPetId(Object petId) { this.petId = petId; } - public Order quantity(Integer quantity) { + public Order quantity(Object quantity) { this.quantity = quantity; return this; } @@ -181,16 +181,16 @@ public Order quantity(Integer quantity) { * @return quantity **/ @javax.annotation.Nullable - public Integer getQuantity() { + public Object getQuantity() { return quantity; } - public void setQuantity(Integer quantity) { + public void setQuantity(Object quantity) { this.quantity = quantity; } - public Order shipDate(OffsetDateTime shipDate) { + public Order shipDate(Object shipDate) { this.shipDate = shipDate; return this; } @@ -200,11 +200,11 @@ public Order shipDate(OffsetDateTime shipDate) { * @return shipDate **/ @javax.annotation.Nullable - public OffsetDateTime getShipDate() { + public Object getShipDate() { return shipDate; } - public void setShipDate(OffsetDateTime shipDate) { + public void setShipDate(Object shipDate) { this.shipDate = shipDate; } @@ -228,7 +228,7 @@ public void setStatus(StatusEnum status) { } - public Order complete(Boolean complete) { + public Order complete(Object complete) { this.complete = complete; return this; } @@ -238,11 +238,11 @@ public Order complete(Boolean complete) { * @return complete **/ @javax.annotation.Nullable - public Boolean getComplete() { + public Object getComplete() { return complete; } - public void setComplete(Boolean complete) { + public void setComplete(Object complete) { this.complete = complete; } @@ -310,11 +310,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, order.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, petId, quantity, shipDate, status, complete, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -372,9 +383,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { StatusEnum.validateJsonElement(jsonObj.get("status")); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java index 9d0e1e017afa..9fb92dc5c76f 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java @@ -20,11 +20,9 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -57,7 +55,7 @@ public class Pet { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Long id; + private Object id = null; public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) @@ -65,15 +63,15 @@ public class Pet { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private String name; + private Object name = null; public static final String SERIALIZED_NAME_PHOTO_URLS = "photoUrls"; @SerializedName(SERIALIZED_NAME_PHOTO_URLS) - private List photoUrls = new ArrayList<>(); + private Object photoUrls = null; public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; + private Object tags = null; /** * pet status in the store @@ -86,13 +84,13 @@ public enum StatusEnum { SOLD("sold"); - private String value; + private Object value; - StatusEnum(String value) { + StatusEnum(Object value) { this.value = value; } - public String getValue() { + public Object getValue() { return value; } @@ -101,13 +99,13 @@ public String toString() { return String.valueOf(value); } - public static StatusEnum fromValue(String value) { + public static StatusEnum fromValue(Object value) { for (StatusEnum b : StatusEnum.values()) { if (b.value.equals(value)) { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } public static class Adapter extends TypeAdapter { @@ -118,13 +116,13 @@ public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) thr @Override public StatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); + Object value = jsonReader.nextObject(); return StatusEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); + Object value = jsonElement.getAsObject(); StatusEnum.fromValue(value); } } @@ -132,12 +130,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATUS = "status"; @Deprecated @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status; + private StatusEnum status = null; public Pet() { } - public Pet id(Long id) { + public Pet id(Object id) { this.id = id; return this; } @@ -147,11 +145,11 @@ public Pet id(Long id) { * @return id **/ @javax.annotation.Nullable - public Long getId() { + public Object getId() { return id; } - public void setId(Long id) { + public void setId(Object id) { this.id = id; } @@ -175,7 +173,7 @@ public void setCategory(Category category) { } - public Pet name(String name) { + public Pet name(Object name) { this.name = name; return this; } @@ -184,66 +182,50 @@ public Pet name(String name) { * Get name * @return name **/ - @javax.annotation.Nonnull - public String getName() { + @javax.annotation.Nullable + public Object getName() { return name; } - public void setName(String name) { + public void setName(Object name) { this.name = name; } - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(Object photoUrls) { this.photoUrls = photoUrls; return this; } - public Pet addPhotoUrlsItem(String photoUrlsItem) { - if (this.photoUrls == null) { - this.photoUrls = new ArrayList<>(); - } - this.photoUrls.add(photoUrlsItem); - return this; - } - /** * Get photoUrls * @return photoUrls **/ - @javax.annotation.Nonnull - public List getPhotoUrls() { + @javax.annotation.Nullable + public Object getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(Object photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(List tags) { + public Pet tags(Object tags) { this.tags = tags; return this; } - public Pet addTagsItem(Tag tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - /** * Get tags * @return tags **/ @javax.annotation.Nullable - public List getTags() { + public Object getTags() { return tags; } - public void setTags(List tags) { + public void setTags(Object tags) { this.tags = tags; } @@ -334,11 +316,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, pet.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, category, name, photoUrls, tags, status, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -409,32 +402,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) { Category.validateJsonElement(jsonObj.get("category")); } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the required json array is present - if (jsonObj.get("photoUrls") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("photoUrls").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); - } - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { - JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); - if (jsonArraytags != null) { - // ensure the json data is an array - if (!jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } - - // validate the optional field `tags` (array) - for (int i = 0; i < jsonArraytags.size(); i++) { - Tag.validateJsonElement(jsonArraytags.get(i)); - }; - } - } - if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { StatusEnum.validateJsonElement(jsonObj.get("status")); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java index bae59a3dedb3..e6cdc735d261 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,16 +54,16 @@ public class Tag { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Long id; + private Object id = null; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private String name; + private Object name = null; public Tag() { } - public Tag id(Long id) { + public Tag id(Object id) { this.id = id; return this; } @@ -72,16 +73,16 @@ public Tag id(Long id) { * @return id **/ @javax.annotation.Nullable - public Long getId() { + public Object getId() { return id; } - public void setId(Long id) { + public void setId(Object id) { this.id = id; } - public Tag name(String name) { + public Tag name(Object name) { this.name = name; return this; } @@ -91,11 +92,11 @@ public Tag name(String name) { * @return name **/ @javax.annotation.Nullable - public String getName() { + public Object getName() { return name; } - public void setName(String name) { + public void setName(Object name) { this.name = name; } @@ -159,11 +160,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, tag.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, name, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -213,9 +225,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java index 157f92c49599..b169bb1027d3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -53,40 +54,40 @@ public class User { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Long id; + private Object id = null; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) - private String username; + private Object username = null; public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private String firstName; + private Object firstName = null; public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; @SerializedName(SERIALIZED_NAME_LAST_NAME) - private String lastName; + private Object lastName = null; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; + private Object email = null; public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; + private Object password = null; public static final String SERIALIZED_NAME_PHONE = "phone"; @SerializedName(SERIALIZED_NAME_PHONE) - private String phone; + private Object phone = null; public static final String SERIALIZED_NAME_USER_STATUS = "userStatus"; @SerializedName(SERIALIZED_NAME_USER_STATUS) - private Integer userStatus; + private Object userStatus = null; public User() { } - public User id(Long id) { + public User id(Object id) { this.id = id; return this; } @@ -96,16 +97,16 @@ public User id(Long id) { * @return id **/ @javax.annotation.Nullable - public Long getId() { + public Object getId() { return id; } - public void setId(Long id) { + public void setId(Object id) { this.id = id; } - public User username(String username) { + public User username(Object username) { this.username = username; return this; } @@ -115,16 +116,16 @@ public User username(String username) { * @return username **/ @javax.annotation.Nullable - public String getUsername() { + public Object getUsername() { return username; } - public void setUsername(String username) { + public void setUsername(Object username) { this.username = username; } - public User firstName(String firstName) { + public User firstName(Object firstName) { this.firstName = firstName; return this; } @@ -134,16 +135,16 @@ public User firstName(String firstName) { * @return firstName **/ @javax.annotation.Nullable - public String getFirstName() { + public Object getFirstName() { return firstName; } - public void setFirstName(String firstName) { + public void setFirstName(Object firstName) { this.firstName = firstName; } - public User lastName(String lastName) { + public User lastName(Object lastName) { this.lastName = lastName; return this; } @@ -153,16 +154,16 @@ public User lastName(String lastName) { * @return lastName **/ @javax.annotation.Nullable - public String getLastName() { + public Object getLastName() { return lastName; } - public void setLastName(String lastName) { + public void setLastName(Object lastName) { this.lastName = lastName; } - public User email(String email) { + public User email(Object email) { this.email = email; return this; } @@ -172,16 +173,16 @@ public User email(String email) { * @return email **/ @javax.annotation.Nullable - public String getEmail() { + public Object getEmail() { return email; } - public void setEmail(String email) { + public void setEmail(Object email) { this.email = email; } - public User password(String password) { + public User password(Object password) { this.password = password; return this; } @@ -191,16 +192,16 @@ public User password(String password) { * @return password **/ @javax.annotation.Nullable - public String getPassword() { + public Object getPassword() { return password; } - public void setPassword(String password) { + public void setPassword(Object password) { this.password = password; } - public User phone(String phone) { + public User phone(Object phone) { this.phone = phone; return this; } @@ -210,16 +211,16 @@ public User phone(String phone) { * @return phone **/ @javax.annotation.Nullable - public String getPhone() { + public Object getPhone() { return phone; } - public void setPhone(String phone) { + public void setPhone(Object phone) { this.phone = phone; } - public User userStatus(Integer userStatus) { + public User userStatus(Object userStatus) { this.userStatus = userStatus; return this; } @@ -229,11 +230,11 @@ public User userStatus(Integer userStatus) { * @return userStatus **/ @javax.annotation.Nullable - public Integer getUserStatus() { + public Object getUserStatus() { return userStatus; } - public void setUserStatus(Integer userStatus) { + public void setUserStatus(Object userStatus) { this.userStatus = userStatus; } @@ -303,11 +304,22 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, user.additionalProperties); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, additionalProperties); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -369,24 +381,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); - } - if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); - } - if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); - } - if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml index 70db220038f2..143c6a5c94c8 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" operationId: updatePet @@ -76,7 +76,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -120,7 +120,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -160,7 +160,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml index 59e9322aadf4..d03b14c6dae7 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml @@ -101,7 +101,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -141,7 +141,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -206,7 +206,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -319,7 +319,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -376,7 +376,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -490,7 +490,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -557,7 +557,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser 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 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 6479fd9a5473..f6a9c90eaaf4 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -137,7 +137,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -243,7 +243,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -356,7 +356,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -413,7 +413,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -575,7 +575,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java index e703a9ec3098..2bebdbf853cd 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java @@ -273,7 +273,7 @@ public static class FindPetsByStatusOper implements Oper { public FindPetsByStatusOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -348,7 +348,7 @@ public static class FindPetsByTagsOper implements Oper { public FindPetsByTagsOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -421,7 +421,7 @@ public static class GetPetByIdOper implements Oper { public GetPetByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java index d34a720ff6a5..2894f03e56b2 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -232,7 +232,7 @@ public static class GetOrderByIdOper implements Oper { public GetOrderByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -306,7 +306,7 @@ public static class PlaceOrderOper implements Oper { public PlaceOrderOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; reqSpec.setContentType("*/*"); - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java index 2ad8b6a1da74..ec2869045566 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -375,7 +375,7 @@ public static class GetUserByNameOper implements Oper { public GetUserByNameOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -449,7 +449,7 @@ public static class LoginUserOper implements Oper { public LoginUserOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java index 3cc3d5e8f1dc..8846a084ec08 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java @@ -274,7 +274,7 @@ public static class FindPetsByStatusOper implements Oper { public FindPetsByStatusOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -349,7 +349,7 @@ public static class FindPetsByTagsOper implements Oper { public FindPetsByTagsOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -422,7 +422,7 @@ public static class GetPetByIdOper implements Oper { public GetPetByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java index 0c4c75f7503e..e6281a0a34e8 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java @@ -233,7 +233,7 @@ public static class GetOrderByIdOper implements Oper { public GetOrderByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -307,7 +307,7 @@ public static class PlaceOrderOper implements Oper { public PlaceOrderOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; reqSpec.setContentType("*/*"); - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java index eab6d35bef0b..dfd991dc96c1 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java @@ -376,7 +376,7 @@ public static class GetUserByNameOper implements Oper { public GetUserByNameOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } @@ -450,7 +450,7 @@ public static class LoginUserOper implements Oper { public LoginUserOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json,application/xml"); + reqSpec.setAccept("application/json"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml b/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index 841142bed705..933d7332521b 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index 4406a7347e04..d02433c791c2 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index c18c56fd8f19..24335cf563ae 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -126,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -164,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -201,7 +202,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index dfcb0d92f678..7bd1f368a057 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -155,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index e9f1bda32284..1907ab803dce 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -185,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -218,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 f93028052e12..ae696a1a005d 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 @@ -56,7 +56,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -127,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -165,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -242,7 +242,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 16b21de04cd2..542a3fcf6319 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -141,7 +141,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index da6b67bcc334..3907f07b5114 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -204,7 +204,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index 26b6cc457b81..f3f2de470bbc 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -124,7 +124,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -164,7 +164,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index a3cb3f154cc4..0f1588b67a63 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -140,7 +140,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity placeOrder( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index 0e55a1ad9aa3..c46fe189f133 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -155,7 +155,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -185,7 +185,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 f93028052e12..ae696a1a005d 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 @@ -56,7 +56,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -127,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -165,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -242,7 +242,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 16b21de04cd2..542a3fcf6319 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -141,7 +141,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index da6b67bcc334..3907f07b5114 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -204,7 +204,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index e6c76e3d70b5..22d76619d77d 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -77,7 +77,7 @@ Mono> deletePet( @HttpExchange( method = "GET", value = "/pet/findByStatus", - accept = "application/json,application/xml" + accept = "application/json" ) Mono>> findPetsByStatus( @RequestParam(value = "status", required = true) List status @@ -97,7 +97,7 @@ Mono>> findPetsByStatus( @HttpExchange( method = "GET", value = "/pet/findByTags", - accept = "application/json,application/xml" + accept = "application/json" ) Mono>> findPetsByTags( @RequestParam(value = "tags", required = true) Set tags @@ -116,7 +116,7 @@ Mono>> findPetsByTags( @HttpExchange( method = "GET", value = "/pet/{petId}", - accept = "application/json,application/xml" + accept = "application/json" ) Mono> getPetById( @PathVariable("petId") Long petId diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java index 2c842b85941d..57b79054f6e9 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -71,7 +71,7 @@ Mono>> getInventory( @HttpExchange( method = "GET", value = "/store/order/{order_id}", - accept = "application/json,application/xml" + accept = "application/json" ) Mono> getOrderById( @PathVariable("order_id") Long orderId @@ -89,7 +89,7 @@ Mono> getOrderById( @HttpExchange( method = "POST", value = "/store/order", - accept = "application/json,application/xml", + accept = "application/json", contentType = "application/json" ) Mono> placeOrder( diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index fb59d63d6c93..0af6509b0015 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -109,7 +109,7 @@ Mono> deleteUser( @HttpExchange( method = "GET", value = "/user/{username}", - accept = "application/json,application/xml" + accept = "application/json" ) Mono> getUserByName( @PathVariable("username") String username @@ -128,7 +128,7 @@ Mono> getUserByName( @HttpExchange( method = "GET", value = "/user/login", - accept = "application/json,application/xml" + accept = "application/json" ) Mono> loginUser( @RequestParam(value = "username", required = true) String username, diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index 01841a62b5cf..335ca99dcb98 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -73,7 +73,7 @@ ResponseEntity deletePet( @HttpExchange( method = "GET", value = "/pet/findByStatus", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity> findPetsByStatus( @RequestParam(value = "status", required = true) List status @@ -93,7 +93,7 @@ ResponseEntity> findPetsByStatus( @HttpExchange( method = "GET", value = "/pet/findByTags", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity> findPetsByTags( @RequestParam(value = "tags", required = true) Set tags @@ -112,7 +112,7 @@ ResponseEntity> findPetsByTags( @HttpExchange( method = "GET", value = "/pet/{petId}", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity getPetById( @PathVariable("petId") Long petId diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java index 5bf2b861e315..57c21f1d0597 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -67,7 +67,7 @@ ResponseEntity> getInventory( @HttpExchange( method = "GET", value = "/store/order/{order_id}", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity getOrderById( @PathVariable("order_id") Long orderId @@ -85,7 +85,7 @@ ResponseEntity getOrderById( @HttpExchange( method = "POST", value = "/store/order", - accept = "application/json,application/xml", + accept = "application/json", contentType = "application/json" ) ResponseEntity placeOrder( diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 49572ab866c2..82e6c45dae81 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -105,7 +105,7 @@ ResponseEntity deleteUser( @HttpExchange( method = "GET", value = "/user/{username}", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity getUserByName( @PathVariable("username") String username @@ -124,7 +124,7 @@ ResponseEntity getUserByName( @HttpExchange( method = "GET", value = "/user/login", - accept = "application/json,application/xml" + accept = "application/json" ) ResponseEntity loginUser( @RequestParam(value = "username", required = true) String username, 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 1607a7fcd7d6..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml index 1607a7fcd7d6..6058c2b8c8d5 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index 8f79a7c4c5a8..814354567b04 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md index 7b9645217510..7bb3cc7e0c81 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **array_of_string** | **List[str]** | | [optional] -**array_of_nullable_float** | **List[Optional[float]]** | | [optional] +**array_of_nullable_float** | **List[float]** | | [optional] **array_array_of_integer** | **List[List[int]]** | | [optional] **array_array_of_model** | **List[List[ReadOnlyFirst]]** | | [optional] diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md index 866a4b571864..93fa80af2eaf 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **date_prop** | **date** | | [optional] **datetime_prop** | **datetime** | | [optional] **array_nullable_prop** | **List[object]** | | [optional] -**array_and_items_nullable_prop** | **List[Optional[object]]** | | [optional] -**array_items_nullable** | **List[Optional[object]]** | | [optional] +**array_and_items_nullable_prop** | **List[object]** | | [optional] +**array_items_nullable** | **List[object]** | | [optional] **object_nullable_prop** | **Dict[str, object]** | | [optional] -**object_and_items_nullable_prop** | **Dict[str, Optional[object]]** | | [optional] -**object_items_nullable** | **Dict[str, Optional[object]]** | | [optional] +**object_and_items_nullable_prop** | **Dict[str, object]** | | [optional] +**object_items_nullable** | **Dict[str, object]** | | [optional] ## Example diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py index c5a44501eee7..c95fe01ff572 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py @@ -29,7 +29,7 @@ class ArrayTest(BaseModel): ArrayTest """ # noqa: E501 array_of_string: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=3)]] = None - array_of_nullable_float: Optional[List[Optional[float]]] = None + array_of_nullable_float: Optional[List[float]] = None array_array_of_integer: Optional[List[List[StrictInt]]] = None array_array_of_model: Optional[List[List[ReadOnlyFirst]]] = None __properties: ClassVar[List[str]] = ["array_of_string", "array_of_nullable_float", "array_array_of_integer", "array_array_of_model"] diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py index 64a2fe91b29d..101f1a96b6a0 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py @@ -35,11 +35,11 @@ class NullableClass(BaseModel): date_prop: Optional[date] = None datetime_prop: Optional[datetime] = None array_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_and_items_nullable_prop: Optional[List[Optional[Dict[str, Any]]]] = None - array_items_nullable: Optional[List[Optional[Dict[str, Any]]]] = None + array_and_items_nullable_prop: Optional[List[Dict[str, Any]]] = None + array_items_nullable: Optional[List[Dict[str, Any]]] = None object_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_and_items_nullable_prop: Optional[Dict[str, Optional[Dict[str, Any]]]] = None - object_items_nullable: Optional[Dict[str, Optional[Dict[str, Any]]]] = None + object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None + object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] diff --git a/samples/openapi3/client/petstore/python/docs/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/ArrayTest.md index 7b9645217510..7bb3cc7e0c81 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **array_of_string** | **List[str]** | | [optional] -**array_of_nullable_float** | **List[Optional[float]]** | | [optional] +**array_of_nullable_float** | **List[float]** | | [optional] **array_array_of_integer** | **List[List[int]]** | | [optional] **array_array_of_model** | **List[List[ReadOnlyFirst]]** | | [optional] diff --git a/samples/openapi3/client/petstore/python/docs/NullableClass.md b/samples/openapi3/client/petstore/python/docs/NullableClass.md index 866a4b571864..93fa80af2eaf 100644 --- a/samples/openapi3/client/petstore/python/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python/docs/NullableClass.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **date_prop** | **date** | | [optional] **datetime_prop** | **datetime** | | [optional] **array_nullable_prop** | **List[object]** | | [optional] -**array_and_items_nullable_prop** | **List[Optional[object]]** | | [optional] -**array_items_nullable** | **List[Optional[object]]** | | [optional] +**array_and_items_nullable_prop** | **List[object]** | | [optional] +**array_items_nullable** | **List[object]** | | [optional] **object_nullable_prop** | **Dict[str, object]** | | [optional] -**object_and_items_nullable_prop** | **Dict[str, Optional[object]]** | | [optional] -**object_items_nullable** | **Dict[str, Optional[object]]** | | [optional] +**object_and_items_nullable_prop** | **Dict[str, object]** | | [optional] +**object_items_nullable** | **Dict[str, object]** | | [optional] ## Example diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index 2986612fad54..79627ad76e0e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -29,7 +29,7 @@ class ArrayTest(BaseModel): ArrayTest """ # noqa: E501 array_of_string: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=3)]] = None - array_of_nullable_float: Optional[List[Optional[StrictFloat]]] = None + array_of_nullable_float: Optional[List[StrictFloat]] = None array_array_of_integer: Optional[List[List[StrictInt]]] = None array_array_of_model: Optional[List[List[ReadOnlyFirst]]] = None additional_properties: Dict[str, Any] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index 1ad6d35535e0..903fa5d037b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -35,11 +35,11 @@ class NullableClass(BaseModel): date_prop: Optional[date] = None datetime_prop: Optional[datetime] = None array_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_and_items_nullable_prop: Optional[List[Optional[Dict[str, Any]]]] = None - array_items_nullable: Optional[List[Optional[Dict[str, Any]]]] = None + array_and_items_nullable_prop: Optional[List[Dict[str, Any]]] = None + array_items_nullable: Optional[List[Dict[str, Any]]] = None object_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_and_items_nullable_prop: Optional[Dict[str, Optional[Dict[str, Any]]]] = None - object_items_nullable: Optional[Dict[str, Optional[Dict[str, Any]]]] = None + object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None + object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index e604dc02bea0..25a5a7682158 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -37,7 +37,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -76,7 +76,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -97,7 +97,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -117,7 +117,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -140,7 +140,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index 8f82fdde5e1e..e700d399ff1e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -73,7 +73,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -92,7 +92,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index 6d1fe1925a99..fdd336454dae 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -110,7 +110,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -130,7 +130,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 fe1dbdf3f37e..e2191d40cacc 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -65,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -132,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -170,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -207,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -249,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 6846d9c3f5e5..4e224daf5ac1 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -155,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 26380b6c471d..7ed505283edd 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -185,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -218,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 5a883787effb..dc50a2249561 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -66,7 +67,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -133,7 +134,7 @@ CompletableFuture> deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture>> findPetsByStatus( @@ -171,7 +172,7 @@ CompletableFuture>> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture>> findPetsByTags( @@ -208,7 +209,7 @@ CompletableFuture>> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture> getPetById( @@ -250,7 +251,7 @@ CompletableFuture> getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 d4568368294d..ba3828d83a95 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -124,7 +125,7 @@ CompletableFuture>> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture> getOrderById( @@ -156,7 +157,7 @@ CompletableFuture> getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 e65f1a6a4e82..4476dc570a21 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -186,7 +187,7 @@ CompletableFuture> deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture> getUserByName( @@ -219,7 +220,7 @@ CompletableFuture> getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) CompletableFuture> loginUser( 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 84749201da7f..70301e10c872 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 @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java index 5bb487668db9..9b514e7b08f9 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -64,7 +65,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 f9e6abfb94dd..2ae40ea69eb8 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 260526842899..694b86b72f11 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 @@ -27,6 +27,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 dcc39ebde828..1e8e8bc5f3fb 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 074bccb63788..9f7d4cd6d8f6 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 @@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -132,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -170,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -207,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( 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 b48103859f7a..3c91df79aa95 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -155,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 0eeea3b7d9c7..5aaf6ed3438f 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -173,7 +174,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -206,7 +207,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 cec15704b2f0..a77d978f3661 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 @@ -20,6 +20,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -124,7 +125,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -163,7 +164,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -201,7 +202,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( 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 5a12a703ec3d..8e548045abb4 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -153,7 +154,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity placeOrder( 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 5f810e0899c9..2657f118e413 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -164,7 +165,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -195,7 +196,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 43b6678a4c42..55ce62c6a552 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -65,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -132,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -170,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -207,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -249,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 dfcb0d92f678..7bd1f368a057 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -155,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 b0264216ba86..4f9897252417 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -185,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -218,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 7af17152063a..e034a289d399 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -65,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -132,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByStatus( @@ -170,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity> findPetsByTags( @@ -207,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getPetById( @@ -249,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 0766ab318d14..79d1d6af08ae 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -123,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getOrderById( @@ -155,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 77c12e18337b..f02022e113bc 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -185,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity getUserByName( @@ -218,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) ResponseEntity loginUser( 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 2f9796e50446..742329fa4712 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -69,7 +70,7 @@ default Optional getRequest() { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) @@ -156,7 +157,7 @@ default ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity> findPetsByStatus( @@ -211,7 +212,7 @@ default ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity> findPetsByTags( @@ -265,7 +266,7 @@ default ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity getPetById( @@ -324,7 +325,7 @@ default ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 4b6e38ad2b18..0c39b740003a 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -133,7 +134,7 @@ default ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity getOrderById( @@ -182,7 +183,7 @@ default ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json,application/xml", + produces = "application/json", consumes = "application/json" ) 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 044a6c79338a..4c998b93ac89 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -201,7 +202,7 @@ default ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity getUserByName( @@ -251,7 +252,7 @@ default ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json,application/xml" + produces = "application/json" ) default ResponseEntity loginUser( 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 467a37c03701..f3142d10ddeb 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 f4f9fdde842b..268470023104 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 524f05c4a8e2..64a98e96cd19 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 423acf765d10..f1e46fca4e66 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 b216fcc084a0..c23f5c306e32 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 cee3307f79a9..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 4315785bdb12..ad7cd25b2fdb 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 faf96a6d4bb2..15c6e39943c3 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 72b938008774..d8409a154e07 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 cee3307f79a9..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 c2a42294405f..58515389ce4a 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; 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 6b0c4c64aa32..7212a16ec250 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 @@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; 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 be408eea4dec..f79d397ebf61 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; 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 47c051e86181..f517685a2b00 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 @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; 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 4d2cb27c3b61..822024286f03 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; 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 bf34fd21ab6f..7deb2eb290f2 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 c4e592c14bc6..2e6b3a0b6790 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 6fc9b1738300..ce85098fb7f7 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 @@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 bac8f3b15273..f2cd87d62258 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 f45a1124a9ef..4ebbc8a18cf4 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 @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 6d196e3d5c11..5fc7d902bb9f 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 01bc987a916d..439e37a6049f 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user 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 cee3307f79a9..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 b155fae08920..ca310d32a5df 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 d7a77b09bb6d..474536120714 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 42630414a19a..3a995181309d 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 cee3307f79a9..65092456cbdb 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml index 27ee0c195b9b..a2995b488403 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml index 27ee0c195b9b..a2995b488403 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json index 3202e3f8c0e9..ece66be6e44f 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json @@ -148,7 +148,7 @@ }, "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } } }, diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 723c583bc668..605ee8735333 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -159,7 +159,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -216,7 +216,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -298,7 +298,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -446,7 +446,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{order_id}" : { @@ -518,7 +518,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -668,7 +668,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -750,7 +750,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index cb902885e966..8b12859e6477 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index 51dd2e5f9ee0..04da14326f84 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -60,7 +60,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-content-type" : "application/json", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "", @@ -104,7 +104,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-content-type" : "application/json", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByStatus" : { @@ -159,7 +159,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/findByTags" : { @@ -212,7 +212,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/pet/{petId}" : { @@ -295,7 +295,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "post" : { "description" : "", @@ -447,7 +447,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-content-type" : "application/json", - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/store/order/{orderId}" : { @@ -519,7 +519,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user" : { @@ -670,7 +670,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" } }, "/user/logout" : { @@ -759,7 +759,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json,application/xml" + "x-accepts" : "application/json" }, "put" : { "description" : "This can only be done by the logged in user.", 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 e7133d04a9da..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index d49efeb91a2b..c448d48c3deb 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index d49efeb91a2b..c448d48c3deb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index d49efeb91a2b..c448d48c3deb 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index d49efeb91a2b..c448d48c3deb 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index d49efeb91a2b..c448d48c3deb 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 e25ea2b15df5..e3216535468e 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 85a5ad3e6b1a..be168f92a33f 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 @@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 762e4bc05dde..005a635edbad 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 648980913217..c30428398e17 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 @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 b713e40cc703..09acced7867c 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 8fda12a0801e..32c885eca1a9 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; 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 5a61f677bfb9..9cb694f029d1 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml index cee3307f79a9..65092456cbdb 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user 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 cee3307f79a9..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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index 4a64aa95cde5..c07f4f9b8a8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index 4a64aa95cde5..c07f4f9b8a8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index 4a64aa95cde5..c07f4f9b8a8a 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index 4a64aa95cde5..c07f4f9b8a8a 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java index ce5ef2945f63..0a4befab5c02 100644 --- a/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/springboot-spring-provide-args/src/main/java/org/openapitools/api/UserApi.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: 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 b41ee0e9b2f0..b93331d47aa9 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; 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 5632f8a04c73..34217e25a68c 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 @@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; 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 c3bb2ff6c7f8..ab6b89c15780 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 @@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; 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 9bc7fb99ec3b..ffc7f0fc3409 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 @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; 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 f8016efc399d..3e9aea822eb4 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; 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 4f767ded5cc0..a0a21e7560aa 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 @@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.virtualan.annotation.ApiVirtual; import io.virtualan.annotation.VirtualService; import org.springframework.http.HttpStatus; diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index 04d2ce4b15ba..adb3ff3f6021 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index bf8dcfb4c25c..42dd7db5f53b 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: "application/json,application/xml" + x-accepts: application/json x-tags: - tag: user put: From ce92f37010f75489cf0f0693236bd2345ea32712 Mon Sep 17 00:00:00 2001 From: GlobeDaBoarder Date: Mon, 15 Jan 2024 21:48:17 +0200 Subject: [PATCH 3/5] added 2 sample configs; adsjuted to only generate examples for application/json --- .../spring-boot-api-response-examples.yaml | 13 + ...t-petstore-with-api-response-examples.yaml | 13 + .../codegen/utils/ExamplesUtils.java | 23 +- .../main/resources/JavaSpring/api.mustache | 4 +- .../petstore_with_api_response_examples.yaml | 836 +++++++++++++++ .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 16 + .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../springboot-api-response-examples/pom.xml | 95 ++ .../OpenApiGeneratorApplication.java | 30 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/DogsApi.java | 88 ++ .../openapitools/api/DogsApiController.java | 45 + .../org/openapitools/api/DogsApiDelegate.java | 56 + .../configuration/HomeController.java | 20 + .../configuration/SpringDocConfiguration.java | 27 + .../main/java/org/openapitools/model/Dog.java | 108 ++ .../java/org/openapitools/model/Error.java | 107 ++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 82 ++ .../OpenApiGeneratorApplicationTests.java | 13 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 26 + .../.openapi-generator/VERSION | 1 + .../README.md | 21 + .../pom.xml | 95 ++ .../OpenApiGeneratorApplication.java | 30 + .../org/openapitools/RFC3339DateFormat.java | 38 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/PetApi.java | 358 +++++++ .../openapitools/api/PetApiController.java | 45 + .../org/openapitools/api/PetApiDelegate.java | 234 +++++ .../java/org/openapitools/api/StoreApi.java | 175 ++++ .../openapitools/api/StoreApiController.java | 45 + .../openapitools/api/StoreApiDelegate.java | 112 ++ .../java/org/openapitools/api/UserApi.java | 308 ++++++ .../openapitools/api/UserApiController.java | 45 + .../org/openapitools/api/UserApiDelegate.java | 155 +++ .../configuration/HomeController.java | 20 + .../configuration/SpringDocConfiguration.java | 43 + .../java/org/openapitools/model/Category.java | 108 ++ .../openapitools/model/ModelApiResponse.java | 134 +++ .../java/org/openapitools/model/Order.java | 245 +++++ .../main/java/org/openapitools/model/Pet.java | 284 +++++ .../main/java/org/openapitools/model/Tag.java | 108 ++ .../java/org/openapitools/model/User.java | 252 +++++ .../src/main/resources/application.properties | 3 + .../src/main/resources/openapi.yaml | 975 ++++++++++++++++++ .../OpenApiGeneratorApplicationTests.java | 13 + 51 files changed, 5585 insertions(+), 11 deletions(-) create mode 100644 bin/configs/spring-boot-api-response-examples.yaml create mode 100644 bin/configs/spring-boot-petstore-with-api-response-examples.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/spring/petstore_with_api_response_examples.yaml create mode 100644 samples/server/petstore/springboot-api-response-examples/.openapi-generator-ignore create mode 100644 samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES create mode 100644 samples/server/petstore/springboot-api-response-examples/.openapi-generator/VERSION create mode 100644 samples/server/petstore/springboot-api-response-examples/README.md create mode 100644 samples/server/petstore/springboot-api-response-examples/pom.xml create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApi.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiController.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiDelegate.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Dog.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Error.java create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/resources/application.properties create mode 100644 samples/server/petstore/springboot-api-response-examples/src/main/resources/openapi.yaml create mode 100644 samples/server/petstore/springboot-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator-ignore create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/VERSION create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/README.md create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/pom.xml create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiController.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiDelegate.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiController.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiDelegate.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiController.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiDelegate.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Category.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/ModelApiResponse.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Order.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Tag.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/User.java create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/application.properties create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/openapi.yaml create mode 100644 samples/server/petstore/springboot-petstore-with-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/bin/configs/spring-boot-api-response-examples.yaml b/bin/configs/spring-boot-api-response-examples.yaml new file mode 100644 index 000000000000..e0b4196cc44d --- /dev/null +++ b/bin/configs/spring-boot-api-response-examples.yaml @@ -0,0 +1,13 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-api-response-examples +library: spring-boot +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/api-response-examples_issue17610.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-api-response-examples + documentationProvider: springdoc + useSpringBoot3: true + java8: true + delegatePattern: true + useBeanValidation: true + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-petstore-with-api-response-examples.yaml b/bin/configs/spring-boot-petstore-with-api-response-examples.yaml new file mode 100644 index 000000000000..6a4604492b98 --- /dev/null +++ b/bin/configs/spring-boot-petstore-with-api-response-examples.yaml @@ -0,0 +1,13 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-petstore-with-api-response-examples +library: spring-boot +inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore_with_api_response_examples.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-petstore-with-api-response-examples + documentationProvider: springdoc + useSpringBoot3: true + java8: true + delegatePattern: true + useBeanValidation: true + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java index f0185c3c48c3..a1a2cf8f2dc5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ExamplesUtils.java @@ -34,15 +34,20 @@ public static Map getExamplesFromResponse(OpenAPI openAPI, ApiR } private static Map getExamplesFromContent(Content content) { - if (content == null || content.isEmpty()) { + if (content == null || content.isEmpty()) return Collections.emptyMap(); + + if (content.containsKey("application/json")) { + Map examples = content.get("application/json").getExamples(); + if (content.size() > 1 && examples != null && !examples.isEmpty()) + once(LOGGER).warn("More than one content media types found in response. Only response examples of the application/json will be taken for codegen."); + + return examples; } - Map.Entry entry = content.entrySet().iterator().next(); - if (content.size() > 1) { - once(LOGGER).debug("Multiple API response examples found in the OAS 'content' section, returning only the first one ({})", - entry.getKey()); - } - return entry.getValue().getExamples(); + + once(LOGGER).warn("No application/json content media type found in response. Response examples can only be generated for application/json media type."); + + return Collections.emptyMap(); } @@ -68,10 +73,10 @@ public static List> unaliasExamples(OpenAPI openapi, Map- + This is a sample server Petstore server. For this sample, you can use the api key + `special-key` to test the authorization filters. + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + examples: + pet1: + $ref: '#/components/examples/Pet1' + pet2: + $ref: '#/components/examples/Pet2' + application/json: + schema: + $ref: '#/components/schemas/Pet' + examples: + pet3: + $ref: '#/components/examples/Pet3' + pet4: + $ref: '#/components/examples/Pet4' + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + 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 + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + examples: + pets: + $ref: '#/components/examples/Pets' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generate exceptions + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + Set-Cookie: + description: >- + Cookie authentication key for use with the `api_key` + apiKey authentication. + schema: + type: string + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - api_key: [] +externalDocs: + description: Find out more about Swagger + url: 'http://swagger.io' +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + schemas: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + deprecated: true + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + examples: + Pet1: + summary: A representation of a cat + value: + id: 12345 + category: + id: 12345 + name: cats + name: Fluffy + photoUrls: + - url: https://www.example.com/fluffy.jpg + tags: + - id: 12345 + name: fluffy + status: available + Pet2: + summary: A representation of a dog + value: + id: 12346 + category: + id: 12346 + name: dogs + name: Fido + photoUrls: + - url: https://www.example.com/fido.jpg + tags: + - id: 12346 + name: fido + status: available + Pet3: + summary: A representation of a monkey + value: + id: 12347 + category: + id: 12347 + name: monkeys + name: George + photoUrls: + - url: https://www.example.com/george.jpg + tags: + - id: 12347 + name: george + status: available + Pet4: + summary: A representation of a fish + value: + id: 12348 + category: + id: 12348 + name: fish + name: Nemo + photoUrls: + - url: https://www.example.com/nemo.jpg + tags: + - id: 12348 + name: nemo + status: available + Pets: + summary: A representation of a list of pets + value: + - id: 12345 + category: + id: 12345 + name: cats + name: Fluffy + photoUrls: + - url: https://www.example.com/fluffy.jpg + tags: + - id: 12345 + name: fluffy + status: available + - id: 12346 + category: + id: 12346 + name: dogs + name: Fido + photoUrls: + - url: https://www.example.com/fido.jpg + tags: + - id: 12346 + name: fido + status: available diff --git a/samples/server/petstore/springboot-api-response-examples/.openapi-generator-ignore b/samples/server/petstore/springboot-api-response-examples/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES new file mode 100644 index 000000000000..08d588aee33f --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES @@ -0,0 +1,16 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/OpenApiGeneratorApplication.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/DogsApi.java +src/main/java/org/openapitools/api/DogsApiController.java +src/main/java/org/openapitools/api/DogsApiDelegate.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/configuration/SpringDocConfiguration.java +src/main/java/org/openapitools/model/Dog.java +src/main/java/org/openapitools/model/Error.java +src/main/resources/application.properties +src/main/resources/openapi.yaml +src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/samples/server/petstore/springboot-api-response-examples/.openapi-generator/VERSION b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/VERSION new file mode 100644 index 000000000000..fff4bdd7ab59 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/README.md b/samples/server/petstore/springboot-api-response-examples/README.md new file mode 100644 index 000000000000..5cd22b6081a2 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated server + +Spring Boot Server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + + +The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org). +Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. +The specification is available to download using the following url: +http://localhost:8080/v3/api-docs/ + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/swagger-ui.html + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/pom.xml b/samples/server/petstore/springboot-api-response-examples/pom.xml new file mode 100644 index 000000000000..d3cf32830630 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/pom.xml @@ -0,0 +1,95 @@ + + 4.0.0 + org.openapitools + springboot-api-response-examples + jar + springboot-api-response-examples + 1.0.0 + + 17 + ${java.version} + ${java.version} + UTF-8 + 2.2.0 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + repository.spring.milestone + Spring Milestone Repository + https://repo.spring.io/milestone + + + + + spring-milestones + https://repo.spring.io/milestone + + + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java new file mode 100644 index 000000000000..97252a8a9402 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java @@ -0,0 +1,30 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; +import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; + +@SpringBootApplication( + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +@ComponentScan( + basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}, + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +public class OpenApiGeneratorApplication { + + public static void main(String[] args) { + SpringApplication.run(OpenApiGeneratorApplication.class, args); + } + + @Bean(name = "org.openapitools.OpenApiGeneratorApplication.jsonNullableModule") + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return this; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..9bcd4f230ed3 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import jakarta.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApi.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApi.java new file mode 100644 index 000000000000..0d01d67410ff --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApi.java @@ -0,0 +1,88 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.Dog; +import org.openapitools.model.Error; +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; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.util.List; +import java.util.Map; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "dogs", description = "the dogs API") +public interface DogsApi { + + default DogsApiDelegate getDelegate() { + return new DogsApiDelegate() {}; + } + + /** + * POST /dogs : Create a dog + * + * @param dog (optional) + * @return OK (status code 200) + * or Bad Request (status code 400) + */ + @Operation( + operationId = "createDog", + summary = "Create a dog", + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Dog.class)) + }), + @ApiResponse(responseCode = "400", description = "Bad Request", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Error.class), examples = { + @ExampleObject( + name = "DogNameBiggerThan50Error", + value = "{\"code\":400,\"message\":\"name size must be between 0 and 50\"}" + ), + @ExampleObject( + name = "DogNameContainsNumbersError", + value = "{\"code\":400,\"message\":\"Name must contain only letters\"}" + ), + @ExampleObject( + name = "DogAgeNegativeError", + value = "{\"code\":400,\"message\":\"age must be greater than or equal to 0\"}" + ) + }) + + }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/dogs", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity createDog( + @Parameter(name = "Dog", description = "") @Valid @RequestBody(required = false) Dog dog + ) { + return getDelegate().createDog(dog); + } + +} diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiController.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiController.java new file mode 100644 index 000000000000..a2d3f389d5a0 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiController.java @@ -0,0 +1,45 @@ +package org.openapitools.api; + +import org.openapitools.model.Dog; +import org.openapitools.model.Error; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.noExamplesInAnnotationExample.base-path:}") +public class DogsApiController implements DogsApi { + + private final DogsApiDelegate delegate; + + public DogsApiController(@Autowired(required = false) DogsApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new DogsApiDelegate() {}); + } + + @Override + public DogsApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiDelegate.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiDelegate.java new file mode 100644 index 000000000000..71a908a3d07b --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/api/DogsApiDelegate.java @@ -0,0 +1,56 @@ +package org.openapitools.api; + +import org.openapitools.model.Dog; +import org.openapitools.model.Error; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +/** + * A delegate to be called by the {@link DogsApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface DogsApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /dogs : Create a dog + * + * @param dog (optional) + * @return OK (status code 200) + * or Bad Request (status code 400) + * @see DogsApi#createDog + */ + default ResponseEntity createDog(Dog dog) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"name\" : \"Rex\", \"age\" : 5 }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..9aa29284ab5f --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,20 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui.html"; + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java new file mode 100644 index 000000000000..f20ca609cb23 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java @@ -0,0 +1,27 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.security.SecurityScheme; + +@Configuration +public class SpringDocConfiguration { + + @Bean(name = "org.openapitools.configuration.SpringDocConfiguration.apiInfo") + OpenAPI apiInfo() { + return new OpenAPI() + .info( + new Info() + .title("No examples in annotation example API") + .description("No examples in annotation example API") + .version("1.0.0") + ) + ; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Dog.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Dog.java new file mode 100644 index 000000000000..cbbce11c5b20 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Dog.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Dog + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Dog { + + private String name; + + private Integer age; + + public Dog name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Pattern(regexp = "^[a-zA-Z]+$", message="Name must contain only letters") @Size(max = 50) + @Schema(name = "name", example = "Rex", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Dog age(Integer age) { + this.age = age; + return this; + } + + /** + * Get age + * minimum: 0 + * @return age + */ + @Min(0) + @Schema(name = "age", example = "5", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("age") + public Integer getAge() { + return age; + } + + public void setAge(Integer age) { + this.age = age; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Dog dog = (Dog) o; + return Objects.equals(this.name, dog.name) && + Objects.equals(this.age, dog.age); + } + + @Override + public int hashCode() { + return Objects.hash(name, age); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Dog {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" age: ").append(toIndentedString(age)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Error.java b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Error.java new file mode 100644 index 000000000000..f1e23e668e42 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/java/org/openapitools/model/Error.java @@ -0,0 +1,107 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Error + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Error { + + private Integer code; + + private String message; + + public Error code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.message, error.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/resources/application.properties b/samples/server/petstore/springboot-api-response-examples/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/server/petstore/springboot-api-response-examples/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-api-response-examples/src/main/resources/openapi.yaml new file mode 100644 index 000000000000..81e6818393d4 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/main/resources/openapi.yaml @@ -0,0 +1,82 @@ +openapi: 3.0.3 +info: + description: No examples in annotation example API + title: No examples in annotation example API + version: 1.0.0 +servers: +- url: https://localhost:8080 +paths: + /dogs: + post: + operationId: createDog + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Dog' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Dog' + description: OK + "400": + content: + application/json: + examples: + dog name length: + $ref: '#/components/examples/DogNameBiggerThan50Error' + dog name contains numbers: + $ref: '#/components/examples/DogNameContainsNumbersError' + dog age negative: + $ref: '#/components/examples/DogAgeNegativeError' + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + summary: Create a dog + x-content-type: application/json + x-accepts: application/json +components: + examples: + DogNameBiggerThan50Error: + value: + code: 400 + message: name size must be between 0 and 50 + DogNameContainsNumbersError: + value: + code: 400 + message: Name must contain only letters + DogAgeNegativeError: + value: + code: 400 + message: age must be greater than or equal to 0 + schemas: + Dog: + example: + name: Rex + age: 5 + properties: + name: + example: Rex + maxLength: 50 + pattern: "^[a-zA-Z]+$" + type: string + x-pattern-message: Name must contain only letters + age: + example: 5 + format: int32 + minimum: 0 + type: integer + type: object + Error: + example: + code: 0 + message: message + properties: + code: + format: int32 + type: integer + message: + type: string + type: object diff --git a/samples/server/petstore/springboot-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java b/samples/server/petstore/springboot-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java new file mode 100644 index 000000000000..3681f67e7705 --- /dev/null +++ b/samples/server/petstore/springboot-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java @@ -0,0 +1,13 @@ +package org.openapitools; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class OpenApiGeneratorApplicationTests { + + @Test + void contextLoads() { + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator-ignore b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES new file mode 100644 index 000000000000..36c5295fc829 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES @@ -0,0 +1,26 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/OpenApiGeneratorApplication.java +src/main/java/org/openapitools/RFC3339DateFormat.java +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/PetApi.java +src/main/java/org/openapitools/api/PetApiController.java +src/main/java/org/openapitools/api/PetApiDelegate.java +src/main/java/org/openapitools/api/StoreApi.java +src/main/java/org/openapitools/api/StoreApiController.java +src/main/java/org/openapitools/api/StoreApiDelegate.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/api/UserApiController.java +src/main/java/org/openapitools/api/UserApiDelegate.java +src/main/java/org/openapitools/configuration/HomeController.java +src/main/java/org/openapitools/configuration/SpringDocConfiguration.java +src/main/java/org/openapitools/model/Category.java +src/main/java/org/openapitools/model/ModelApiResponse.java +src/main/java/org/openapitools/model/Order.java +src/main/java/org/openapitools/model/Pet.java +src/main/java/org/openapitools/model/Tag.java +src/main/java/org/openapitools/model/User.java +src/main/resources/application.properties +src/main/resources/openapi.yaml +src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/VERSION b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/VERSION new file mode 100644 index 000000000000..fff4bdd7ab59 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/README.md b/samples/server/petstore/springboot-petstore-with-api-response-examples/README.md new file mode 100644 index 000000000000..5cd22b6081a2 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/README.md @@ -0,0 +1,21 @@ +# OpenAPI generated server + +Spring Boot Server + +## Overview +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub. +This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework. + + +The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org). +Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes. +The specification is available to download using the following url: +http://localhost:8080/v3/api-docs/ + +Start your server as a simple java application + +You can view the api documentation in swagger-ui by pointing to +http://localhost:8080/swagger-ui.html + +Change default port value in application.properties \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/pom.xml b/samples/server/petstore/springboot-petstore-with-api-response-examples/pom.xml new file mode 100644 index 000000000000..2e30b0a8b867 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/pom.xml @@ -0,0 +1,95 @@ + + 4.0.0 + org.openapitools + springboot-petstore-with-api-response-examples + jar + springboot-petstore-with-api-response-examples + 1.0.0 + + 17 + ${java.version} + ${java.version} + UTF-8 + 2.2.0 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 3.1.3 + + + + + + repository.spring.milestone + Spring Milestone Repository + https://repo.spring.io/milestone + + + + + spring-milestones + https://repo.spring.io/milestone + + + + + src/main/java + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-starter-webmvc-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java new file mode 100644 index 000000000000..97252a8a9402 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/OpenApiGeneratorApplication.java @@ -0,0 +1,30 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.Module; +import org.openapitools.jackson.nullable.JsonNullableModule; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.FilterType; +import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; + +@SpringBootApplication( + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +@ComponentScan( + basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"}, + nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class +) +public class OpenApiGeneratorApplication { + + public static void main(String[] args) { + SpringApplication.run(OpenApiGeneratorApplication.class, args); + } + + @Bean(name = "org.openapitools.OpenApiGeneratorApplication.jsonNullableModule") + public Module jsonNullableModule() { + return new JsonNullableModule(); + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java new file mode 100644 index 000000000000..bcd3936d8b34 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/RFC3339DateFormat.java @@ -0,0 +1,38 @@ +package org.openapitools; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return this; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 000000000000..9bcd4f230ed3 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import jakarta.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java new file mode 100644 index 000000000000..ed51751b1260 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java @@ -0,0 +1,358 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +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; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.util.List; +import java.util.Map; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "pet", description = "Everything about your Pets") +public interface PetApi { + + default PetApiDelegate getDelegate() { + return new PetApiDelegate() {}; + } + + /** + * POST /pet : Add a new pet to the store + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + */ + @Operation( + operationId = "addPet", + summary = "Add a new pet to the store", + description = "", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class), examples = { + @ExampleObject( + name = "Pet1", + value = "{\"id\":12345,\"category\":{\"id\":12345,\"name\":\"cats\"},\"name\":\"Fluffy\",\"photoUrls\":[{\"url\":\"https://www.example.com/fluffy.jpg\"}],\"tags\":[{\"id\":12345,\"name\":\"fluffy\"}],\"status\":\"available\"}" + ), + @ExampleObject( + name = "Pet2", + value = "{\"id\":12346,\"category\":{\"id\":12346,\"name\":\"dogs\"},\"name\":\"Fido\",\"photoUrls\":[{\"url\":\"https://www.example.com/fido.jpg\"}],\"tags\":[{\"id\":12346,\"name\":\"fido\"}],\"status\":\"available\"}" + ) + }) + + }), + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + + default ResponseEntity addPet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + ) { + return getDelegate().addPet(pet); + } + + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + */ + @Operation( + operationId = "deletePet", + summary = "Deletes a pet", + description = "", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/pet/{petId}" + ) + + default ResponseEntity deletePet( + @Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey + ) { + return getDelegate().deletePet(petId, apiKey); + } + + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + */ + @Operation( + operationId = "findPetsByStatus", + summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class))), + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class))) + }), + @ApiResponse(responseCode = "400", description = "Invalid status value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByStatus", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(name = "status", deprecated = true, description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) @Deprecated List status + ) { + return getDelegate().findPetsByStatus(status); + } + + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + */ + @Deprecated + @Operation( + operationId = "findPetsByTags", + summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + deprecated = true, + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class))), + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class))) + }), + @ApiResponse(responseCode = "400", description = "Invalid tag value") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/findByTags", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List tags + ) { + return getDelegate().findPetsByTags(tags); + } + + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + */ + @Operation( + operationId = "getPetById", + summary = "Find pet by ID", + description = "Returns a single pet", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/pet/{petId}", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity getPetById( + @Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId + ) { + return getDelegate().getPetById(petId); + } + + + /** + * PUT /pet : Update an existing pet + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * 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", + summary = "Update an existing pet", + description = "", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") + }, + 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, + value = "/pet", + produces = { "application/xml", "application/json" }, + consumes = { "application/json", "application/xml" } + ) + + default ResponseEntity updatePet( + @Parameter(name = "Pet", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet + ) { + return getDelegate().updatePet(pet); + } + + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + */ + @Operation( + operationId = "updatePetWithForm", + summary = "Updates a pet in the store with form data", + description = "", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}", + consumes = { "application/x-www-form-urlencoded" } + ) + + default ResponseEntity updatePetWithForm( + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name, + @Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status + ) { + return getDelegate().updatePetWithForm(petId, name, status); + } + + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "uploadFile", + summary = "uploads an image", + description = "", + tags = { "pet" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class)) + }) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" }) + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/pet/{petId}/uploadImage", + produces = { "application/json" }, + consumes = { "multipart/form-data" } + ) + + default ResponseEntity uploadFile( + @Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId, + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file + ) { + return getDelegate().uploadFile(petId, additionalMetadata, file); + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiController.java new file mode 100644 index 000000000000..fb20f492e9d0 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiController.java @@ -0,0 +1,45 @@ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {}); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiDelegate.java new file mode 100644 index 000000000000..a52ee295dd76 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApiDelegate.java @@ -0,0 +1,234 @@ +package org.openapitools.api; + +import org.openapitools.model.ModelApiResponse; +import org.openapitools.model.Pet; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +/** + * A delegate to be called by the {@link PetApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface PetApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /pet : Add a new pet to the store + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * or Invalid input (status code 405) + * @see PetApi#addPet + */ + default ResponseEntity addPet(Pet pet) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /pet/{petId} : Deletes a pet + * + * + * @param petId Pet id to delete (required) + * @param apiKey (optional) + * @return Invalid pet value (status code 400) + * @see PetApi#deletePet + */ + default ResponseEntity deletePet(Long petId, + String apiKey) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByStatus : Finds Pets by status + * Multiple status values can be provided with comma separated strings + * + * @param status Status values that need to be considered for filter (required) + * @return successful operation (status code 200) + * or Invalid status value (status code 400) + * @see PetApi#findPetsByStatus + */ + default ResponseEntity> findPetsByStatus(List status) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/findByTags : Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * @param tags Tags to filter by (required) + * @return successful operation (status code 200) + * or Invalid tag value (status code 400) + * @deprecated + * @see PetApi#findPetsByTags + */ + @Deprecated + default ResponseEntity> findPetsByTags(List tags) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /pet/{petId} : Find pet by ID + * Returns a single pet + * + * @param petId ID of pet to return (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Pet not found (status code 404) + * @see PetApi#getPetById + */ + default ResponseEntity getPetById(Long petId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 aeiou doggie aeiou 123456789 aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /pet : Update an existing pet + * + * + * @param pet Pet object that needs to be added to the store (required) + * @return successful operation (status code 200) + * 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 + * @see PetApi#updatePet + */ + default ResponseEntity updatePet(Pet pet) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 doggie aeiou aeiou "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId} : Updates a pet in the store with form data + * + * + * @param petId ID of pet that needs to be updated (required) + * @param name Updated name of the pet (optional) + * @param status Updated status of the pet (optional) + * @return Invalid input (status code 405) + * @see PetApi#updatePetWithForm + */ + default ResponseEntity updatePetWithForm(Long petId, + String name, + String status) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /pet/{petId}/uploadImage : uploads an image + * + * + * @param petId ID of pet to update (required) + * @param additionalMetadata Additional data to pass to server (optional) + * @param file file to upload (optional) + * @return successful operation (status code 200) + * @see PetApi#uploadFile + */ + default ResponseEntity uploadFile(Long petId, + String additionalMetadata, + MultipartFile file) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java new file mode 100644 index 000000000000..09972cd12091 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApi.java @@ -0,0 +1,175 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +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; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.util.List; +import java.util.Map; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "store", description = "Access to Petstore orders") +public interface StoreApi { + + default StoreApiDelegate getDelegate() { + return new StoreApiDelegate() {}; + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "deleteOrder", + summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/store/order/{orderId}" + ) + + default ResponseEntity deleteOrder( + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId + ) { + return getDelegate().deleteOrder(orderId); + } + + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "getInventory", + summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/inventory", + produces = { "application/json" } + ) + + default ResponseEntity> getInventory( + + ) { + return getDelegate().getInventory(); + } + + + /** + * GET /store/order/{orderId} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + */ + @Operation( + operationId = "getOrderById", + summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/store/order/{orderId}", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId + ) { + return getDelegate().getOrderById(orderId); + } + + + /** + * POST /store/order : Place an order for a pet + * + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + */ + @Operation( + operationId = "placeOrder", + summary = "Place an order for a pet", + description = "", + tags = { "store" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid Order") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/store/order", + produces = { "application/xml", "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity placeOrder( + @Parameter(name = "Order", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order + ) { + return getDelegate().placeOrder(order); + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiController.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiController.java new file mode 100644 index 000000000000..57ef2f237252 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiController.java @@ -0,0 +1,45 @@ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {}); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiDelegate.java new file mode 100644 index 000000000000..bffacd4e92ec --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -0,0 +1,112 @@ +package org.openapitools.api; + +import java.util.Map; +import org.openapitools.model.Order; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +/** + * A delegate to be called by the {@link StoreApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface StoreApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /store/order/{orderId} : Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * + * @param orderId ID of the order that needs to be deleted (required) + * @return Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#deleteOrder + */ + default ResponseEntity deleteOrder(String orderId) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /store/inventory : Returns pet inventories by status + * Returns a map of status codes to quantities + * + * @return successful operation (status code 200) + * @see StoreApi#getInventory + */ + default ResponseEntity> getInventory() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /store/order/{orderId} : Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * + * @param orderId ID of pet that needs to be fetched (required) + * @return successful operation (status code 200) + * or Invalid ID supplied (status code 400) + * or Order not found (status code 404) + * @see StoreApi#getOrderById + */ + default ResponseEntity getOrderById(Long orderId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /store/order : Place an order for a pet + * + * + * @param order order placed for purchasing the pet (required) + * @return successful operation (status code 200) + * or Invalid Order (status code 400) + * @see StoreApi#placeOrder + */ + default ResponseEntity placeOrder(Order order) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 000000000000..1c797a8b3cc7 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,308 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.3.0-SNAPSHOT). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +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; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.util.List; +import java.util.Map; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "user", description = "Operations about user") +public interface UserApi { + + default UserApiDelegate getDelegate() { + return new UserApiDelegate() {}; + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUser", + summary = "Create user", + description = "This can only be done by the logged in user.", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "default", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user", + consumes = { "application/json" } + ) + + default ResponseEntity createUser( + @Parameter(name = "User", description = "Created user object", required = true) @Valid @RequestBody User user + ) { + return getDelegate().createUser(user); + } + + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithArrayInput", + summary = "Creates list of users with given input array", + description = "", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "default", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithArray", + consumes = { "application/json" } + ) + + default ResponseEntity createUsersWithArrayInput( + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + ) { + return getDelegate().createUsersWithArrayInput(user); + } + + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + */ + @Operation( + operationId = "createUsersWithListInput", + summary = "Creates list of users with given input array", + description = "", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "default", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/user/createWithList", + consumes = { "application/json" } + ) + + default ResponseEntity createUsersWithListInput( + @Parameter(name = "User", description = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user + ) { + return getDelegate().createUsersWithListInput(user); + } + + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "deleteUser", + summary = "Delete user", + description = "This can only be done by the logged in user.", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/user/{username}" + ) + + default ResponseEntity deleteUser( + @Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + ) { + return getDelegate().deleteUser(username); + } + + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "getUserByName", + summary = "Get user by user name", + description = "", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = User.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/{username}", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity getUserByName( + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username + ) { + return getDelegate().getUserByName(username); + } + + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + */ + @Operation( + operationId = "loginUser", + summary = "Logs user into the system", + description = "", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/xml", schema = @Schema(implementation = String.class)), + @Content(mediaType = "application/json", schema = @Schema(implementation = String.class)) + }), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/login", + produces = { "application/xml", "application/json" } + ) + + default ResponseEntity loginUser( + @NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password + ) { + return getDelegate().loginUser(username, password); + } + + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + */ + @Operation( + operationId = "logoutUser", + summary = "Logs out current logged in user session", + description = "", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "default", description = "successful operation") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/user/logout" + ) + + default ResponseEntity logoutUser( + + ) { + return getDelegate().logoutUser(); + } + + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + */ + @Operation( + operationId = "updateUser", + summary = "Updated user", + description = "This can only be done by the logged in user.", + tags = { "user" }, + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/user/{username}", + consumes = { "application/json" } + ) + + default ResponseEntity updateUser( + @Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username, + @Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user + ) { + return getDelegate().updateUser(username, user); + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiController.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiController.java new file mode 100644 index 000000000000..74b6b18dfffa --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiController.java @@ -0,0 +1,45 @@ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.User; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/v2}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {}); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiDelegate.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiDelegate.java new file mode 100644 index 000000000000..5ecad0f638ff --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/UserApiDelegate.java @@ -0,0 +1,155 @@ +package org.openapitools.api; + +import java.time.OffsetDateTime; +import org.openapitools.model.User; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import jakarta.validation.constraints.*; +import jakarta.validation.Valid; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import jakarta.annotation.Generated; + +/** + * A delegate to be called by the {@link UserApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface UserApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /user : Create user + * This can only be done by the logged in user. + * + * @param user Created user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUser + */ + default ResponseEntity createUser(User user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithArray : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithArrayInput + */ + default ResponseEntity createUsersWithArrayInput(List<@Valid User> user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /user/createWithList : Creates list of users with given input array + * + * + * @param user List of user object (required) + * @return successful operation (status code 200) + * @see UserApi#createUsersWithListInput + */ + default ResponseEntity createUsersWithListInput(List<@Valid User> user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /user/{username} : Delete user + * This can only be done by the logged in user. + * + * @param username The name that needs to be deleted (required) + * @return Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#deleteUser + */ + default ResponseEntity deleteUser(String username) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/{username} : Get user by user name + * + * + * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @return successful operation (status code 200) + * or Invalid username supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#getUserByName + */ + default ResponseEntity getUserByName(String username) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + String exampleString = " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123 "; + ApiUtil.setExampleResponse(request, "application/xml", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/login : Logs user into the system + * + * + * @param username The user name for login (required) + * @param password The password for login in clear text (required) + * @return successful operation (status code 200) + * or Invalid username/password supplied (status code 400) + * @see UserApi#loginUser + */ + default ResponseEntity loginUser(String username, + String password) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /user/logout : Logs out current logged in user session + * + * + * @return successful operation (status code 200) + * @see UserApi#logoutUser + */ + default ResponseEntity logoutUser() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * PUT /user/{username} : Updated user + * This can only be done by the logged in user. + * + * @param username name that need to be deleted (required) + * @param user Updated user object (required) + * @return Invalid user supplied (status code 400) + * or User not found (status code 404) + * @see UserApi#updateUser + */ + default ResponseEntity updateUser(String username, + User user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java new file mode 100644 index 000000000000..9aa29284ab5f --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/HomeController.java @@ -0,0 +1,20 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.GetMapping; + +/** + * Home redirection to OpenAPI api documentation + */ +@Controller +public class HomeController { + + @RequestMapping("/") + public String index() { + return "redirect:swagger-ui.html"; + } + +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java new file mode 100644 index 000000000000..2ea502c445ae --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/configuration/SpringDocConfiguration.java @@ -0,0 +1,43 @@ +package org.openapitools.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.Contact; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.security.SecurityScheme; + +@Configuration +public class SpringDocConfiguration { + + @Bean(name = "org.openapitools.configuration.SpringDocConfiguration.apiInfo") + OpenAPI apiInfo() { + return new OpenAPI() + .info( + new Info() + .title("OpenAPI Petstore") + .description("This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.") + .license( + new License() + .name("Apache-2.0") + .url("https://www.apache.org/licenses/LICENSE-2.0.html") + ) + .version("1.0.0") + ) + .components( + new Components() + .addSecuritySchemes("petstore_auth", new SecurityScheme() + .type(SecurityScheme.Type.OAUTH2) + ) + .addSecuritySchemes("api_key", new SecurityScheme() + .type(SecurityScheme.Type.APIKEY) + .in(SecurityScheme.In.HEADER) + .name("api_key") + ) + ) + ; + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Category.java new file mode 100644 index 000000000000..f288a0edde9d --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Category.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * A category for a pet + */ + +@Schema(name = "Category", description = "A category for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Category { + + private Long id; + + private String name; + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") + @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/ModelApiResponse.java new file mode 100644 index 000000000000..369df105a62e --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -0,0 +1,134 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * Describes the result of uploading an image resource + */ + +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") +@JsonTypeName("ApiResponse") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ModelApiResponse { + + private Integer code; + + private String type; + + private String message; + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + + @Schema(name = "code", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + */ + + @Schema(name = "type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ModelApiResponse _apiResponse = (ModelApiResponse) o; + return Objects.equals(this.code, _apiResponse.code) && + Objects.equals(this.type, _apiResponse.type) && + Objects.equals(this.message, _apiResponse.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, type, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Order.java new file mode 100644 index 000000000000..906d04ddd72a --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Order.java @@ -0,0 +1,245 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * An order for a pets from the pet store + */ + +@Schema(name = "Order", description = "An order for a pets from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Order { + + private Long id; + + private Long petId; + + private Integer quantity; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime shipDate; + + /** + * Order Status + */ + public enum StatusEnum { + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + private Boolean complete = false; + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get petId + * @return petId + */ + + @Schema(name = "petId", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("petId") + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get quantity + * @return quantity + */ + + @Schema(name = "quantity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order shipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Get shipDate + * @return shipDate + */ + @Valid + @Schema(name = "shipDate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("shipDate") + public OffsetDateTime getShipDate() { + return shipDate; + } + + public void setShipDate(OffsetDateTime shipDate) { + this.shipDate = shipDate; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Order Status + * @return status + */ + + @Schema(name = "status", description = "Order Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + /** + * Get complete + * @return complete + */ + + @Schema(name = "complete", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("complete") + public Boolean getComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Order order = (Order) o; + return Objects.equals(this.id, order.id) && + Objects.equals(this.petId, order.petId) && + Objects.equals(this.quantity, order.quantity) && + Objects.equals(this.shipDate, order.shipDate) && + Objects.equals(this.status, order.status) && + Objects.equals(this.complete, order.complete); + } + + @Override + public int hashCode() { + return Objects.hash(id, petId, quantity, shipDate, status, complete); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java new file mode 100644 index 000000000000..7c6d9a828f2c --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java @@ -0,0 +1,284 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.Category; +import org.openapitools.model.Tag; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * A pet for sale in the pet store + */ + +@Schema(name = "Pet", description = "A pet for sale in the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Pet { + + private Long id; + + private Category category; + + private String name; + + @Valid + private List photoUrls = new ArrayList<>(); + + @Valid + private List<@Valid Tag> tags; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @Deprecated + private StatusEnum status; + + public Pet() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Pet(String name, List photoUrls) { + this.name = name; + this.photoUrls = photoUrls; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + */ + @Valid + @Schema(name = "category", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("category") + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @NotNull + @Schema(name = "name", example = "doggie", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + */ + @NotNull + @Schema(name = "photoUrls", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("photoUrls") + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet tags(List<@Valid Tag> tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @Valid + @Schema(name = "tags", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("tags") + public List<@Valid Tag> getTags() { + return tags; + } + + public void setTags(List<@Valid Tag> tags) { + this.tags = tags; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + * @deprecated + */ + + @Schema(name = "status", description = "pet status in the store", deprecated = true, requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + @Deprecated + public StatusEnum getStatus() { + return status; + } + + /** + * @deprecated + */ + @Deprecated + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, category, name, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Tag.java new file mode 100644 index 000000000000..2f0f6cb47607 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Tag.java @@ -0,0 +1,108 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * A tag for a pet + */ + +@Schema(name = "Tag", description = "A tag for a pet") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class Tag { + + private Long id; + + private String name; + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + + @Schema(name = "name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/User.java new file mode 100644 index 000000000000..55f1824b9417 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,252 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import jakarta.annotation.Generated; + +/** + * A User who is purchasing from the pet store + */ + +@Schema(name = "User", description = "A User who is purchasing from the pet store") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class User { + + private Long id; + + private String username; + + private String firstName; + + private String lastName; + + private String email; + + private String password; + + private String phone; + + private Integer userStatus; + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + + @Schema(name = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + */ + + @Schema(name = "username", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("username") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * @return firstName + */ + + @Schema(name = "firstName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("firstName") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * @return lastName + */ + + @Schema(name = "lastName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastName") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + */ + + @Schema(name = "email", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get password + * @return password + */ + + @Schema(name = "password", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * @return phone + */ + + @Schema(name = "phone", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("phone") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + /** + * User Status + * @return userStatus + */ + + @Schema(name = "userStatus", description = "User Status", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userStatus") + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.id, user.id) && + Objects.equals(this.username, user.username) && + Objects.equals(this.firstName, user.firstName) && + Objects.equals(this.lastName, user.lastName) && + Objects.equals(this.email, user.email) && + Objects.equals(this.password, user.password) && + Objects.equals(this.phone, user.phone) && + Objects.equals(this.userStatus, user.userStatus); + } + + @Override + public int hashCode() { + return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/application.properties b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/application.properties new file mode 100644 index 000000000000..7e90813e59b2 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/application.properties @@ -0,0 +1,3 @@ +server.port=8080 +spring.jackson.date-format=org.openapitools.RFC3339DateFormat +spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/openapi.yaml new file mode 100644 index 000000000000..8ba64208aad5 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/resources/openapi.yaml @@ -0,0 +1,975 @@ +openapi: 3.0.0 +info: + description: "This is a sample server Petstore server. For this sample, you can\ + \ use the api key `special-key` to test the authorization filters." + license: + name: Apache-2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + title: OpenAPI Petstore + version: 1.0.0 +externalDocs: + description: Find out more about Swagger + url: http://swagger.io +servers: +- url: http://petstore.swagger.io/v2 +tags: +- description: Everything about your Pets + name: pet +- description: Access to Petstore orders + name: store +- description: Operations about user + name: user +paths: + /pet: + post: + description: "" + operationId: addPet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/xml: + examples: + pet1: + $ref: '#/components/examples/Pet1' + pet2: + $ref: '#/components/examples/Pet2' + schema: + $ref: '#/components/schemas/Pet' + application/json: + examples: + pet3: + $ref: '#/components/examples/Pet3' + pet4: + $ref: '#/components/examples/Pet4' + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Add a new pet to the store + tags: + - pet + x-content-type: application/json + x-accepts: "application/json,application/xml" + x-tags: + - 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' + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - petstore_auth: + - write:pets + - read:pets + summary: Update an existing pet + tags: + - pet + x-content-type: application/json + x-accepts: "application/json,application/xml" + x-tags: + - tag: pet + /pet/findByStatus: + get: + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - deprecated: true + description: Status values that need to be considered for filter + explode: false + in: query + name: status + required: true + schema: + items: + default: available + enum: + - available + - pending + - sold + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + examples: + pets: + $ref: '#/components/examples/Pets' + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid status value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by status + tags: + - pet + x-accepts: "application/json,application/xml" + x-tags: + - tag: pet + /pet/findByTags: + get: + deprecated: true + description: "Multiple tags can be provided with comma separated strings. Use\ + \ tag1, tag2, tag3 for testing." + operationId: findPetsByTags + parameters: + - description: Tags to filter by + explode: false + in: query + name: tags + required: true + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/xml: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + application/json: + schema: + items: + $ref: '#/components/schemas/Pet' + type: array + description: successful operation + "400": + description: Invalid tag value + security: + - petstore_auth: + - read:pets + summary: Finds Pets by tags + tags: + - pet + x-accepts: "application/json,application/xml" + x-tags: + - tag: pet + /pet/{petId}: + delete: + description: "" + operationId: deletePet + parameters: + - explode: false + in: header + name: api_key + required: false + schema: + type: string + style: simple + - description: Pet id to delete + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "400": + description: Invalid pet value + security: + - petstore_auth: + - write:pets + - read:pets + summary: Deletes a pet + tags: + - pet + x-accepts: application/json + x-tags: + - tag: pet + get: + description: Returns a single pet + operationId: getPetById + parameters: + - description: ID of pet to return + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + summary: Find pet by ID + tags: + - pet + x-accepts: "application/json,application/xml" + x-tags: + - tag: pet + post: + description: "" + operationId: updatePetWithForm + parameters: + - description: ID of pet that needs to be updated + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/updatePetWithForm_request' + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - write:pets + - read:pets + summary: Updates a pet in the store with form data + tags: + - pet + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + x-tags: + - tag: pet + /pet/{petId}/uploadImage: + post: + description: "" + operationId: uploadFile + parameters: + - description: ID of pet to update + explode: false + in: path + name: petId + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/uploadFile_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + description: successful operation + security: + - petstore_auth: + - write:pets + - read:pets + summary: uploads an image + tags: + - pet + x-content-type: multipart/form-data + x-accepts: application/json + x-tags: + - tag: pet + /store/inventory: + get: + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + "200": + content: + application/json: + schema: + additionalProperties: + format: int32 + type: integer + type: object + description: successful operation + security: + - api_key: [] + summary: Returns pet inventories by status + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + /store/order: + post: + description: "" + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid Order + summary: Place an order for a pet + tags: + - store + x-content-type: application/json + x-accepts: "application/json,application/xml" + x-tags: + - tag: store + /store/order/{orderId}: + delete: + description: For valid response try integer IDs with value < 1000. Anything + above 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - description: ID of the order that needs to be deleted + explode: false + in: path + name: orderId + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Delete purchase order by ID + tags: + - store + x-accepts: application/json + x-tags: + - tag: store + get: + description: For valid response try integer IDs with value <= 5 or > 10. Other + values will generate exceptions + operationId: getOrderById + parameters: + - description: ID of pet that needs to be fetched + explode: false + in: path + name: orderId + required: true + schema: + format: int64 + maximum: 5 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + description: successful operation + "400": + description: Invalid ID supplied + "404": + description: Order not found + summary: Find purchase order by ID + tags: + - store + x-accepts: "application/json,application/xml" + x-tags: + - tag: store + /user: + post: + description: This can only be done by the logged in user. + operationId: createUser + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Create user + tags: + - user + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithArray: + post: + description: "" + operationId: createUsersWithArrayInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/createWithList: + post: + description: "" + operationId: createUsersWithListInput + requestBody: + $ref: '#/components/requestBodies/UserArray' + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Creates list of users with given input array + tags: + - user + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: user + /user/login: + get: + description: "" + operationId: loginUser + parameters: + - description: The user name for login + explode: true + in: query + name: username + required: true + schema: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" + type: string + style: form + - description: The password for login in clear text + explode: true + in: query + name: password + required: true + schema: + type: string + style: form + responses: + "200": + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + description: successful operation + headers: + Set-Cookie: + description: Cookie authentication key for use with the `api_key` apiKey + authentication. + explode: false + schema: + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + type: string + style: simple + X-Rate-Limit: + description: calls per hour allowed by the user + explode: false + schema: + format: int32 + type: integer + style: simple + X-Expires-After: + description: date in UTC when token expires + explode: false + schema: + format: date-time + type: string + style: simple + "400": + description: Invalid username/password supplied + summary: Logs user into the system + tags: + - user + x-accepts: "application/json,application/xml" + x-tags: + - tag: user + /user/logout: + get: + description: "" + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + summary: Logs out current logged in user session + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + /user/{username}: + delete: + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - description: The name that needs to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + description: Invalid username supplied + "404": + description: User not found + security: + - api_key: [] + summary: Delete user + tags: + - user + x-accepts: application/json + x-tags: + - tag: user + get: + description: "" + operationId: getUserByName + parameters: + - description: The name that needs to be fetched. Use user1 for testing. + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + description: successful operation + "400": + description: Invalid username supplied + "404": + description: User not found + summary: Get user by user name + tags: + - user + x-accepts: "application/json,application/xml" + x-tags: + - tag: user + put: + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - description: name that need to be deleted + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + responses: + "400": + description: Invalid user supplied + "404": + description: User not found + security: + - api_key: [] + summary: Updated user + tags: + - user + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: user +components: + examples: + Pet1: + summary: A representation of a cat + value: + id: 12345 + category: + id: 12345 + name: cats + name: Fluffy + photoUrls: + - url: https://www.example.com/fluffy.jpg + tags: + - id: 12345 + name: fluffy + status: available + Pet2: + summary: A representation of a dog + value: + id: 12346 + category: + id: 12346 + name: dogs + name: Fido + photoUrls: + - url: https://www.example.com/fido.jpg + tags: + - id: 12346 + name: fido + status: available + Pet3: + summary: A representation of a monkey + value: + id: 12347 + category: + id: 12347 + name: monkeys + name: George + photoUrls: + - url: https://www.example.com/george.jpg + tags: + - id: 12347 + name: george + status: available + Pet4: + summary: A representation of a fish + value: + id: 12348 + category: + id: 12348 + name: fish + name: Nemo + photoUrls: + - url: https://www.example.com/nemo.jpg + tags: + - id: 12348 + name: nemo + status: available + Pets: + summary: A representation of a list of pets + value: + - id: 12345 + category: + id: 12345 + name: cats + name: Fluffy + photoUrls: + - url: https://www.example.com/fluffy.jpg + tags: + - id: 12345 + name: fluffy + status: available + - id: 12346 + category: + id: 12346 + name: dogs + name: Fido + photoUrls: + - url: https://www.example.com/fido.jpg + tags: + - id: 12346 + name: fido + status: available + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + schemas: + Order: + description: An order for a pets from the pet store + example: + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed + properties: + id: + format: int64 + type: integer + petId: + format: int64 + type: integer + quantity: + format: int32 + type: integer + shipDate: + format: date-time + type: string + status: + description: Order Status + enum: + - placed + - approved + - delivered + type: string + complete: + default: false + type: boolean + title: Pet Order + type: object + xml: + name: Order + Category: + description: A category for a pet + example: + name: name + id: 6 + properties: + id: + format: int64 + type: integer + name: + pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" + type: string + title: Pet category + type: object + xml: + name: Category + User: + description: A User who is purchasing from the pet store + example: + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username + properties: + id: + format: int64 + type: integer + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + description: User Status + format: int32 + type: integer + title: a User + type: object + xml: + name: User + Tag: + description: A tag for a pet + example: + name: name + id: 1 + properties: + id: + format: int64 + type: integer + name: + type: string + title: Pet Tag + type: object + xml: + name: Tag + Pet: + description: A pet for sale in the pet store + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 0 + category: + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available + properties: + id: + format: int64 + type: integer + category: + $ref: '#/components/schemas/Category' + name: + example: doggie + type: string + photoUrls: + items: + type: string + type: array + xml: + name: photoUrl + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + name: tag + wrapped: true + status: + deprecated: true + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + title: a Pet + type: object + xml: + name: Pet + ApiResponse: + description: Describes the result of uploading an image resource + example: + code: 0 + type: type + message: message + properties: + code: + format: int32 + type: integer + type: + type: string + message: + type: string + title: An uploaded response + type: object + updatePetWithForm_request: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + type: object + uploadFile_request: + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + format: binary + type: string + type: object + securitySchemes: + petstore_auth: + flows: + implicit: + authorizationUrl: http://petstore.swagger.io/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + type: oauth2 + api_key: + in: header + name: api_key + type: apiKey diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java new file mode 100644 index 000000000000..3681f67e7705 --- /dev/null +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java @@ -0,0 +1,13 @@ +package org.openapitools; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class OpenApiGeneratorApplicationTests { + + @Test + void contextLoads() { + } + +} \ No newline at end of file From 9a75a90f5a976c3c13aeeb4560ae965c8498758c Mon Sep 17 00:00:00 2001 From: GlobeDaBoarder Date: Mon, 15 Jan 2024 21:51:58 +0200 Subject: [PATCH 4/5] added test --- .../codegen/java/spring/SpringCodegenTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 74538f2e1e3d..19d0ee72edb3 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 @@ -4437,4 +4437,18 @@ public void testExampleAnnotationGeneration_issue17610() throws IOException { .assertMethodAnnotations() .recursivelyContainsWithName("ExampleObject"); } + + @Test + public void testExampleAnnotationGeneration_issue17610_2() throws IOException { + final Map generatedCodeFiles = generateFromContract("src/test/resources/3_0/spring/petstore_with_api_response_examples.yaml", SPRING_BOOT); + + JavaFileAssert.assertThat(generatedCodeFiles.get("PetApi.java")) + .assertMethod("addPet") + .assertMethodAnnotations() + .recursivelyContainsWithName("ExampleObject") + .toMethod().toFileAssert() + .assertMethod("findPetsByStatus") + .assertMethodAnnotations() + .recursivelyContainsWithName("ExampleObject"); + } } From de249be11dd6560c844b382b77b6b6771eea72db Mon Sep 17 00:00:00 2001 From: Martin <2026226+martin-mfg@users.noreply.github.com> Date: Thu, 18 Jan 2024 01:43:07 +0100 Subject: [PATCH 5/5] generate samples --- .../java/apache-httpclient/api/openapi.yaml | 14 +- .../java/feign-no-nullable/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 20 +-- .../org/openapitools/client/api/StoreApi.java | 8 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../petstore/java/feign/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 20 +-- .../org/openapitools/client/api/StoreApi.java | 8 +- .../org/openapitools/client/api/UserApi.java | 12 +- .../java/google-api-client/api/openapi.yaml | 14 +- .../api/openapi.yaml | 14 +- .../java/jersey2-java8/api/openapi.yaml | 14 +- .../petstore/java/jersey3/api/openapi.yaml | 14 +- .../java/native-async/api/openapi.yaml | 14 +- .../java/native-jakarta/api/openapi.yaml | 18 +-- .../petstore/java/native/api/openapi.yaml | 14 +- .../okhttp-gson-3.1/.openapi-generator/FILES | 2 + .../petstore/java/okhttp-gson-3.1/README.md | 1 + .../java/okhttp-gson-3.1/api/openapi.yaml | 145 ++++++++++++------ .../java/okhttp-gson-3.1/docs/Animal.md | 4 +- .../java/okhttp-gson-3.1/docs/AnyTypeTest.md | 2 +- .../petstore/java/okhttp-gson-3.1/docs/Cat.md | 2 +- .../java/okhttp-gson-3.1/docs/Category.md | 4 +- .../okhttp-gson-3.1/docs/ModelApiResponse.md | 6 +- .../java/okhttp-gson-3.1/docs/Order.md | 10 +- .../petstore/java/okhttp-gson-3.1/docs/Pet.md | 8 +- .../petstore/java/okhttp-gson-3.1/docs/Tag.md | 4 +- .../java/okhttp-gson-3.1/docs/User.md | 16 +- .../java/org/openapitools/client/JSON.java | 1 + .../org/openapitools/client/model/Animal.java | 30 ++-- .../client/model/AnyTypeTest.java | 22 ++- .../org/openapitools/client/model/Cat.java | 20 +-- .../openapitools/client/model/Category.java | 31 ++-- .../org/openapitools/client/model/Dog.java | 12 -- .../client/model/ModelApiResponse.java | 42 +++-- .../client/model/OneOfStringOrInt.java | 50 +++--- .../org/openapitools/client/model/Order.java | 72 ++++----- .../org/openapitools/client/model/Pet.java | 109 ++++++++----- .../org/openapitools/client/model/Tag.java | 31 ++-- .../org/openapitools/client/model/User.java | 94 ++++++------ .../api/openapi.yaml | 18 +-- .../src/main/resources/openapi/openapi.yaml | 14 +- .../api/openapi.yaml | 10 +- .../api/openapi.yaml | 14 +- .../api/openapi.yaml | 14 +- .../okhttp-gson-swagger1/api/openapi.yaml | 18 +-- .../okhttp-gson-swagger2/api/openapi.yaml | 18 +-- .../java/okhttp-gson/api/openapi.yaml | 14 +- .../rest-assured-jackson/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 6 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../org/openapitools/client/api/UserApi.java | 4 +- .../java/rest-assured/api/openapi.yaml | 14 +- .../org/openapitools/client/api/PetApi.java | 6 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../org/openapitools/client/api/UserApi.java | 4 +- .../petstore/java/resteasy/api/openapi.yaml | 14 +- .../resttemplate-jakarta/api/openapi.yaml | 18 +-- .../resttemplate-swagger1/api/openapi.yaml | 18 +-- .../resttemplate-swagger2/api/openapi.yaml | 18 +-- .../resttemplate-withXml/api/openapi.yaml | 14 +- .../java/resttemplate/api/openapi.yaml | 14 +- .../java/retrofit2-play26/api/openapi.yaml | 14 +- .../petstore/java/retrofit2/api/openapi.yaml | 14 +- .../java/retrofit2rx2/api/openapi.yaml | 14 +- .../java/retrofit2rx3/api/openapi.yaml | 14 +- .../java/vertx-no-nullable/api/openapi.yaml | 14 +- .../petstore/java/vertx/api/openapi.yaml | 14 +- .../java/webclient-jakarta/api/openapi.yaml | 14 +- .../java/webclient-swagger2/api/openapi.yaml | 14 +- .../petstore/java/webclient/api/openapi.yaml | 14 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../org/openapitools/api/PetController.java | 6 +- .../org/openapitools/api/StoreController.java | 4 +- .../org/openapitools/api/UserController.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../jersey2-java8-swagger1/api/openapi.yaml | 18 +-- .../jersey2-java8-swagger2/api/openapi.yaml | 18 +-- .../java/jersey2-java8/api/openapi.yaml | 14 +- .../petstore/python-aiohttp/docs/ArrayTest.md | 2 +- .../python-aiohttp/docs/NullableClass.md | 8 +- .../petstore_api/models/array_test.py | 2 +- .../petstore_api/models/nullable_class.py | 8 +- .../client/petstore/python/docs/ArrayTest.md | 2 +- .../petstore/python/docs/NullableClass.md | 8 +- .../python/petstore_api/models/array_test.py | 2 +- .../petstore_api/models/nullable_class.py | 8 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 2 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 6 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../java/org/openapitools/api/PetApi.java | 10 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/UserApi.java | 4 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/META-INF/openapi.yml | 14 +- .../src/main/resources/META-INF/openapi.yml | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 2 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../public/openapi.json | 14 +- .../java-play-framework/public/openapi.json | 14 +- .../src/main/resources/config/openapi.json | 18 +-- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/openapi/openapi.yaml | 14 +- .../src/main/resources/META-INF/openapi.yaml | 14 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 14 +- .../.openapi-generator/FILES | 2 - .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 18 +-- .../src/main/resources/openapi.yaml | 14 +- .../.openapi-generator/FILES | 4 - .../java/org/openapitools/api/PetApi.java | 16 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 16 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- .../src/main/resources/openapi.yaml | 14 +- 170 files changed, 1167 insertions(+), 1131 deletions(-) diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java index f9524104c9f9..5903156bae08 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,7 +83,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) List findPetsByStatus(@Param("status") List status); @@ -96,7 +96,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByStatusWithHttpInfo(@Param("status") List status); @@ -118,7 +118,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) List findPetsByStatus(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -136,7 +136,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -162,7 +162,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Set findPetsByTags(@Param("tags") Set tags); @@ -177,7 +177,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByTagsWithHttpInfo(@Param("tags") Set tags); @@ -201,7 +201,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Set findPetsByTags(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -221,7 +221,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -245,7 +245,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Pet getPetById(@Param("petId") Long petId); @@ -258,7 +258,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getPetByIdWithHttpInfo(@Param("petId") Long petId); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java index e88030d0db43..b6c2b9c1f67c 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java @@ -74,7 +74,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Order getOrderById(@Param("orderId") Long orderId); @@ -87,7 +87,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getOrderByIdWithHttpInfo(@Param("orderId") Long orderId); @@ -102,7 +102,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: */*", - "Accept: application/json", + "Accept: application/json,application/xml", }) Order placeOrder(Order body); @@ -116,7 +116,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: */*", - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse placeOrderWithHttpInfo(Order body); diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java index 07a260168578..6098c23db15f 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/UserApi.java @@ -131,7 +131,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) User getUserByName(@Param("username") String username); @@ -144,7 +144,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getUserByNameWithHttpInfo(@Param("username") String username); @@ -159,7 +159,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) String loginUser(@Param("username") String username, @Param("password") String password); @@ -173,7 +173,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password); @@ -196,7 +196,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) String loginUser(@QueryMap(encoded=true) LoginUserQueryParams queryParams); @@ -215,7 +215,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse loginUserWithHttpInfo(@QueryMap(encoded=true) LoginUserQueryParams queryParams); diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 9a6c3da5e77d..b2da825ffdaf 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -83,7 +83,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) List findPetsByStatus(@Param("status") List status); @@ -96,7 +96,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByStatusWithHttpInfo(@Param("status") List status); @@ -118,7 +118,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) List findPetsByStatus(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -136,7 +136,7 @@ public interface PetApi extends ApiClient.Api { */ @RequestLine("GET /pet/findByStatus?status={status}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) FindPetsByStatusQueryParams queryParams); @@ -162,7 +162,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Set findPetsByTags(@Param("tags") Set tags); @@ -177,7 +177,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByTagsWithHttpInfo(@Param("tags") Set tags); @@ -201,7 +201,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Set findPetsByTags(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -221,7 +221,7 @@ public FindPetsByStatusQueryParams status(final List value) { @Deprecated @RequestLine("GET /pet/findByTags?tags={tags}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) FindPetsByTagsQueryParams queryParams); @@ -245,7 +245,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Pet getPetById(@Param("petId") Long petId); @@ -258,7 +258,7 @@ public FindPetsByTagsQueryParams tags(final Set value) { */ @RequestLine("GET /pet/{petId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getPetByIdWithHttpInfo(@Param("petId") Long petId); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index 7a4bfd120f11..15d02d6d952b 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -74,7 +74,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) Order getOrderById(@Param("orderId") Long orderId); @@ -87,7 +87,7 @@ public interface StoreApi extends ApiClient.Api { */ @RequestLine("GET /store/order/{orderId}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getOrderByIdWithHttpInfo(@Param("orderId") Long orderId); @@ -102,7 +102,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: application/json", - "Accept: application/json", + "Accept: application/json,application/xml", }) Order placeOrder(Order order); @@ -116,7 +116,7 @@ public interface StoreApi extends ApiClient.Api { @RequestLine("POST /store/order") @Headers({ "Content-Type: application/json", - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse placeOrderWithHttpInfo(Order order); diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java index b2a98b3df016..404290d569a8 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/UserApi.java @@ -131,7 +131,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) User getUserByName(@Param("username") String username); @@ -144,7 +144,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/{username}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse getUserByNameWithHttpInfo(@Param("username") String username); @@ -159,7 +159,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) String loginUser(@Param("username") String username, @Param("password") String password); @@ -173,7 +173,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password); @@ -196,7 +196,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) String loginUser(@QueryMap(encoded=true) LoginUserQueryParams queryParams); @@ -215,7 +215,7 @@ public interface UserApi extends ApiClient.Api { */ @RequestLine("GET /user/login?username={username}&password={password}") @Headers({ - "Accept: application/json", + "Accept: application/json,application/xml", }) ApiResponse loginUserWithHttpInfo(@QueryMap(encoded=true) LoginUserQueryParams queryParams); diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index 814354567b04..8f79a7c4c5a8 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 07a440cfe9dc..048456607eb6 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native-jakarta/api/openapi.yaml b/samples/client/petstore/java/native-jakarta/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/native-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/native-jakarta/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 07a440cfe9dc..048456607eb6 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES index f752384599d8..5ba46e594fb5 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-3.1/.openapi-generator/FILES @@ -18,6 +18,7 @@ docs/Order.md docs/Pet.md docs/PetApi.md docs/StoreApi.md +docs/StringOrInt.md docs/Tag.md docs/User.md docs/UserApi.md @@ -66,5 +67,6 @@ src/main/java/org/openapitools/client/model/ModelApiResponse.java src/main/java/org/openapitools/client/model/OneOfStringOrInt.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/StringOrInt.java src/main/java/org/openapitools/client/model/Tag.java src/main/java/org/openapitools/client/model/User.java diff --git a/samples/client/petstore/java/okhttp-gson-3.1/README.md b/samples/client/petstore/java/okhttp-gson-3.1/README.md index 35d517693aa9..cb3486b20fb6 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/README.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/README.md @@ -152,6 +152,7 @@ Class | Method | HTTP request | Description - [OneOfStringOrInt](docs/OneOfStringOrInt.md) - [Order](docs/Order.md) - [Pet](docs/Pet.md) + - [StringOrInt](docs/StringOrInt.md) - [Tag](docs/Tag.md) - [User](docs/User.md) diff --git a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml index 3bef14f1df3f..5816eb63139e 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -340,7 +340,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -397,7 +397,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -511,7 +511,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -578,7 +578,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser @@ -744,106 +744,138 @@ components: Order: description: An order for a pets from the pet store example: - petId: "" - quantity: "" - id: "" - shipDate: "" - complete: "" - status: "" + petId: 6 + quantity: 1 + id: 0 + shipDate: 2000-01-23T04:56:07.000+00:00 + complete: false + status: placed properties: id: format: int64 + type: integer petId: format: int64 + type: integer quantity: format: int32 + type: integer shipDate: format: date-time + type: string status: description: Order Status enum: - placed - approved - delivered + type: string complete: default: false + type: boolean title: Pet Order xml: name: Order Category: description: A category for a pet example: - name: "" - id: "" + name: name + id: 6 properties: id: format: int64 + type: integer name: pattern: "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$" + type: string title: Pet category xml: name: Category User: description: A User who is purchasing from the pet store example: - firstName: "" - lastName: "" - password: "" - userStatus: "" - phone: "" - id: "" - email: "" - username: "" + firstName: firstName + lastName: lastName + password: password + userStatus: 6 + phone: phone + id: 0 + email: email + username: username properties: id: format: int64 - username: {} - firstName: {} - lastName: {} - email: {} - password: {} - phone: {} + type: integer + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string userStatus: description: User Status format: int32 + type: integer title: a User xml: name: User Tag: description: A tag for a pet + example: + name: name + id: 1 properties: id: format: int64 - name: {} + type: integer + name: + type: string title: Pet Tag xml: name: Tag Pet: description: A pet for sale in the pet store example: - photoUrls: "" + photoUrls: + - photoUrls + - photoUrls name: doggie - id: "" + id: 0 category: - name: "" - id: "" - tags: "" - status: "" + name: name + id: 6 + tags: + - name: name + id: 1 + - name: name + id: 1 + status: available properties: id: format: int64 + type: integer category: $ref: '#/components/schemas/Category' name: example: doggie + type: string photoUrls: - items: {} + items: + type: string + type: array xml: name: photoUrl wrapped: true tags: items: $ref: '#/components/schemas/Tag' + type: array xml: name: tag wrapped: true @@ -854,6 +886,7 @@ components: - available - pending - sold + type: string required: - name - photoUrls @@ -863,22 +896,29 @@ components: ApiResponse: description: Describes the result of uploading an image resource example: - code: "" - type: "" - message: "" + code: 0 + type: type + message: message properties: code: format: int32 - type: {} - message: {} + type: integer + type: + type: string + message: + type: string title: An uploaded response StringOrInt: + anyOf: + - type: string + - format: int32 + type: integer description: string or int OneOfStringOrInt: description: string or int (onefOf) oneOf: - type: string - - {} + - type: integer Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -889,14 +929,17 @@ components: allOf: - $ref: '#/components/schemas/Animal' - properties: - declawed: {} + declawed: + type: boolean Animal: discriminator: propertyName: className properties: - className: {} + className: + type: string color: default: red + type: string required: - className simple_text: @@ -908,13 +951,17 @@ components: description: test array in 3.1 spec items: type: string + type: array HTTPValidationError: properties: {} title: HTTPValidationError + type: object AnyOfArray: anyOf: - - items: {} - - items: {} + - items: + type: string + - items: + type: integer updatePetWithForm_request: properties: name: diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md index 79206dd6e28c..d9b32f14c88a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Animal.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**className** | **Object** | | | -|**color** | **Object** | | [optional] | +|**className** | **String** | | | +|**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md index 82fec4a0a5ed..7c46d45edb4d 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/AnyTypeTest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**anyTypeProperty** | **Object** | | [optional] | -|**arrayProp** | **Object** | test array in 3.1 spec | [optional] | +|**arrayProp** | **List<String>** | test array in 3.1 spec | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md index 545c4f78c3aa..390dd519c8ce 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Cat.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**declawed** | **Object** | | [optional] | +|**declawed** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md index 1a3cbfcc5e38..a7fc939d252e 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Category.md @@ -8,8 +8,8 @@ A category for a pet | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Object** | | [optional] | -|**name** | **Object** | | [optional] | +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md index d476e3a42aab..cd7e3c400be6 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/ModelApiResponse.md @@ -8,9 +8,9 @@ Describes the result of uploading an image resource | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**code** | **Object** | | [optional] | -|**type** | **Object** | | [optional] | -|**message** | **Object** | | [optional] | +|**code** | **Integer** | | [optional] | +|**type** | **String** | | [optional] | +|**message** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md index 2d80a0d37fb8..0c33059b8b6a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Order.md @@ -8,12 +8,12 @@ An order for a pets from the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Object** | | [optional] | -|**petId** | **Object** | | [optional] | -|**quantity** | **Object** | | [optional] | -|**shipDate** | **Object** | | [optional] | +|**id** | **Long** | | [optional] | +|**petId** | **Long** | | [optional] | +|**quantity** | **Integer** | | [optional] | +|**shipDate** | **OffsetDateTime** | | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | -|**complete** | **Object** | | [optional] | +|**complete** | **Boolean** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md index b69b3b537404..8bb363301232 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Pet.md @@ -8,11 +8,11 @@ A pet for sale in the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Object** | | [optional] | +|**id** | **Long** | | [optional] | |**category** | [**Category**](Category.md) | | [optional] | -|**name** | **Object** | | | -|**photoUrls** | **Object** | | | -|**tags** | **Object** | | [optional] | +|**name** | **String** | | | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md index 6b5547b120b7..abfde4afb501 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/Tag.md @@ -8,8 +8,8 @@ A tag for a pet | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Object** | | [optional] | -|**name** | **Object** | | [optional] | +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md b/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md index 02cacc0b6aaf..426845227bd3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md +++ b/samples/client/petstore/java/okhttp-gson-3.1/docs/User.md @@ -8,14 +8,14 @@ A User who is purchasing from the pet store | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **Object** | | [optional] | -|**username** | **Object** | | [optional] | -|**firstName** | **Object** | | [optional] | -|**lastName** | **Object** | | [optional] | -|**email** | **Object** | | [optional] | -|**password** | **Object** | | [optional] | -|**phone** | **Object** | | [optional] | -|**userStatus** | **Object** | User Status | [optional] | +|**id** | **Long** | | [optional] | +|**username** | **String** | | [optional] | +|**firstName** | **String** | | [optional] | +|**lastName** | **String** | | [optional] | +|**email** | **String** | | [optional] | +|**password** | **String** | | [optional] | +|**phone** | **String** | | [optional] | +|**userStatus** | **Integer** | User Status | [optional] | diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java index c30fa9e523d0..72223340f53d 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/JSON.java @@ -138,6 +138,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OneOfStringOrInt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Order.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.StringOrInt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Tag.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.User.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java index e4d09f656104..e93327f47e76 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Animal.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,17 +53,17 @@ public class Animal { public static final String SERIALIZED_NAME_CLASS_NAME = "className"; @SerializedName(SERIALIZED_NAME_CLASS_NAME) - protected Object className = null; + protected String className; public static final String SERIALIZED_NAME_COLOR = "color"; @SerializedName(SERIALIZED_NAME_COLOR) - private Object color = red; + private String color = "red"; public Animal() { this.className = this.getClass().getSimpleName(); } - public Animal className(Object className) { + public Animal className(String className) { this.className = className; return this; } @@ -73,17 +72,17 @@ public Animal className(Object className) { * Get className * @return className **/ - @javax.annotation.Nullable - public Object getClassName() { + @javax.annotation.Nonnull + public String getClassName() { return className; } - public void setClassName(Object className) { + public void setClassName(String className) { this.className = className; } - public Animal color(Object color) { + public Animal color(String color) { this.color = color; return this; } @@ -93,11 +92,11 @@ public Animal color(Object color) { * @return color **/ @javax.annotation.Nullable - public Object getColor() { + public String getColor() { return color; } - public void setColor(Object color) { + public void setColor(String color) { this.color = color; } @@ -161,22 +160,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, animal.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(className, color, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java index cd1b0f6169e5..30d571e2cdc8 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/AnyTypeTest.java @@ -20,7 +20,9 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -58,7 +60,7 @@ public class AnyTypeTest { public static final String SERIALIZED_NAME_ARRAY_PROP = "array_prop"; @SerializedName(SERIALIZED_NAME_ARRAY_PROP) - private Object arrayProp = null; + private List arrayProp; public AnyTypeTest() { } @@ -82,21 +84,29 @@ public void setAnyTypeProperty(Object anyTypeProperty) { } - public AnyTypeTest arrayProp(Object arrayProp) { + public AnyTypeTest arrayProp(List arrayProp) { this.arrayProp = arrayProp; return this; } + public AnyTypeTest addArrayPropItem(String arrayPropItem) { + if (this.arrayProp == null) { + this.arrayProp = new ArrayList<>(); + } + this.arrayProp.add(arrayPropItem); + return this; + } + /** * test array in 3.1 spec * @return arrayProp **/ @javax.annotation.Nullable - public Object getArrayProp() { + public List getArrayProp() { return arrayProp; } - public void setArrayProp(Object arrayProp) { + public void setArrayProp(List arrayProp) { this.arrayProp = arrayProp; } @@ -225,6 +235,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the optional json data is an array if present + if (jsonObj.get("array_prop") != null && !jsonObj.get("array_prop").isJsonNull() && !jsonObj.get("array_prop").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `array_prop` to be an array in the JSON string but got `%s`", jsonObj.get("array_prop").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java index b400a874c4e9..876f2c52bb26 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Cat.java @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.Animal; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -55,13 +54,13 @@ public class Cat extends Animal { public static final String SERIALIZED_NAME_DECLAWED = "declawed"; @SerializedName(SERIALIZED_NAME_DECLAWED) - private Object declawed = null; + private Boolean declawed; public Cat() { this.className = this.getClass().getSimpleName(); } - public Cat declawed(Object declawed) { + public Cat declawed(Boolean declawed) { this.declawed = declawed; return this; } @@ -71,11 +70,11 @@ public Cat declawed(Object declawed) { * @return declawed **/ @javax.annotation.Nullable - public Object getDeclawed() { + public Boolean getDeclawed() { return declawed; } - public void setDeclawed(Object declawed) { + public void setDeclawed(Boolean declawed) { this.declawed = declawed; } @@ -139,22 +138,11 @@ public boolean equals(Object o) { super.equals(o); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(declawed, super.hashCode(), additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java index bfacb4af2974..f12855dae504 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Category.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,16 +53,16 @@ public class Category { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Object id = null; + private Long id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private Object name = null; + private String name; public Category() { } - public Category id(Object id) { + public Category id(Long id) { this.id = id; return this; } @@ -73,16 +72,16 @@ public Category id(Object id) { * @return id **/ @javax.annotation.Nullable - public Object getId() { + public Long getId() { return id; } - public void setId(Object id) { + public void setId(Long id) { this.id = id; } - public Category name(Object name) { + public Category name(String name) { this.name = name; return this; } @@ -92,11 +91,11 @@ public Category name(Object name) { * @return name **/ @javax.annotation.Nullable - public Object getName() { + public String getName() { return name; } - public void setName(Object name) { + public void setName(String name) { this.name = name; } @@ -160,22 +159,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, category.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(id, name, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -225,6 +213,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java index 671bfe24f7c4..52f9e1adea2a 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Dog.java @@ -22,7 +22,6 @@ import java.io.IOException; import java.util.Arrays; import org.openapitools.client.model.Animal; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -139,22 +138,11 @@ public boolean equals(Object o) { super.equals(o); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(breed, super.hashCode(), additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 39fc2d56905a..59645dcffcc2 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,20 +53,20 @@ public class ModelApiResponse { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) - private Object code = null; + private Integer code; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) - private Object type = null; + private String type; public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) - private Object message = null; + private String message; public ModelApiResponse() { } - public ModelApiResponse code(Object code) { + public ModelApiResponse code(Integer code) { this.code = code; return this; } @@ -77,16 +76,16 @@ public ModelApiResponse code(Object code) { * @return code **/ @javax.annotation.Nullable - public Object getCode() { + public Integer getCode() { return code; } - public void setCode(Object code) { + public void setCode(Integer code) { this.code = code; } - public ModelApiResponse type(Object type) { + public ModelApiResponse type(String type) { this.type = type; return this; } @@ -96,16 +95,16 @@ public ModelApiResponse type(Object type) { * @return type **/ @javax.annotation.Nullable - public Object getType() { + public String getType() { return type; } - public void setType(Object type) { + public void setType(String type) { this.type = type; } - public ModelApiResponse message(Object message) { + public ModelApiResponse message(String message) { this.message = message; return this; } @@ -115,11 +114,11 @@ public ModelApiResponse message(Object message) { * @return message **/ @javax.annotation.Nullable - public Object getMessage() { + public String getMessage() { return message; } - public void setMessage(Object message) { + public void setMessage(String message) { this.message = message; } @@ -184,22 +183,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, _apiResponse.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(code, type, message, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -251,6 +239,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java index 4da4e790e613..12dfabf77564 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/OneOfStringOrInt.java @@ -63,7 +63,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterString = gson.getDelegateAdapter(this, TypeToken.get(String.class)); - final TypeAdapter adapterObject = gson.getDelegateAdapter(this, TypeToken.get(Object.class)); + final TypeAdapter adapterInteger = gson.getDelegateAdapter(this, TypeToken.get(Integer.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -79,13 +79,13 @@ public void write(JsonWriter out, OneOfStringOrInt value) throws IOException { elementAdapter.write(out, primitive); return; } - // check if the actual instance is of the type `Object` - if (value.getActualInstance() instanceof Object) { - JsonPrimitive primitive = adapterObject.toJsonTree((Object)value.getActualInstance()).getAsJsonPrimitive(); + // check if the actual instance is of the type `Integer` + if (value.getActualInstance() instanceof Integer) { + JsonPrimitive primitive = adapterInteger.toJsonTree((Integer)value.getActualInstance()).getAsJsonPrimitive(); elementAdapter.write(out, primitive); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Object, String"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Integer, String"); } @Override @@ -111,19 +111,19 @@ public OneOfStringOrInt read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'String'", e); } - // deserialize Object + // deserialize Integer try { // validate the JSON object to see if any exception is thrown if(!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } - actualAdapter = adapterObject; + actualAdapter = adapterInteger; match++; - log.log(Level.FINER, "Input data matches schema 'Object'"); + log.log(Level.FINER, "Input data matches schema 'Integer'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for Object failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'Object'", e); + errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Integer'", e); } if (match == 1) { @@ -145,7 +145,7 @@ public OneOfStringOrInt() { super("oneOf", Boolean.FALSE); } - public OneOfStringOrInt(Object o) { + public OneOfStringOrInt(Integer o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } @@ -157,7 +157,7 @@ public OneOfStringOrInt(String o) { static { schemas.put("String", String.class); - schemas.put("Object", Object.class); + schemas.put("Integer", Integer.class); } @Override @@ -168,7 +168,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Object, String + * Integer, String * * It could be an instance of the 'oneOf' schemas. */ @@ -179,19 +179,19 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof Object) { + if (instance instanceof Integer) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Object, String"); + throw new RuntimeException("Invalid instance type. Must be Integer, String"); } /** * Get the actual instance, which can be the following: - * Object, String + * Integer, String * - * @return The actual instance (Object, String) + * @return The actual instance (Integer, String) */ @Override public Object getActualInstance() { @@ -209,14 +209,14 @@ public String getString() throws ClassCastException { return (String)super.getActualInstance(); } /** - * Get the actual instance of `Object`. If the actual instance is not `Object`, + * Get the actual instance of `Integer`. If the actual instance is not `Integer`, * the ClassCastException will be thrown. * - * @return The actual instance of `Object` - * @throws ClassCastException if the instance is not `Object` + * @return The actual instance of `Integer` + * @throws ClassCastException if the instance is not `Integer` */ - public Object getObject() throws ClassCastException { - return (Object)super.getActualInstance(); + public Integer getInteger() throws ClassCastException { + return (Integer)super.getActualInstance(); } /** @@ -239,18 +239,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for String failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Object + // validate the json string with Integer try { if(!jsonElement.getAsJsonPrimitive().isNumber()) { throw new IllegalArgumentException(String.format("Expected json element to be of type Number in the JSON string but got `%s`", jsonElement.toString())); } validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Object failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Integer failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for OneOfStringOrInt with oneOf schemas: Object, String. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for OneOfStringOrInt with oneOf schemas: Integer, String. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java index 290f1b323e07..53a96c763a7c 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Order.java @@ -20,8 +20,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,19 +54,19 @@ public class Order { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Object id = null; + private Long id; public static final String SERIALIZED_NAME_PET_ID = "petId"; @SerializedName(SERIALIZED_NAME_PET_ID) - private Object petId = null; + private Long petId; public static final String SERIALIZED_NAME_QUANTITY = "quantity"; @SerializedName(SERIALIZED_NAME_QUANTITY) - private Object quantity = null; + private Integer quantity; public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate"; @SerializedName(SERIALIZED_NAME_SHIP_DATE) - private Object shipDate = null; + private OffsetDateTime shipDate; /** * Order Status @@ -79,13 +79,13 @@ public enum StatusEnum { DELIVERED("delivered"); - private Object value; + private String value; - StatusEnum(Object value) { + StatusEnum(String value) { this.value = value; } - public Object getValue() { + public String getValue() { return value; } @@ -94,13 +94,13 @@ public String toString() { return String.valueOf(value); } - public static StatusEnum fromValue(Object value) { + public static StatusEnum fromValue(String value) { for (StatusEnum b : StatusEnum.values()) { if (b.value.equals(value)) { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -111,29 +111,29 @@ public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) thr @Override public StatusEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextObject(); + String value = jsonReader.nextString(); return StatusEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { - Object value = jsonElement.getAsObject(); + String value = jsonElement.getAsString(); StatusEnum.fromValue(value); } } public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status = null; + private StatusEnum status; public static final String SERIALIZED_NAME_COMPLETE = "complete"; @SerializedName(SERIALIZED_NAME_COMPLETE) - private Object complete = false; + private Boolean complete = false; public Order() { } - public Order id(Object id) { + public Order id(Long id) { this.id = id; return this; } @@ -143,16 +143,16 @@ public Order id(Object id) { * @return id **/ @javax.annotation.Nullable - public Object getId() { + public Long getId() { return id; } - public void setId(Object id) { + public void setId(Long id) { this.id = id; } - public Order petId(Object petId) { + public Order petId(Long petId) { this.petId = petId; return this; } @@ -162,16 +162,16 @@ public Order petId(Object petId) { * @return petId **/ @javax.annotation.Nullable - public Object getPetId() { + public Long getPetId() { return petId; } - public void setPetId(Object petId) { + public void setPetId(Long petId) { this.petId = petId; } - public Order quantity(Object quantity) { + public Order quantity(Integer quantity) { this.quantity = quantity; return this; } @@ -181,16 +181,16 @@ public Order quantity(Object quantity) { * @return quantity **/ @javax.annotation.Nullable - public Object getQuantity() { + public Integer getQuantity() { return quantity; } - public void setQuantity(Object quantity) { + public void setQuantity(Integer quantity) { this.quantity = quantity; } - public Order shipDate(Object shipDate) { + public Order shipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; return this; } @@ -200,11 +200,11 @@ public Order shipDate(Object shipDate) { * @return shipDate **/ @javax.annotation.Nullable - public Object getShipDate() { + public OffsetDateTime getShipDate() { return shipDate; } - public void setShipDate(Object shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -228,7 +228,7 @@ public void setStatus(StatusEnum status) { } - public Order complete(Object complete) { + public Order complete(Boolean complete) { this.complete = complete; return this; } @@ -238,11 +238,11 @@ public Order complete(Object complete) { * @return complete **/ @javax.annotation.Nullable - public Object getComplete() { + public Boolean getComplete() { return complete; } - public void setComplete(Object complete) { + public void setComplete(Boolean complete) { this.complete = complete; } @@ -310,22 +310,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, order.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(id, petId, quantity, shipDate, status, complete, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -383,6 +372,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { StatusEnum.validateJsonElement(jsonObj.get("status")); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java index 9fb92dc5c76f..9d0e1e017afa 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Pet.java @@ -20,9 +20,11 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.client.model.Category; -import org.openapitools.jackson.nullable.JsonNullable; +import org.openapitools.client.model.Tag; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -55,7 +57,7 @@ public class Pet { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Object id = null; + private Long id; public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) @@ -63,15 +65,15 @@ public class Pet { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private Object name = null; + private String name; public static final String SERIALIZED_NAME_PHOTO_URLS = "photoUrls"; @SerializedName(SERIALIZED_NAME_PHOTO_URLS) - private Object photoUrls = null; + private List photoUrls = new ArrayList<>(); public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private Object tags = null; + private List tags; /** * pet status in the store @@ -84,13 +86,13 @@ public enum StatusEnum { SOLD("sold"); - private Object value; + private String value; - StatusEnum(Object value) { + StatusEnum(String value) { this.value = value; } - public Object getValue() { + public String getValue() { return value; } @@ -99,13 +101,13 @@ public String toString() { return String.valueOf(value); } - public static StatusEnum fromValue(Object value) { + public static StatusEnum fromValue(String value) { for (StatusEnum b : StatusEnum.values()) { if (b.value.equals(value)) { return b; } } - return null; + throw new IllegalArgumentException("Unexpected value '" + value + "'"); } public static class Adapter extends TypeAdapter { @@ -116,13 +118,13 @@ public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) thr @Override public StatusEnum read(final JsonReader jsonReader) throws IOException { - Object value = jsonReader.nextObject(); + String value = jsonReader.nextString(); return StatusEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { - Object value = jsonElement.getAsObject(); + String value = jsonElement.getAsString(); StatusEnum.fromValue(value); } } @@ -130,12 +132,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATUS = "status"; @Deprecated @SerializedName(SERIALIZED_NAME_STATUS) - private StatusEnum status = null; + private StatusEnum status; public Pet() { } - public Pet id(Object id) { + public Pet id(Long id) { this.id = id; return this; } @@ -145,11 +147,11 @@ public Pet id(Object id) { * @return id **/ @javax.annotation.Nullable - public Object getId() { + public Long getId() { return id; } - public void setId(Object id) { + public void setId(Long id) { this.id = id; } @@ -173,7 +175,7 @@ public void setCategory(Category category) { } - public Pet name(Object name) { + public Pet name(String name) { this.name = name; return this; } @@ -182,50 +184,66 @@ public Pet name(Object name) { * Get name * @return name **/ - @javax.annotation.Nullable - public Object getName() { + @javax.annotation.Nonnull + public String getName() { return name; } - public void setName(Object name) { + public void setName(String name) { this.name = name; } - public Pet photoUrls(Object photoUrls) { + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } + public Pet addPhotoUrlsItem(String photoUrlsItem) { + if (this.photoUrls == null) { + this.photoUrls = new ArrayList<>(); + } + this.photoUrls.add(photoUrlsItem); + return this; + } + /** * Get photoUrls * @return photoUrls **/ - @javax.annotation.Nullable - public Object getPhotoUrls() { + @javax.annotation.Nonnull + public List getPhotoUrls() { return photoUrls; } - public void setPhotoUrls(Object photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } - public Pet tags(Object tags) { + public Pet tags(List tags) { this.tags = tags; return this; } + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + /** * Get tags * @return tags **/ @javax.annotation.Nullable - public Object getTags() { + public List getTags() { return tags; } - public void setTags(Object tags) { + public void setTags(List tags) { this.tags = tags; } @@ -316,22 +334,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, pet.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(id, category, name, photoUrls, tags, status, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -402,6 +409,32 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("category") != null && !jsonObj.get("category").isJsonNull()) { Category.validateJsonElement(jsonObj.get("category")); } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + // ensure the required json array is present + if (jsonObj.get("photoUrls") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("photoUrls").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `photoUrls` to be an array in the JSON string but got `%s`", jsonObj.get("photoUrls").toString())); + } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + Tag.validateJsonElement(jsonArraytags.get(i)); + }; + } + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { StatusEnum.validateJsonElement(jsonObj.get("status")); diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java index e6cdc735d261..bae59a3dedb3 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/Tag.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,16 +53,16 @@ public class Tag { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Object id = null; + private Long id; public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) - private Object name = null; + private String name; public Tag() { } - public Tag id(Object id) { + public Tag id(Long id) { this.id = id; return this; } @@ -73,16 +72,16 @@ public Tag id(Object id) { * @return id **/ @javax.annotation.Nullable - public Object getId() { + public Long getId() { return id; } - public void setId(Object id) { + public void setId(Long id) { this.id = id; } - public Tag name(Object name) { + public Tag name(String name) { this.name = name; return this; } @@ -92,11 +91,11 @@ public Tag name(Object name) { * @return name **/ @javax.annotation.Nullable - public Object getName() { + public String getName() { return name; } - public void setName(Object name) { + public void setName(String name) { this.name = name; } @@ -160,22 +159,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, tag.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(id, name, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -225,6 +213,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java index b169bb1027d3..157f92c49599 100644 --- a/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-3.1/src/main/java/org/openapitools/client/model/User.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -54,40 +53,40 @@ public class User { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) - private Object id = null; + private Long id; public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) - private Object username = null; + private String username; public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) - private Object firstName = null; + private String firstName; public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; @SerializedName(SERIALIZED_NAME_LAST_NAME) - private Object lastName = null; + private String lastName; public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) - private Object email = null; + private String email; public static final String SERIALIZED_NAME_PASSWORD = "password"; @SerializedName(SERIALIZED_NAME_PASSWORD) - private Object password = null; + private String password; public static final String SERIALIZED_NAME_PHONE = "phone"; @SerializedName(SERIALIZED_NAME_PHONE) - private Object phone = null; + private String phone; public static final String SERIALIZED_NAME_USER_STATUS = "userStatus"; @SerializedName(SERIALIZED_NAME_USER_STATUS) - private Object userStatus = null; + private Integer userStatus; public User() { } - public User id(Object id) { + public User id(Long id) { this.id = id; return this; } @@ -97,16 +96,16 @@ public User id(Object id) { * @return id **/ @javax.annotation.Nullable - public Object getId() { + public Long getId() { return id; } - public void setId(Object id) { + public void setId(Long id) { this.id = id; } - public User username(Object username) { + public User username(String username) { this.username = username; return this; } @@ -116,16 +115,16 @@ public User username(Object username) { * @return username **/ @javax.annotation.Nullable - public Object getUsername() { + public String getUsername() { return username; } - public void setUsername(Object username) { + public void setUsername(String username) { this.username = username; } - public User firstName(Object firstName) { + public User firstName(String firstName) { this.firstName = firstName; return this; } @@ -135,16 +134,16 @@ public User firstName(Object firstName) { * @return firstName **/ @javax.annotation.Nullable - public Object getFirstName() { + public String getFirstName() { return firstName; } - public void setFirstName(Object firstName) { + public void setFirstName(String firstName) { this.firstName = firstName; } - public User lastName(Object lastName) { + public User lastName(String lastName) { this.lastName = lastName; return this; } @@ -154,16 +153,16 @@ public User lastName(Object lastName) { * @return lastName **/ @javax.annotation.Nullable - public Object getLastName() { + public String getLastName() { return lastName; } - public void setLastName(Object lastName) { + public void setLastName(String lastName) { this.lastName = lastName; } - public User email(Object email) { + public User email(String email) { this.email = email; return this; } @@ -173,16 +172,16 @@ public User email(Object email) { * @return email **/ @javax.annotation.Nullable - public Object getEmail() { + public String getEmail() { return email; } - public void setEmail(Object email) { + public void setEmail(String email) { this.email = email; } - public User password(Object password) { + public User password(String password) { this.password = password; return this; } @@ -192,16 +191,16 @@ public User password(Object password) { * @return password **/ @javax.annotation.Nullable - public Object getPassword() { + public String getPassword() { return password; } - public void setPassword(Object password) { + public void setPassword(String password) { this.password = password; } - public User phone(Object phone) { + public User phone(String phone) { this.phone = phone; return this; } @@ -211,16 +210,16 @@ public User phone(Object phone) { * @return phone **/ @javax.annotation.Nullable - public Object getPhone() { + public String getPhone() { return phone; } - public void setPhone(Object phone) { + public void setPhone(String phone) { this.phone = phone; } - public User userStatus(Object userStatus) { + public User userStatus(Integer userStatus) { this.userStatus = userStatus; return this; } @@ -230,11 +229,11 @@ public User userStatus(Object userStatus) { * @return userStatus **/ @javax.annotation.Nullable - public Object getUserStatus() { + public Integer getUserStatus() { return userStatus; } - public void setUserStatus(Object userStatus) { + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } @@ -304,22 +303,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalProperties, user.additionalProperties); } - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - @Override public int hashCode() { return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus, additionalProperties); } - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -381,6 +369,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + } + if ((jsonObj.get("phone") != null && !jsonObj.get("phone").isJsonNull()) && !jsonObj.get("phone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-awsv4signature/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml index 143c6a5c94c8..70db220038f2 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" operationId: updatePet @@ -76,7 +76,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -120,7 +120,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -160,7 +160,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm diff --git a/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml index d03b14c6dae7..59e9322aadf4 100644 --- a/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-nullable-required/api/openapi.yaml @@ -101,7 +101,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -141,7 +141,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -206,7 +206,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -319,7 +319,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -376,7 +376,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -490,7 +490,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -557,7 +557,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser 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 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index f6a9c90eaaf4..6479fd9a5473 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -137,7 +137,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -243,7 +243,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -356,7 +356,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -413,7 +413,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -575,7 +575,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java index 2bebdbf853cd..e703a9ec3098 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/PetApi.java @@ -273,7 +273,7 @@ public static class FindPetsByStatusOper implements Oper { public FindPetsByStatusOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -348,7 +348,7 @@ public static class FindPetsByTagsOper implements Oper { public FindPetsByTagsOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -421,7 +421,7 @@ public static class GetPetByIdOper implements Oper { public GetPetByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java index 2894f03e56b2..d34a720ff6a5 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -232,7 +232,7 @@ public static class GetOrderByIdOper implements Oper { public GetOrderByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -306,7 +306,7 @@ public static class PlaceOrderOper implements Oper { public PlaceOrderOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; reqSpec.setContentType("*/*"); - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java index ec2869045566..2ad8b6a1da74 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/UserApi.java @@ -375,7 +375,7 @@ public static class GetUserByNameOper implements Oper { public GetUserByNameOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -449,7 +449,7 @@ public static class LoginUserOper implements Oper { public LoginUserOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java index 8846a084ec08..3cc3d5e8f1dc 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java @@ -274,7 +274,7 @@ public static class FindPetsByStatusOper implements Oper { public FindPetsByStatusOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -349,7 +349,7 @@ public static class FindPetsByTagsOper implements Oper { public FindPetsByTagsOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -422,7 +422,7 @@ public static class GetPetByIdOper implements Oper { public GetPetByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java index e6281a0a34e8..0c4c75f7503e 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java @@ -233,7 +233,7 @@ public static class GetOrderByIdOper implements Oper { public GetOrderByIdOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -307,7 +307,7 @@ public static class PlaceOrderOper implements Oper { public PlaceOrderOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; reqSpec.setContentType("*/*"); - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java index dfd991dc96c1..eab6d35bef0b 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/UserApi.java @@ -376,7 +376,7 @@ public static class GetUserByNameOper implements Oper { public GetUserByNameOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } @@ -450,7 +450,7 @@ public static class LoginUserOper implements Oper { public LoginUserOper(RequestSpecBuilder reqSpec) { this.reqSpec = reqSpec; - reqSpec.setAccept("application/json"); + reqSpec.setAccept("application/json,application/xml"); this.respSpec = new ResponseSpecBuilder(); } diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml b/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-jakarta/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index 933d7332521b..841142bed705 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -172,7 +172,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: operationId: deletePet @@ -235,7 +235,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: operationId: updatePetWithForm parameters: @@ -344,7 +344,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -401,7 +401,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -510,7 +510,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: operationId: logoutUser @@ -572,7 +572,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-jakarta/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml +++ b/samples/client/petstore/java/webclient-swagger2/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index d02433c791c2..4406a7347e04 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java index 24335cf563ae..e9120d50d286 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/PetApi.java @@ -127,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -165,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -202,7 +202,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java index 7bd1f368a057..5a7e00a9ac3d 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/StoreApi.java @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -156,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java index 1907ab803dce..ce3aa7566c1e 100644 --- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/api/UserApi.java @@ -186,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -219,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 ae696a1a005d..f93028052e12 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 @@ -56,7 +56,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -127,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -165,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -242,7 +242,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 542a3fcf6319..16b21de04cd2 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -141,7 +141,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java index 3907f07b5114..da6b67bcc334 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -204,7 +204,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java index f3f2de470bbc..26b6cc457b81 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/PetController.java @@ -124,7 +124,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -164,7 +164,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java index 0f1588b67a63..a3cb3f154cc4 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/StoreController.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -140,7 +140,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity placeOrder( diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java index c46fe189f133..0e55a1ad9aa3 100644 --- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java +++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/api/UserController.java @@ -155,7 +155,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -185,7 +185,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 ae696a1a005d..f93028052e12 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 @@ -56,7 +56,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -127,7 +127,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -165,7 +165,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -200,7 +200,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -242,7 +242,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 542a3fcf6319..16b21de04cd2 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -111,7 +111,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -141,7 +141,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 3907f07b5114..da6b67bcc334 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -173,7 +173,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -204,7 +204,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java index 22d76619d77d..e6c76e3d70b5 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -77,7 +77,7 @@ Mono> deletePet( @HttpExchange( method = "GET", value = "/pet/findByStatus", - accept = "application/json" + accept = "application/json,application/xml" ) Mono>> findPetsByStatus( @RequestParam(value = "status", required = true) List status @@ -97,7 +97,7 @@ Mono>> findPetsByStatus( @HttpExchange( method = "GET", value = "/pet/findByTags", - accept = "application/json" + accept = "application/json,application/xml" ) Mono>> findPetsByTags( @RequestParam(value = "tags", required = true) Set tags @@ -116,7 +116,7 @@ Mono>> findPetsByTags( @HttpExchange( method = "GET", value = "/pet/{petId}", - accept = "application/json" + accept = "application/json,application/xml" ) Mono> getPetById( @PathVariable("petId") Long petId diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java index 57b79054f6e9..2c842b85941d 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -71,7 +71,7 @@ Mono>> getInventory( @HttpExchange( method = "GET", value = "/store/order/{order_id}", - accept = "application/json" + accept = "application/json,application/xml" ) Mono> getOrderById( @PathVariable("order_id") Long orderId @@ -89,7 +89,7 @@ Mono> getOrderById( @HttpExchange( method = "POST", value = "/store/order", - accept = "application/json", + accept = "application/json,application/xml", contentType = "application/json" ) Mono> placeOrder( diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java index 0af6509b0015..fb59d63d6c93 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -109,7 +109,7 @@ Mono> deleteUser( @HttpExchange( method = "GET", value = "/user/{username}", - accept = "application/json" + accept = "application/json,application/xml" ) Mono> getUserByName( @PathVariable("username") String username @@ -128,7 +128,7 @@ Mono> getUserByName( @HttpExchange( method = "GET", value = "/user/login", - accept = "application/json" + accept = "application/json,application/xml" ) Mono> loginUser( @RequestParam(value = "username", required = true) String username, diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java index 335ca99dcb98..01841a62b5cf 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/PetApi.java @@ -73,7 +73,7 @@ ResponseEntity deletePet( @HttpExchange( method = "GET", value = "/pet/findByStatus", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @RequestParam(value = "status", required = true) List status @@ -93,7 +93,7 @@ ResponseEntity> findPetsByStatus( @HttpExchange( method = "GET", value = "/pet/findByTags", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @RequestParam(value = "tags", required = true) Set tags @@ -112,7 +112,7 @@ ResponseEntity> findPetsByTags( @HttpExchange( method = "GET", value = "/pet/{petId}", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity getPetById( @PathVariable("petId") Long petId diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java index 57c21f1d0597..5bf2b861e315 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -67,7 +67,7 @@ ResponseEntity> getInventory( @HttpExchange( method = "GET", value = "/store/order/{order_id}", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity getOrderById( @PathVariable("order_id") Long orderId @@ -85,7 +85,7 @@ ResponseEntity getOrderById( @HttpExchange( method = "POST", value = "/store/order", - accept = "application/json", + accept = "application/json,application/xml", contentType = "application/json" ) ResponseEntity placeOrder( diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java index 82e6c45dae81..49572ab866c2 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/api/UserApi.java @@ -105,7 +105,7 @@ ResponseEntity deleteUser( @HttpExchange( method = "GET", value = "/user/{username}", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity getUserByName( @PathVariable("username") String username @@ -124,7 +124,7 @@ ResponseEntity getUserByName( @HttpExchange( method = "GET", value = "/user/login", - accept = "application/json" + accept = "application/json,application/xml" ) ResponseEntity loginUser( @RequestParam(value = "username", required = true) String username, 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 6058c2b8c8d5..1607a7fcd7d6 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml index 6058c2b8c8d5..1607a7fcd7d6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger2/api/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index 814354567b04..8f79a7c4c5a8 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -140,7 +140,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -182,7 +182,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -247,7 +247,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -360,7 +360,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -417,7 +417,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -516,7 +516,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md index 7bb3cc7e0c81..7b9645217510 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/ArrayTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **array_of_string** | **List[str]** | | [optional] -**array_of_nullable_float** | **List[float]** | | [optional] +**array_of_nullable_float** | **List[Optional[float]]** | | [optional] **array_array_of_integer** | **List[List[int]]** | | [optional] **array_array_of_model** | **List[List[ReadOnlyFirst]]** | | [optional] diff --git a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md index 93fa80af2eaf..866a4b571864 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python-aiohttp/docs/NullableClass.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **date_prop** | **date** | | [optional] **datetime_prop** | **datetime** | | [optional] **array_nullable_prop** | **List[object]** | | [optional] -**array_and_items_nullable_prop** | **List[object]** | | [optional] -**array_items_nullable** | **List[object]** | | [optional] +**array_and_items_nullable_prop** | **List[Optional[object]]** | | [optional] +**array_items_nullable** | **List[Optional[object]]** | | [optional] **object_nullable_prop** | **Dict[str, object]** | | [optional] -**object_and_items_nullable_prop** | **Dict[str, object]** | | [optional] -**object_items_nullable** | **Dict[str, object]** | | [optional] +**object_and_items_nullable_prop** | **Dict[str, Optional[object]]** | | [optional] +**object_items_nullable** | **Dict[str, Optional[object]]** | | [optional] ## Example diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py index c95fe01ff572..c5a44501eee7 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/array_test.py @@ -29,7 +29,7 @@ class ArrayTest(BaseModel): ArrayTest """ # noqa: E501 array_of_string: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=3)]] = None - array_of_nullable_float: Optional[List[float]] = None + array_of_nullable_float: Optional[List[Optional[float]]] = None array_array_of_integer: Optional[List[List[StrictInt]]] = None array_array_of_model: Optional[List[List[ReadOnlyFirst]]] = None __properties: ClassVar[List[str]] = ["array_of_string", "array_of_nullable_float", "array_array_of_integer", "array_array_of_model"] diff --git a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py index 101f1a96b6a0..64a2fe91b29d 100644 --- a/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/nullable_class.py @@ -35,11 +35,11 @@ class NullableClass(BaseModel): date_prop: Optional[date] = None datetime_prop: Optional[datetime] = None array_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_and_items_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_items_nullable: Optional[List[Dict[str, Any]]] = None + array_and_items_nullable_prop: Optional[List[Optional[Dict[str, Any]]]] = None + array_items_nullable: Optional[List[Optional[Dict[str, Any]]]] = None object_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None + object_and_items_nullable_prop: Optional[Dict[str, Optional[Dict[str, Any]]]] = None + object_items_nullable: Optional[Dict[str, Optional[Dict[str, Any]]]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] diff --git a/samples/openapi3/client/petstore/python/docs/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/ArrayTest.md index 7bb3cc7e0c81..7b9645217510 100644 --- a/samples/openapi3/client/petstore/python/docs/ArrayTest.md +++ b/samples/openapi3/client/petstore/python/docs/ArrayTest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **array_of_string** | **List[str]** | | [optional] -**array_of_nullable_float** | **List[float]** | | [optional] +**array_of_nullable_float** | **List[Optional[float]]** | | [optional] **array_array_of_integer** | **List[List[int]]** | | [optional] **array_array_of_model** | **List[List[ReadOnlyFirst]]** | | [optional] diff --git a/samples/openapi3/client/petstore/python/docs/NullableClass.md b/samples/openapi3/client/petstore/python/docs/NullableClass.md index 93fa80af2eaf..866a4b571864 100644 --- a/samples/openapi3/client/petstore/python/docs/NullableClass.md +++ b/samples/openapi3/client/petstore/python/docs/NullableClass.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **date_prop** | **date** | | [optional] **datetime_prop** | **datetime** | | [optional] **array_nullable_prop** | **List[object]** | | [optional] -**array_and_items_nullable_prop** | **List[object]** | | [optional] -**array_items_nullable** | **List[object]** | | [optional] +**array_and_items_nullable_prop** | **List[Optional[object]]** | | [optional] +**array_items_nullable** | **List[Optional[object]]** | | [optional] **object_nullable_prop** | **Dict[str, object]** | | [optional] -**object_and_items_nullable_prop** | **Dict[str, object]** | | [optional] -**object_items_nullable** | **Dict[str, object]** | | [optional] +**object_and_items_nullable_prop** | **Dict[str, Optional[object]]** | | [optional] +**object_items_nullable** | **Dict[str, Optional[object]]** | | [optional] ## Example diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py index 79627ad76e0e..2986612fad54 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/array_test.py @@ -29,7 +29,7 @@ class ArrayTest(BaseModel): ArrayTest """ # noqa: E501 array_of_string: Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=3)]] = None - array_of_nullable_float: Optional[List[StrictFloat]] = None + array_of_nullable_float: Optional[List[Optional[StrictFloat]]] = None array_array_of_integer: Optional[List[List[StrictInt]]] = None array_array_of_model: Optional[List[List[ReadOnlyFirst]]] = None additional_properties: Dict[str, Any] = {} diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py index 903fa5d037b8..1ad6d35535e0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/nullable_class.py @@ -35,11 +35,11 @@ class NullableClass(BaseModel): date_prop: Optional[date] = None datetime_prop: Optional[datetime] = None array_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_and_items_nullable_prop: Optional[List[Dict[str, Any]]] = None - array_items_nullable: Optional[List[Dict[str, Any]]] = None + array_and_items_nullable_prop: Optional[List[Optional[Dict[str, Any]]]] = None + array_items_nullable: Optional[List[Optional[Dict[str, Any]]]] = None object_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_and_items_nullable_prop: Optional[Dict[str, Dict[str, Any]]] = None - object_items_nullable: Optional[Dict[str, Dict[str, Any]]] = None + object_and_items_nullable_prop: Optional[Dict[str, Optional[Dict[str, Any]]]] = None + object_items_nullable: Optional[Dict[str, Optional[Dict[str, Any]]]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["required_integer_prop", "integer_prop", "number_prop", "boolean_prop", "string_prop", "date_prop", "datetime_prop", "array_nullable_prop", "array_and_items_nullable_prop", "array_items_nullable", "object_nullable_prop", "object_and_items_nullable_prop", "object_items_nullable"] diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java index 25a5a7682158..e604dc02bea0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/PetApi.java @@ -37,7 +37,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -76,7 +76,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -97,7 +97,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -117,7 +117,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -140,7 +140,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java index e700d399ff1e..8f82fdde5e1e 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/StoreApi.java @@ -73,7 +73,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -92,7 +92,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java index fdd336454dae..6d1fe1925a99 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/api/UserApi.java @@ -110,7 +110,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -130,7 +130,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 e2191d40cacc..b79130843794 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 @@ -66,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -133,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -171,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -208,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -250,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 4e224daf5ac1..efc2121eafd9 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 @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -156,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 7ed505283edd..0a42d2ac86d8 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 @@ -186,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -219,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 dc50a2249561..0d9da57d0169 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 @@ -67,7 +67,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -134,7 +134,7 @@ CompletableFuture> deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture>> findPetsByStatus( @@ -172,7 +172,7 @@ CompletableFuture>> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture>> findPetsByTags( @@ -209,7 +209,7 @@ CompletableFuture>> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture> getPetById( @@ -251,7 +251,7 @@ CompletableFuture> getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 ba3828d83a95..895f2244c469 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 @@ -125,7 +125,7 @@ CompletableFuture>> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture> getOrderById( @@ -157,7 +157,7 @@ CompletableFuture> getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 4476dc570a21..2eb4bae905d1 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 @@ -187,7 +187,7 @@ CompletableFuture> deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture> getUserByName( @@ -220,7 +220,7 @@ CompletableFuture> getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) CompletableFuture> loginUser( diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java index 9b514e7b08f9..3a659315655a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/api/PetApi.java @@ -65,7 +65,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 9f7d4cd6d8f6..d3486ad761ff 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 @@ -133,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -171,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -208,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( 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 3c91df79aa95..ec988f23e39b 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 @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{order_id}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -156,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 5aaf6ed3438f..e0938c813690 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 @@ -174,7 +174,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -207,7 +207,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 a77d978f3661..706662550715 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 @@ -125,7 +125,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -164,7 +164,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -202,7 +202,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( 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 8e548045abb4..0f90f7dca100 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 @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -154,7 +154,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity placeOrder( 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 2657f118e413..72f64c28d532 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 @@ -165,7 +165,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -196,7 +196,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 55ce62c6a552..2b15cf0ffc58 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 @@ -66,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -133,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -171,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -208,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -250,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 7bd1f368a057..5a7e00a9ac3d 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 @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -156,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 4f9897252417..3c48f0e66bfa 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 @@ -186,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -219,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 e034a289d399..ffff7255e972 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 @@ -66,7 +66,7 @@ public interface PetApi { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -133,7 +133,7 @@ ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByStatus( @@ -171,7 +171,7 @@ ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity> findPetsByTags( @@ -208,7 +208,7 @@ ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getPetById( @@ -250,7 +250,7 @@ ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 79d1d6af08ae..53512e742c43 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 @@ -124,7 +124,7 @@ ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getOrderById( @@ -156,7 +156,7 @@ ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 f02022e113bc..626d808b15ab 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 @@ -186,7 +186,7 @@ ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity getUserByName( @@ -219,7 +219,7 @@ ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) ResponseEntity loginUser( 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 742329fa4712..37c682b760ca 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 @@ -70,7 +70,7 @@ default Optional getRequest() { @RequestMapping( method = RequestMethod.POST, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) @@ -157,7 +157,7 @@ default ResponseEntity deletePet( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByStatus", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity> findPetsByStatus( @@ -212,7 +212,7 @@ default ResponseEntity> findPetsByStatus( @RequestMapping( method = RequestMethod.GET, value = "/pet/findByTags", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity> findPetsByTags( @@ -266,7 +266,7 @@ default ResponseEntity> findPetsByTags( @RequestMapping( method = RequestMethod.GET, value = "/pet/{petId}", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity getPetById( @@ -325,7 +325,7 @@ default ResponseEntity getPetById( @RequestMapping( method = RequestMethod.PUT, value = "/pet", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 0c39b740003a..75fb5f0012db 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 @@ -134,7 +134,7 @@ default ResponseEntity> getInventory( @RequestMapping( method = RequestMethod.GET, value = "/store/order/{orderId}", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity getOrderById( @@ -183,7 +183,7 @@ default ResponseEntity getOrderById( @RequestMapping( method = RequestMethod.POST, value = "/store/order", - produces = "application/json", + produces = "application/json,application/xml", consumes = "application/json" ) 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 4c998b93ac89..06929820ce13 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 @@ -202,7 +202,7 @@ default ResponseEntity deleteUser( @RequestMapping( method = RequestMethod.GET, value = "/user/{username}", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity getUserByName( @@ -252,7 +252,7 @@ default ResponseEntity getUserByName( @RequestMapping( method = RequestMethod.GET, value = "/user/login", - produces = "application/json" + produces = "application/json,application/xml" ) default ResponseEntity loginUser( 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 65092456cbdb..cee3307f79a9 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: 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 65092456cbdb..cee3307f79a9 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user 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 65092456cbdb..cee3307f79a9 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: 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 65092456cbdb..cee3307f79a9 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml index a2995b488403..27ee0c195b9b 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml index a2995b488403..27ee0c195b9b 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml @@ -158,7 +158,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -203,7 +203,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -271,7 +271,7 @@ paths: tags: - pet x-webclient-blocking: true - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -387,7 +387,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{order_id}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -444,7 +444,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -543,7 +543,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -606,7 +606,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json index ece66be6e44f..3202e3f8c0e9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json @@ -148,7 +148,7 @@ }, "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } } }, diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 605ee8735333..723c583bc668 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -159,7 +159,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -216,7 +216,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -298,7 +298,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -446,7 +446,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{order_id}" : { @@ -518,7 +518,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -668,7 +668,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -750,7 +750,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index 8b12859e6477..cb902885e966 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -151,7 +151,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -205,7 +205,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -283,7 +283,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "operationId" : "updatePetWithForm", @@ -431,7 +431,7 @@ "tags" : [ "store" ], "x-codegen-request-body-name" : "body", "x-content-type" : "*/*", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -503,7 +503,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -653,7 +653,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -735,7 +735,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index 04da14326f84..51dd2e5f9ee0 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -60,7 +60,7 @@ "summary" : "Add a new pet to the store", "tags" : [ "pet" ], "x-content-type" : "application/json", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "", @@ -104,7 +104,7 @@ "summary" : "Update an existing pet", "tags" : [ "pet" ], "x-content-type" : "application/json", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByStatus" : { @@ -159,7 +159,7 @@ } ], "summary" : "Finds Pets by status", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/findByTags" : { @@ -212,7 +212,7 @@ } ], "summary" : "Finds Pets by tags", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/pet/{petId}" : { @@ -295,7 +295,7 @@ } ], "summary" : "Find pet by ID", "tags" : [ "pet" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "post" : { "description" : "", @@ -447,7 +447,7 @@ "summary" : "Place an order for a pet", "tags" : [ "store" ], "x-content-type" : "application/json", - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/store/order/{orderId}" : { @@ -519,7 +519,7 @@ }, "summary" : "Find purchase order by ID", "tags" : [ "store" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user" : { @@ -670,7 +670,7 @@ }, "summary" : "Logs user into the system", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" } }, "/user/logout" : { @@ -759,7 +759,7 @@ }, "summary" : "Get user by user name", "tags" : [ "user" ], - "x-accepts" : "application/json" + "x-accepts" : "application/json,application/xml" }, "put" : { "description" : "This can only be done by the logged in user.", 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 23317e7c3044..e7133d04a9da 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: "" externalDocs: @@ -79,7 +79,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings @@ -123,7 +123,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/findByTags: get: deprecated: true @@ -163,7 +163,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" /pet/{petId}: delete: description: "" @@ -228,7 +228,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" post: description: "" operationId: updatePetWithForm @@ -341,7 +341,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" /store/order/{orderId}: delete: description: For valid response try integer IDs with value < 1000. Anything @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" /user: post: description: This can only be done by the logged in user. @@ -512,7 +512,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" /user/logout: get: description: "" @@ -579,7 +579,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" put: description: This can only be done by the logged in user. operationId: updateUser diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index c448d48c3deb..d49efeb91a2b 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index c448d48c3deb..d49efeb91a2b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index c448d48c3deb..d49efeb91a2b 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index c448d48c3deb..d49efeb91a2b 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index c448d48c3deb..d49efeb91a2b 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -131,7 +131,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -178,7 +178,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -245,7 +245,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -362,7 +362,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -423,7 +423,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -540,7 +540,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -608,7 +608,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES index 08d588aee33f..2bf5d92a6cb7 100644 --- a/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-api-response-examples/.openapi-generator/FILES @@ -1,11 +1,9 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenApiGeneratorApplication.java src/main/java/org/openapitools/RFC3339DateFormat.java src/main/java/org/openapitools/api/ApiUtil.java src/main/java/org/openapitools/api/DogsApi.java -src/main/java/org/openapitools/api/DogsApiController.java src/main/java/org/openapitools/api/DogsApiDelegate.java src/main/java/org/openapitools/configuration/HomeController.java src/main/java/org/openapitools/configuration/SpringDocConfiguration.java diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml index 65092456cbdb..cee3307f79a9 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/resources/openapi.yaml @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user 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 65092456cbdb..cee3307f79a9 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 @@ -46,7 +46,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet put: @@ -81,7 +81,7 @@ paths: tags: - pet x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByStatus: @@ -127,7 +127,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -169,7 +169,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -238,7 +238,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -359,7 +359,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{orderId}: @@ -420,7 +420,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -542,7 +542,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -615,7 +615,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES index 36c5295fc829..7bcd6d2efc85 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/.openapi-generator/FILES @@ -1,17 +1,13 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenApiGeneratorApplication.java src/main/java/org/openapitools/RFC3339DateFormat.java src/main/java/org/openapitools/api/ApiUtil.java src/main/java/org/openapitools/api/PetApi.java -src/main/java/org/openapitools/api/PetApiController.java src/main/java/org/openapitools/api/PetApiDelegate.java src/main/java/org/openapitools/api/StoreApi.java -src/main/java/org/openapitools/api/StoreApiController.java src/main/java/org/openapitools/api/StoreApiDelegate.java src/main/java/org/openapitools/api/UserApi.java -src/main/java/org/openapitools/api/UserApiController.java src/main/java/org/openapitools/api/UserApiDelegate.java src/main/java/org/openapitools/configuration/HomeController.java src/main/java/org/openapitools/configuration/SpringDocConfiguration.java diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java index ed51751b1260..d25c6e591a0c 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/api/PetApi.java @@ -57,12 +57,12 @@ default PetApiDelegate getDelegate() { @Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)), @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class), examples = { @ExampleObject( - name = "Pet1", - value = "{\"id\":12345,\"category\":{\"id\":12345,\"name\":\"cats\"},\"name\":\"Fluffy\",\"photoUrls\":[{\"url\":\"https://www.example.com/fluffy.jpg\"}],\"tags\":[{\"id\":12345,\"name\":\"fluffy\"}],\"status\":\"available\"}" + name = "Pet3", + value = "{\"id\":12347,\"category\":{\"id\":12347,\"name\":\"monkeys\"},\"name\":\"George\",\"photoUrls\":[{\"url\":\"https://www.example.com/george.jpg\"}],\"tags\":[{\"id\":12347,\"name\":\"george\"}],\"status\":\"available\"}" ), @ExampleObject( - name = "Pet2", - value = "{\"id\":12346,\"category\":{\"id\":12346,\"name\":\"dogs\"},\"name\":\"Fido\",\"photoUrls\":[{\"url\":\"https://www.example.com/fido.jpg\"}],\"tags\":[{\"id\":12346,\"name\":\"fido\"}],\"status\":\"available\"}" + name = "Pet4", + value = "{\"id\":12348,\"category\":{\"id\":12348,\"name\":\"fish\"},\"name\":\"Nemo\",\"photoUrls\":[{\"url\":\"https://www.example.com/nemo.jpg\"}],\"tags\":[{\"id\":12348,\"name\":\"nemo\"}],\"status\":\"available\"}" ) }) @@ -136,7 +136,13 @@ default ResponseEntity deletePet( responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = Pet.class))), - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Pet.class)), examples = { + @ExampleObject( + name = "Pets", + value = "[{\"id\":12345,\"category\":{\"id\":12345,\"name\":\"cats\"},\"name\":\"Fluffy\",\"photoUrls\":[{\"url\":\"https://www.example.com/fluffy.jpg\"}],\"tags\":[{\"id\":12345,\"name\":\"fluffy\"}],\"status\":\"available\"},{\"id\":12346,\"category\":{\"id\":12346,\"name\":\"dogs\"},\"name\":\"Fido\",\"photoUrls\":[{\"url\":\"https://www.example.com/fido.jpg\"}],\"tags\":[{\"id\":12346,\"name\":\"fido\"}],\"status\":\"available\"}]" + ) + }) + }), @ApiResponse(responseCode = "400", description = "Invalid status value") }, diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index c07f4f9b8a8a..4a64aa95cde5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index c07f4f9b8a8a..4a64aa95cde5 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index c07f4f9b8a8a..4a64aa95cde5 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index c07f4f9b8a8a..4a64aa95cde5 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -132,7 +132,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/all: @@ -163,7 +163,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -208,7 +208,7 @@ paths: tags: - pet x-spring-paginated: true - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -282,7 +282,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -403,7 +403,7 @@ paths: - store x-codegen-request-body-name: body x-content-type: '*/*' - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -468,7 +468,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -593,7 +593,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -665,7 +665,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index adb3ff3f6021..04d2ce4b15ba 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index 42dd7db5f53b..bf8dcfb4c25c 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -108,7 +108,7 @@ paths: summary: Finds Pets by status tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/findByTags: @@ -154,7 +154,7 @@ paths: summary: Finds Pets by tags tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet /pet/{petId}: @@ -225,7 +225,7 @@ paths: summary: Find pet by ID tags: - pet - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: pet post: @@ -346,7 +346,7 @@ paths: tags: - store x-content-type: application/json - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /store/order/{order_id}: @@ -407,7 +407,7 @@ paths: summary: Find purchase order by ID tags: - store - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: store /user: @@ -514,7 +514,7 @@ paths: summary: Logs user into the system tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user /user/logout: @@ -583,7 +583,7 @@ paths: summary: Get user by user name tags: - user - x-accepts: application/json + x-accepts: "application/json,application/xml" x-tags: - tag: user put: