diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 14c6eeeaf8d..1adf78b70f9 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -22,8 +22,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| +|applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut-client| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut-client| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| @@ -43,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |false| +|generateSwaggerAnnotations|Specify if you want to generate swagger annotations and which version|
**swagger2**
Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas
**true**
Equivalent to "swagger2"
**false**
Do not generate swagger annotations
**swagger1**
Use io.swagger:swagger-annotations for annotating operations and schemas
|false| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| @@ -52,7 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| -|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.3.1| +|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3| |modelPackage|package for generated models| |org.openapitools.model| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 6a6655585f9..715d9022d92 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-micronaut| |artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| @@ -44,7 +45,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| |generateControllerAsAbstract|Generate an abstract class for controller to be extended. (apiPackage is then used for the abstract class, and controllerPackage is used for implementation that extends it.)| |false| |generateControllerFromExamples|Generate the implementation of controller and tests from parameter and return examples that will verify that the api works as desired (for testing)| |false| +|generateOperationOnlyForFirstTag|When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. If true, each operation will be generated only once in the first assigned tag.| |true| |generateOperationsToReturnNotImplemented|Return HTTP 501 Not Implemented instead of an empty response in the generated controller methods.| |true| +|generateSwaggerAnnotations|Specify if you want to generate swagger annotations and which version|
**swagger2**
Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas
**true**
Equivalent to "swagger2"
**false**
Do not generate swagger annotations
**swagger1**
Use io.swagger:swagger-annotations for annotating operations and schemas
|swagger2| |groupId|groupId in generated pom.xml| |org.openapitools| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| |ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false| @@ -54,7 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| -|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.3.1| +|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3| |modelPackage|package for generated models| |org.openapitools.model| |openApiNullable|Enable OpenAPI Jackson Nullable library| |true| |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java index 1799a601750..0210abad942 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java @@ -1,5 +1,7 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.Operation; +import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; @@ -10,11 +12,15 @@ import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.model.OperationMap; import org.openapitools.codegen.model.OperationsMap; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.*; import java.util.stream.Collectors; import static org.openapitools.codegen.CodegenConstants.INVOKER_PACKAGE; +import static org.openapitools.codegen.utils.StringUtils.camelize; +import static org.openapitools.codegen.utils.StringUtils.underscore; public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, OptionalFeatures { public static final String OPT_TITLE = "title"; @@ -35,6 +41,15 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i public static final String OPT_DATETIME_FORMAT = "datetimeFormat"; public static final String OPT_REACTIVE = "reactive"; public static final String OPT_WRAP_IN_HTTP_RESPONSE = "wrapInHttpResponse"; + public static final String OPT_APPLICATION_NAME = "applicationName"; + public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS = "generateSwaggerAnnotations"; + public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1 = "swagger1"; + public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2 = "swagger2"; + public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE = "true"; + public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE = "false"; + public static final String OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG = "generateOperationOnlyForFirstTag"; + + protected final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautAbstractCodegen.class); protected String title; protected boolean useBeanValidation; @@ -46,6 +61,9 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i protected String micronautVersion; protected boolean reactive; protected boolean wrapInHttpResponse; + protected String appName; + protected String generateSwaggerAnnotations; + protected boolean generateOperationOnlyForFirstTag; public static final String CONTENT_TYPE_APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded"; public static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; @@ -64,18 +82,24 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i visitable = false; buildTool = OPT_BUILD_ALL; testTool = OPT_TEST_JUNIT; - outputFolder = "generated-code/java-micronaut-client"; + outputFolder = this instanceof JavaMicronautClientCodegen ? + "generated-code/java-micronaut-client" : "generated-code/java-micronaut"; apiPackage = "org.openapitools.api"; modelPackage = "org.openapitools.model"; invokerPackage = "org.openapitools"; - artifactId = "openapi-micronaut"; + artifactId = this instanceof JavaMicronautClientCodegen ? + "openapi-micronaut-client" : "openapi-micronaut"; embeddedTemplateDir = templateDir = "java-micronaut"; apiDocPath = "docs/apis"; modelDocPath = "docs/models"; dateLibrary = OPT_DATE_LIBRARY_JAVA8; - micronautVersion = "3.3.1"; + micronautVersion = "3.4.3"; reactive = true; wrapInHttpResponse = false; + appName = artifactId; + generateSwaggerAnnotations = this instanceof JavaMicronautClientCodegen ? + OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE : OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2; + generateOperationOnlyForFirstTag = this instanceof JavaMicronautServerCodegen; // Set implemented features for user information modifyFeatureSet(features -> features @@ -106,12 +130,15 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i cliOptions.add(new CliOption(OPT_TITLE, "Client service name").defaultValue(title)); cliOptions.add(new CliOption(OPT_MICRONAUT_VERSION, "Micronaut version, only >=3.0.0 versions are supported").defaultValue(micronautVersion)); + cliOptions.add(new CliOption(OPT_APPLICATION_NAME, "Micronaut application name (Defaults to the " + CodegenConstants.ARTIFACT_ID + " value)").defaultValue(appName)); cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation)); cliOptions.add(CliOption.newBoolean(USE_OPTIONAL, "Use Optional container for optional parameters", useOptional)); cliOptions.add(CliOption.newBoolean(OPT_VISITABLE, "Generate visitor for subtypes with a discriminator", visitable)); cliOptions.add(CliOption.newBoolean(OPT_REQUIRED_PROPERTIES_IN_CONSTRUCTOR, "Allow only to create models with all the required properties provided in constructor", requiredPropertiesInConstructor)); cliOptions.add(CliOption.newBoolean(OPT_REACTIVE, "Make the responses use Reactor Mono as wrapper", reactive)); cliOptions.add(CliOption.newBoolean(OPT_WRAP_IN_HTTP_RESPONSE, "Wrap the response in HttpResponse object", wrapInHttpResponse)); + cliOptions.add(CliOption.newBoolean(OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG, "When false, the operation method will be duplicated in each of the tags if multiple tags are assigned to this operation. " + + "If true, each operation will be generated only once in the first assigned tag.", generateOperationOnlyForFirstTag)); CliOption buildToolOption = new CliOption(OPT_BUILD, "Specify for which build tool to generate files").defaultValue(buildTool); Map buildToolOptionMap = new HashMap<>(); @@ -128,6 +155,15 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i testToolOption.setEnum(testToolOptionMap); cliOptions.add(testToolOption); + CliOption generateSwaggerAnnotationsOption = new CliOption(OPT_GENERATE_SWAGGER_ANNOTATIONS, "Specify if you want to generate swagger annotations and which version").defaultValue(generateSwaggerAnnotations); + Map generateSwaggerAnnotationsOptionMap = new HashMap<>(); + generateSwaggerAnnotationsOptionMap.put(OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1, "Use io.swagger:swagger-annotations for annotating operations and schemas"); + generateSwaggerAnnotationsOptionMap.put(OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2, "Use io.swagger.core.v3:swagger-annotations for annotating operations and schemas"); + generateSwaggerAnnotationsOptionMap.put(OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE, "Equivalent to \"" + OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2 + "\""); + generateSwaggerAnnotationsOptionMap.put(OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE, "Do not generate swagger annotations"); + generateSwaggerAnnotationsOption.setEnum(generateSwaggerAnnotationsOptionMap); + cliOptions.add(generateSwaggerAnnotationsOption); + cliOptions.add(new CliOption(OPT_DATE_FORMAT, "Specify the format pattern of date as a string")); cliOptions.add(new CliOption(OPT_DATETIME_FORMAT, "Specify the format pattern of date-time as a string")); @@ -168,6 +204,12 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i additionalProperties.put(OPT_MICRONAUT_VERSION, micronautVersion); } + if (additionalProperties.containsKey(OPT_APPLICATION_NAME)) { + appName = (String) additionalProperties.get(OPT_APPLICATION_NAME); + } else { + additionalProperties.put(OPT_APPLICATION_NAME, artifactId); + } + // Get boolean properties if (additionalProperties.containsKey(USE_BEANVALIDATION)) { this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION)); @@ -199,6 +241,11 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i } writePropertyBack(OPT_WRAP_IN_HTTP_RESPONSE, wrapInHttpResponse); + if (additionalProperties.containsKey(OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG)) { + this.generateOperationOnlyForFirstTag = convertPropertyToBoolean(OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG); + } + writePropertyBack(OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG, generateOperationOnlyForFirstTag); + // Get enum properties if (additionalProperties.containsKey(OPT_BUILD)) { switch ((String) additionalProperties.get(OPT_BUILD)) { @@ -230,6 +277,29 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i additionalProperties.put("isTestSpock", true); } + if (additionalProperties.containsKey(OPT_GENERATE_SWAGGER_ANNOTATIONS)) { + String value = String.valueOf(additionalProperties.get(OPT_GENERATE_SWAGGER_ANNOTATIONS)); + switch (value) { + case OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1: + this.generateSwaggerAnnotations = OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1; + break; + case OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2: + case OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE: + this.generateSwaggerAnnotations = OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2; + break; + case OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE: + this.generateSwaggerAnnotations = OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE; + break; + default: + throw new RuntimeException("Value \"" + value + "\" for the " + OPT_GENERATE_SWAGGER_ANNOTATIONS + " parameter is unsupported or misspelled"); + } + } + if (OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_1.equals(this.generateSwaggerAnnotations)) { + additionalProperties.put("generateSwagger1Annotations", true); + } else if (OPT_GENERATE_SWAGGER_ANNOTATIONS_SWAGGER_2.equals(this.generateSwaggerAnnotations)) { + additionalProperties.put("generateSwagger2Annotations", true); + } + // Add all the supporting files String resourceFolder = projectFolder + "/resources"; supportingFiles.add(new SupportingFile("common/configuration/application.yml.mustache", resourceFolder, "application.yml").doNotOverwrite()); @@ -372,6 +442,24 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i return visitable; } + @Override + public String sanitizeTag(String tag) { + // Skip sanitization to get the original tag name in the addOperationToGroup() method. + // Inside that method tag is manually sanitized. + return tag; + } + + @Override + public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation + co, Map> operations) { + if (generateOperationOnlyForFirstTag && !co.tags.get(0).getName().equals(tag)) { + // This is not the first assigned to this operation tag; + return; + } + + super.addOperationToGroup(super.sanitizeTag(tag), resourcePath, operation, co, operations); + } + @Override public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); @@ -445,6 +533,14 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i return objs; } + @Override + public CodegenModel fromModel(String name, Schema model) { + CodegenModel codegenModel = super.fromModel(name, model); + codegenModel.imports.remove("ApiModel"); + codegenModel.imports.remove("ApiModelProperty"); + return codegenModel; + } + @Override public Map postProcessAllModels(Map objs) { objs = super.postProcessAllModels(objs); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java index 76dc4fe4ae8..6a530c3af51 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java @@ -5,14 +5,10 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { - private final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautClientCodegen.class); - public static final String OPT_CONFIGURE_AUTH = "configureAuth"; public static final String NAME = "java-micronaut-client"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java index 6d1a3b3785b..7ff2fb2a1f3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautServerCodegen.java @@ -7,8 +7,6 @@ import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.OperationMap; import org.openapitools.codegen.model.OperationsMap; import org.openapitools.codegen.utils.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.File; import java.util.Collections; import java.util.List; @@ -29,8 +27,6 @@ public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen { public static final String DENY_ALL_ROLE_KEY = "denyAll()"; public static final String DENY_ALL_ROLE = "SecurityRule.DENY_ALL"; - private final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautServerCodegen.class); - public static final String NAME = "java-micronaut-server"; protected String controllerPackage = "org.openapitools.controller"; @@ -47,7 +43,7 @@ public class JavaMicronautServerCodegen extends JavaMicronautAbstractCodegen { public JavaMicronautServerCodegen() { super(); - title = "OpenAPI Micronaut Server";; + title = "OpenAPI Micronaut Server"; apiPackage = "org.openapitools.api"; apiDocPath = "docs/controllers"; diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache index 317d6afb92d..ff04dfd1f68 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache @@ -14,7 +14,8 @@ import reactor.core.publisher.Mono; {{#wrapInHttpResponse}} import io.micronaut.http.HttpResponse; {{/wrapInHttpResponse}} -{{#imports}}import {{import}}; +{{#imports}} +import {{import}}; {{/imports}} import javax.annotation.Generated; {{^fullJavaUtil}} @@ -26,37 +27,27 @@ import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; {{/useBeanValidation}} +{{#generateSwagger1Annotations}} +import io.swagger.annotations.*; +{{/generateSwagger1Annotations}} +{{#generateSwagger2Annotations}} +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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +{{/generateSwagger2Annotations}} {{>common/generatedAnnotation}} -@Client("${base-path}") +@Client("${{openbrace}}{{{applicationName}}}-base-path{{closebrace}}") public interface {{classname}} { {{#operations}} {{#operation}} - /** - {{#summary}} - * {{summary}} - {{/summary}} - {{#notes}} - * {{notes}} - {{/notes}} - {{^summary}} - {{^notes}} - * {{nickname}} - {{/notes}} - {{/summary}} - * - {{#allParams}} - * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} - {{#returnType}} - * @return {{returnType}} - {{/returnType}} - {{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation -{{/externalDocs}} - */ - @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") +{{>common/operationAnnotations}}{{! +}} @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") {{#vendorExtensions.x-content-type}} @Produces(value={"{{vendorExtensions.x-content-type}}"}) {{/vendorExtensions.x-content-type}} @@ -71,6 +62,7 @@ public interface {{classname}} { {{>common/operationReturnType}} {{nickname}}({{#allParams}} {{>client/params/queryParams}}{{>client/params/pathParams}}{{>client/params/headerParams}}{{>client/params/bodyParams}}{{>client/params/formParams}}{{>client/params/cookieParams}}{{^-last}}, {{/-last}}{{#-last}} {{/-last}}{{/allParams}}); + {{/operation}} {{/operations}} } diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache index f031ba413c5..56f64f10256 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/application.yml.mustache @@ -1,76 +1,77 @@ {{!CLIENT CONFIGURATION}} {{#client}} -base-path: "{{{basePath}}}/" +{{{applicationName}}}-base-path: "{{{basePath}}}" micronaut: - application: - name: {{artifactId}} - {{! - configure authorization from the parameters - }}{{#configureAuth}}security: - oauth2: - clients:{{#oauthMethods}} - {{{name}}}: - grant-type: {{#isCode}}authorization_code{{/isCode}}{{#isImplicit}}implicit{{/isImplicit}}{{#isPassword}}password{{/isPassword}}{{#isApplication}}client_credentials{{/isApplication}} - scopes: [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]{{!authorization url}}{{#authorizationUrl}} - authorization: - url: "{{{authorizationUrl}}}"{{/authorizationUrl}}{{!token url}}{{#tokenUrl}} - token: - auth-method: client_secret_basic - url: "{{{tokenUrl}}}"{{/tokenUrl}}{{!refreshUrl is not used}} - # TODO Fill in the parameters for {{{name}}} authorization if needed - # client-id: - # client-secret:{{/oauthMethods}}{{/configureAuth}}{{! - do not configure authorization, but leave hints for user - }}{{^configureAuth}}# TODO configure security features - security: - oauth2: - clients: - # An example of how oauth client is filled - # name: - # grant-type: authorization_code | client_credentials - # scopes: [] - # token: - # auth-method: client_secret_basic - # url: "https://" - # client-id: - # client-secret - # An example of how to apply other authorization methods - # authentication: bearer | cookie | session{{/configureAuth}} + application: + name: {{{applicationName}}}{{! + configure authorization from the parameters + }}{{#configureAuth}} + security: + oauth2: + clients:{{#oauthMethods}} + {{{name}}}: + grant-type: {{#isCode}}authorization_code{{/isCode}}{{#isImplicit}}implicit{{/isImplicit}}{{#isPassword}}password{{/isPassword}}{{#isApplication}}client_credentials{{/isApplication}} + scopes: [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]{{!authorization url}}{{#authorizationUrl}} + authorization: + url: "{{{authorizationUrl}}}"{{/authorizationUrl}}{{!token url}}{{#tokenUrl}} + token: + auth-method: client_secret_basic + url: "{{{tokenUrl}}}"{{/tokenUrl}}{{!refreshUrl is not used}} + # TODO Fill in the parameters for {{{name}}} authorization if needed + # client-id: + # client-secret:{{/oauthMethods}}{{/configureAuth}}{{! + do not configure authorization, but leave hints for user + }}{{^configureAuth}} + # TODO configure security features + security: + oauth2: + clients: + # An example of how oauth client is filled + # name: + # grant-type: authorization_code | client_credentials + # scopes: [] + # token: + # auth-method: client_secret_basic + # url: "https://" + # client-id: + # client-secret: + # An example of how to apply other authorization methods + # authentication: bearer | cookie | session{{/configureAuth}} {{#configureAuth}}security: - {{!api key authorization}}api-key-auth:{{#authMethods}}{{#isApiKey}} - {{{name}}}: - location: {{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}{{#isKeyInCookie}}cookie{{/isKeyInCookie}} - param-name: "{{{keyParamName}}}" - # TODO fill in api key for {{{name}}} authorization - api-key: - {{/isApiKey}}{{/authMethods}} - {{!basic authorization}}basic-auth:{{#authMethods}}{{#isBasic}} - {{{name}}}: - # TODO fill in credentials for {{{name}}} authorization - username: - password: + {{!api key authorization}}api-key-auth:{{#authMethods}}{{#isApiKey}} + {{{name}}}: + location: {{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}{{#isKeyInCookie}}cookie{{/isKeyInCookie}} + param-name: "{{{keyParamName}}}" + # TODO fill in api key for {{{name}}} authorization + api-key: + {{/isApiKey}}{{/authMethods}} + {{!basic authorization}}basic-auth:{{#authMethods}}{{#isBasic}} + {{{name}}}: + # TODO fill in credentials for {{{name}}} authorization + username: + password: {{/isBasic}}{{/authMethods}}{{/configureAuth}} {{/client}} {{!SERVER CONFIGURATION}} {{#server}} micronaut: - application: - name: {{artifactId}} - server: - port: 8080{{#contextPath}} - context-path: "{{{contextPath}}}"{{/contextPath}} - security: - # authentication: bearer | cookie | session | idtoken + application: + name: {{{applicationName}}} + server: + port: 8080 + context-path: "{{{contextPath}}}/" + security: + # authentication: bearer | cookie | session | idtoken {{/server}} jackson: - serialization: - writeEnumsUsingToString: true - writeDatesAsTimestamps: false - deserialization: - readEnumsUsingToString: true - failOnUnknownProperties: false - failOnInvalidSubtype: false + serialization: + writeEnumsUsingToString: true + writeDatesAsTimestamps: false + deserialization: + readEnumsUsingToString: true + failOnUnknownProperties: false + failOnInvalidSubtype: false diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache index 2db990f1216..5f6fbfd00ef 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache @@ -43,7 +43,12 @@ dependencies { {{#reactive}} implementation("io.micronaut.reactor:micronaut-reactor") {{/reactive}} - implementation("io.swagger:swagger-annotations:1.5.9") + {{#generateSwagger1Annotations}} + implementation("io.swagger:swagger-annotations:1.6.5") + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} + implementation("io.swagger.core.v3:swagger-annotations:2.2.0") + {{/generateSwagger2Annotations}} runtimeOnly("ch.qos.logback:logback-classic") } diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache index 774748eaaa2..e8da59a73ff 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache @@ -22,7 +22,12 @@ {{{micronautVersion}}} {{groupId}}.Application netty - 1.5.21 + {{#generateSwagger1Annotations}} + 1.6.5 + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} + 2.2.0 + {{/generateSwagger2Annotations}} @@ -122,11 +127,20 @@ logback-classic runtime + {{#generateSwagger1Annotations}} io.swagger swagger-annotations ${swagger-annotations-version} + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} + + io.swagger.core.v3 + swagger-annotations + ${swagger-annotations-version} + + {{/generateSwagger2Annotations}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache index b016c0bcbb1..ed44430d357 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/model.mustache @@ -33,6 +33,13 @@ import javax.validation.Valid; {{/useBeanValidation}} import io.micronaut.core.annotation.*; import javax.annotation.Generated; +{{#generateSwagger1Annotations}} +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +{{/generateSwagger1Annotations}} +{{#generateSwagger2Annotations}} +import io.swagger.v3.oas.annotations.media.Schema; +{{/generateSwagger2Annotations}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache index ebae2af0124..8292f413b28 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache @@ -2,7 +2,12 @@ * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}} */ {{#description}} + {{#generateSwagger1Annotations}} @ApiModel(description = "{{{description}}}") + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} +@Schema({{#name}}name = "{{name}}", {{/name}}description = "{{{description}}}") + {{/generateSwagger2Annotations}} {{/description}} {{#jackson}} @JsonPropertyOrder({ @@ -177,7 +182,13 @@ Declare the class with extends and implements {{/maximum}} * @return {{name}} **/ -{{>common/model/beanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{>common/model/beanValidation}}{{! + }}{{#generateSwagger1Annotations}} + @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} + @Schema(name = "{{{baseName}}}", {{#isReadOnly}}accessMode = Schema.AccessMode.READ_ONLY, {{/isReadOnly}}{{#example}}example = "{{{.}}}", {{/example}}{{#description}}description = "{{{.}}}", {{/description}}required = {{{required}}}) + {{/generateSwagger2Annotations}} {{#vendorExtensions.x-extra-annotation}} {{{vendorExtensions.x-extra-annotation}}} {{/vendorExtensions.x-extra-annotation}} @@ -226,7 +237,7 @@ Declare the class with extends and implements {{#jackson}} {{^vendorExtensions.x-is-jackson-optional-nullable}} {{>common/model/jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}}{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -364,7 +375,9 @@ Declare the class with extends and implements * @param the return type of the visitor * @return the result from the visitor */ - public abstract T accept(Visitor visitor); + public T accept(Visitor visitor) { + return visitor.visit{{classname}}(this); + } /** * A {{classname}} visitor implementation allows visiting the various {{classname}} types. @@ -375,6 +388,7 @@ Declare the class with extends and implements {{#discriminator.mappedModels}} R visit{{modelName}}({{modelName}} value); {{/discriminator.mappedModels}} + R visit{{classname}}({{classname}} value); } {{/discriminator}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/operationAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/operationAnnotations.mustache new file mode 100644 index 00000000000..b0bd1a43f4b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/operationAnnotations.mustache @@ -0,0 +1,102 @@ + /** + {{#summary}} + * {{summary}} + {{/summary}} + {{#notes}} + * {{notes}} + {{/notes}} + {{^summary}} + {{^notes}} + * {{nickname}} + {{/notes}} + {{/summary}} + * + {{#allParams}} + * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/allParams}} + {{#returnType}} + * @return {{returnType}} + {{/returnType}} + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + {{!openapi annotations for info}} + {{#generateSwagger1Annotations}} + @ApiOperation( + value = "{{{summary}}}", + nickname = "{{{operationId}}}"{{#notes}}, + notes = "{{{notes}}}"{{/notes}}{{#returnBaseType}}, + response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, + responseContainer = "{{{returnContainer}}}"{{/returnContainer}}, + authorizations = {{openbrace}}{{#hasAuthMethods}} + {{#authMethods}} + {{#isOAuth}} + @Authorization(value = "{{name}}"{{#scopes.0}}, scopes = { + {{#scopes}} + @AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},{{/-last}} + {{/scopes}} + }{{/scopes.0}}){{^-last}},{{/-last}} + {{/isOAuth}} + {{^isOAuth}} + @Authorization(value = "{{name}}"){{^-last}},{{/-last}} + {{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}}{{closebrace}}, + tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} } + ) + @ApiResponses(value = {{openbrace}}{{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} + {{closebrace}}) + {{/generateSwagger1Annotations}} + {{#generateSwagger2Annotations}} + @Operation( + operationId = "{{{operationId}}}", + {{#summary}} + summary = "{{{.}}}", + {{/summary}} + {{#description}} + description= "{{{.}}}", + {{/description}} + {{#tags.1}} + {{!generate only when at least 2 tags}} + tags = { {{#tags}}"{{name}}"{{^-last}}, {{/-last}}{{/tags}} }, + {{/tags.1}} + responses = { + {{#responses}} + @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = { + {{#produces}} + @Content(mediaType = "{{{mediaType}}}", schema = @Schema(implementation = {{{baseType}}}.class)){{^-last}},{{/-last}} + {{/produces}} + }{{/baseType}}){{^-last}},{{/-last}} + {{/responses}} + }{{#hasParams}}, + parameters = { + {{#allParams}} + @Parameter(name = "{{paramName}}"{{#description}}, description = "{{{description}}}"{{/description}}{{#required}}, required = true{{/required}}){{^-last}},{{/-last}} + {{/allParams}} + }{{/hasParams}}{{#hasAuthMethods}}, + security = { + {{#authMethods}} + @SecurityRequirement(name = "{{name}}"{{#isOAuth}}, scopes = { {{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}} }{{/isOAuth}}){{^-last}},{{/-last}} + {{/authMethods}} + }{{/hasAuthMethods}} + ) + {{/generateSwagger2Annotations}} + {{#implicitHeadersParams.0}} + {{#generateSwagger2Annotations}} + @Parameters({ + {{#implicitHeadersParams}} + @Parameter(name = "{{paramName}}"{{#description}}, description = "{{{description}}}"{{/description}}{{#required}}, required = true{{/required}}){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/generateSwagger2Annotations}} + {{#generateSwagger1Annotations}} + @ApiImplicitParams({ + {{#implicitHeadersParams}} + @ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/generateSwagger1Annotations}} + {{/implicitHeadersParams.0}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache index 336177927e9..c98de1654c2 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/server/controller.mustache @@ -35,66 +35,33 @@ import java.util.Arrays; import javax.validation.Valid; import javax.validation.constraints.*; {{/useBeanValidation}} +{{#generateSwagger1Annotations}} import io.swagger.annotations.*; +{{/generateSwagger1Annotations}} +{{#generateSwagger2Annotations}} +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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +{{/generateSwagger2Annotations}} {{>common/generatedAnnotation}} {{^generateControllerAsAbstract}} @Controller {{/generateControllerAsAbstract}} +{{#generateSwagger2Annotations}} +@Tag(name = "{{{baseName}}}", description = {{#tagDescription}}"{{{.}}}"{{/tagDescription}}{{^tagDescription}}"The {{{baseName}}} API"{{/tagDescription}}) +{{/generateSwagger2Annotations}} public {{#generateControllerAsAbstract}}abstract {{/generateControllerAsAbstract}}class {{classname}} { {{#operations}} {{#operation}} - /** - {{#summary}} - * {{summary}} - {{/summary}} - {{#notes}} - * {{notes}} - {{/notes}} - {{^summary}} - {{^notes}} - * {{nickname}} - {{/notes}} - {{/summary}} - * - {{#allParams}} - * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} - {{/allParams}} - {{#returnType}} - * @return {{returnType}} - {{/returnType}} - {{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation - {{/externalDocs}} - */ - {{!openapi annotations for info}} - @ApiOperation( - value = "{{{summary}}}", - nickname = "{{{operationId}}}"{{#notes}}, - notes = "{{{notes}}}"{{/notes}}{{#returnBaseType}}, - response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, - responseContainer = "{{{returnContainer}}}"{{/returnContainer}}, - authorizations = {{openbrace}}{{#hasAuthMethods}} - {{#authMethods}} - {{#isOAuth}} - @Authorization(value = "{{name}}"{{#scopes}}{{#-first}}, scopes = { - {{#scopes}} - @AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}},{{/-last}} - {{/scopes}} - }{{/-first}}{{/scopes}}){{^-last}},{{/-last}} - {{/isOAuth}} - {{^isOAuth}} - @Authorization(value = "{{name}}"){{^-last}},{{/-last}} - {{/isOAuth}} - {{/authMethods}} - {{/hasAuthMethods}}{{closebrace}}, - tags={{openbrace}}{{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}}{{closebrace}}) - {{!openapi annotations for info about responses}} - @ApiResponses(value = {{openbrace}}{{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}{{closebrace}}) - {{!micronaut annotations}} - @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") +{{>common/operationAnnotations}}{{! + micronaut annotations + }} @{{#lambda.pascalcase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.pascalcase}}(uri="{{{path}}}") @Produces(value = {{openbrace}}{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}{{closebrace}}) {{#consumes.0}} @Consumes(value = {{openbrace}}{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}{{closebrace}}) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java index 7a4e20c2392..4b1ad1db749 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautServerCodegenTest.java @@ -6,7 +6,6 @@ import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.JavaMicronautAbstractCodegen; import org.openapitools.codegen.languages.JavaMicronautServerCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -16,6 +15,7 @@ import static org.testng.Assert.assertEquals; public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { protected static String ROLES_EXTENSION_TEST_PATH = "src/test/resources/3_0/micronaut/roles-extension-test.yaml"; + protected static String MULTI_TAGS_TEST_PATH = "src/test/resources/3_0/micronaut/multi-tags-test.yaml"; @Test public void clientOptsUnicity() { @@ -245,7 +245,6 @@ public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_WRAP_IN_HTTP_RESPONSE, "true"); String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); - // Constructor should have properties String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; assertFileContains(controllerPath + "PetController.java", "Mono>"); } @@ -257,7 +256,6 @@ public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_WRAP_IN_HTTP_RESPONSE, "false"); String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); - // Constructor should have properties String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; assertFileContains(controllerPath + "PetController.java", "Mono"); assertFileNotContains(controllerPath + "PetController.java", "HttpResponse"); @@ -270,7 +268,6 @@ public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_WRAP_IN_HTTP_RESPONSE, "true"); String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); - // Constructor should have properties String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; assertFileContains(controllerPath + "PetController.java", "HttpResponse"); assertFileNotContains(controllerPath + "PetController.java", "Mono"); @@ -283,10 +280,65 @@ public class MicronautServerCodegenTest extends AbstractMicronautCodegenTest { codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_WRAP_IN_HTTP_RESPONSE, "false"); String outputPath = generateFiles(codegen, PETSTORE_PATH, CodegenConstants.MODELS, CodegenConstants.APIS); - // Constructor should have properties String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; assertFileContains(controllerPath + "PetController.java", "Pet"); assertFileNotContains(controllerPath + "PetController.java", "Mono"); assertFileNotContains(controllerPath + "PetController.java", "HttpResponse"); } + + @Test + public void doGenerateOperationOnlyForFirstTag() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + String outputPath = generateFiles(codegen, MULTI_TAGS_TEST_PATH, CodegenConstants.MODELS, + CodegenConstants.APIS, CodegenConstants.API_TESTS); + + String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; + String controllerTestPath = outputPath + "/src/test/java/org/openapitools/controller/"; + + // Verify files are generated only for the required tags + assertFileExists(controllerPath + "AuthorsController.java"); + assertFileExists(controllerPath + "BooksController.java"); + assertFileNotExists(controllerPath + "SearchController.java"); + + // Verify the same for test files + assertFileExists(controllerTestPath + "AuthorsControllerTest.java"); + assertFileExists(controllerTestPath + "BooksControllerTest.java"); + assertFileNotExists(controllerTestPath + "SearchControllerTest.java"); + + // Verify all the methods are generated only ones + assertFileContains(controllerPath + "AuthorsController.java", + "authorSearchGet", "getAuthor", "getAuthorBooks"); + assertFileContains(controllerPath + "BooksController.java", + "bookCreateEntryPost", "bookSearchGet", "bookSendReviewPost", "getBook", "isBookAvailable"); + assertFileNotContains(controllerPath + "BooksController.java", "getAuthorBooks"); + } + + @Test + public void doRepeatOperationForAllTags() { + JavaMicronautServerCodegen codegen = new JavaMicronautServerCodegen(); + codegen.additionalProperties().put(JavaMicronautServerCodegen.OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG, "false"); + String outputPath = generateFiles(codegen, MULTI_TAGS_TEST_PATH, CodegenConstants.MODELS, + CodegenConstants.APIS, CodegenConstants.API_TESTS); + + String controllerPath = outputPath + "src/main/java/org/openapitools/controller/"; + String controllerTestPath = outputPath + "/src/test/java/org/openapitools/controller/"; + + // Verify all the tags created + assertFileExists(controllerPath + "AuthorsController.java"); + assertFileExists(controllerPath + "BooksController.java"); + assertFileExists(controllerPath + "SearchController.java"); + + // Verify the same for test files + assertFileExists(controllerTestPath + "AuthorsControllerTest.java"); + assertFileExists(controllerTestPath + "BooksControllerTest.java"); + assertFileExists(controllerTestPath + "SearchControllerTest.java"); + + // Verify all the methods are repeated for each of the tags + assertFileContains(controllerPath + "AuthorsController.java", + "authorSearchGet", "getAuthor", "getAuthorBooks"); + assertFileContains(controllerPath + "BooksController.java", + "bookCreateEntryPost", "bookSearchGet", "bookSendReviewPost", "getBook", "isBookAvailable", "getAuthorBooks"); + assertFileContains(controllerPath + "SearchController.java", + "authorSearchGet", "bookSearchGet"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/micronaut/multi-tags-test.yaml b/modules/openapi-generator/src/test/resources/3_0/micronaut/multi-tags-test.yaml new file mode 100644 index 00000000000..1053ab885e8 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/micronaut/multi-tags-test.yaml @@ -0,0 +1,155 @@ +openapi: 3.0.0 +info: + description: This is a test api description where operations have multiple tags + version: 1.0.0 + title: Library + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - {name: books, description: Everything about books} + - {name: authors, description: Everything about book authors} + - {name: search, description: Tags for useful searching} +paths: + /book/{bookName}: + get: + tags: [books] + summary: Get a book by name + operationId: getBook + parameters: + - {name: bookName, in: path, required: true, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + schema: { $ref: "#/components/schemas/Book" } + /book/availability/{bookName}: + get: + tags: [books] + summary: Check book availability + operationId: isBookAvailable + parameters: + - { name: bookName, in: path, required: true, schema: { type: string, example: "Book 1" } } + responses: + '200': + description: success + content: + text/plain: + schema: { $ref: "#/components/schemas/BookAvailability" } + /book/search: + get: + tags: [books, search] + summary: Search for a book + parameters: + - {name: bookName, in: query, required: false, schema: {type: string, example: "Book 2"}} + - {name: ISBN, in: query, required: false, schema: {type: string, pattern: "[0-9]{13}", example: "0123456789123"}} + - {name: published, in: query, required: false, schema: {type: string, format: date}} + - {name: minNumPages, in: query, required: false, schema: {type: integer, format: int32, minimum: 1, maximum: 1000}} + - {name: minReadTime, in: query, required: false, schema: {type: number, format: float, minimum: 1, example: 5.7}} + - {name: description, in: query, required: false, schema: {type: string, minLength: 4, nullable: true}} + - {name: preferences, in: cookie, required: false, schema: {type: string}} + - {name: geoLocation, in: header, required: false, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + schema: { type: array, items: { $ref: "#/components/schemas/Book" } } + /book/sendReview: + post: + tags: [books] + summary: Send a review to a book + parameters: + - {name: bookName, in: query, required: true, schema: {type: string, nullable: false}} + requestBody: + content: + application/x-www-form-urlencoded: + schema: {$ref: "#/components/schemas/Review"} + responses: + '200': + description: success + /book/createEntry: + post: + tags: [books] + summary: Create a new entry for a book + requestBody: + content: + application/json: { schema: { $ref: "#/components/schemas/Book" } } + application/xml: { schema: { $ref: "#/components/schemas/Book" } } + responses: + '200': + description: success + content: + application/json: { schema: { $ref: "#/components/schemas/Book" } } + application/xml: { schema: { $ref: "#/components/schemas/Book" } } + /author/{authorName}: + get: + tags: [authors] + summary: Get an author by name + operationId: getAuthor + parameters: + - {name: authorName, in: path, required: true, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + schema: { $ref: "#/components/schemas/Author" } + /author/search: + get: + tags: [authors, search] + summary: Search for an author + parameters: + - {name: authorName, in: query, required: false, schema: {type: string, example: "Eric Berne"}} + - {name: approximateYearBorn, in: query, required: false, schema: {type: int, example: 1990}} + responses: + '200': + description: success + content: + application/json: + schema: { type: array, items: { $ref: "#/components/schemas/Author" } } + /author/{authorName}/getBooks: + get: + tags: [authors, books] + summary: Get books by author name + operationId: getAuthorBooks + parameters: + - {name: authorName, in: path, required: true, schema: {type: string}} + responses: + '200': + description: success + content: + application/json: + schema: { type: array, items: { $ref: "#/components/schemas/Book" } } +components: + schemas: + Book: + title: Book + description: book instance + type: object + properties: + name: {type: string} + availability: {$ref: "#/components/schemas/BookAvailability"} + pages: {type: integer, format: int32, minimum: 1} + readTime: {type: number, format: float, minimum: 0, exclusiveMinimum: true} + author: {$ref: "#/components/schemas/Author"} + required: ["name", "availability"] + default: + name: "Bob's Adventures" + availability: "available" + BookAvailability: + type: string + enum: ["available", "not available", "reserved"] + default: "not available" + Review: + type: object + properties: + rating: {type: integer, minimum: 1, maximum: 5, default: 2} + description: {type: string, maxLength: 200} + required: [rating] + Author: + type: object + properties: + name: {type: string, pattern: "[a-zA-z ]+"} + yearBorn: {type: int, minimum: 0, maximum: 2030} diff --git a/samples/client/petstore/java-micronaut-client/build.gradle b/samples/client/petstore/java-micronaut-client/build.gradle index c74021320cc..b5a06b17985 100644 --- a/samples/client/petstore/java-micronaut-client/build.gradle +++ b/samples/client/petstore/java-micronaut-client/build.gradle @@ -30,7 +30,6 @@ dependencies { implementation("io.micronaut.security:micronaut-security") implementation("io.micronaut.security:micronaut-security-oauth2") implementation("io.micronaut.reactor:micronaut-reactor") - implementation("io.swagger:swagger-annotations:1.5.9") runtimeOnly("ch.qos.logback:logback-classic") } diff --git a/samples/client/petstore/java-micronaut-client/gradle.properties b/samples/client/petstore/java-micronaut-client/gradle.properties index 6d5febf8520..76fce170509 100644 --- a/samples/client/petstore/java-micronaut-client/gradle.properties +++ b/samples/client/petstore/java-micronaut-client/gradle.properties @@ -1 +1 @@ -micronautVersion=3.3.1 \ No newline at end of file +micronautVersion=3.4.3 \ No newline at end of file diff --git a/samples/client/petstore/java-micronaut-client/pom.xml b/samples/client/petstore/java-micronaut-client/pom.xml index 45ce5f36ccb..b684da89c82 100644 --- a/samples/client/petstore/java-micronaut-client/pom.xml +++ b/samples/client/petstore/java-micronaut-client/pom.xml @@ -10,7 +10,7 @@ io.micronaut micronaut-parent - 3.3.1 + 3.4.3 @@ -19,10 +19,9 @@ UTF-8 - 3.3.1 + 3.4.3 org.openapitools.Application netty - 1.5.21 @@ -99,11 +98,6 @@ logback-classic runtime - - io.swagger - swagger-annotations - ${swagger-annotations-version} - diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java index 1656631481a..347defb034a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -28,7 +28,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface AnotherFakeApi { /** * To test special tags @@ -43,4 +43,5 @@ public interface AnotherFakeApi { Mono call123testSpecialTags( @Body @NotNull @Valid ModelClient _body ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java index 4fdbd1dc1a8..c09015a9935 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeApi.java @@ -36,7 +36,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface FakeApi { /** * creates an XmlItem @@ -50,6 +50,7 @@ public interface FakeApi { Mono createXmlItem( @Body @NotNull @Valid XmlItem xmlItem ); + /** * Test serialization of outer boolean types * @@ -62,6 +63,7 @@ public interface FakeApi { Mono fakeOuterBooleanSerialize( @Body @Nullable Boolean _body ); + /** * Test serialization of object with outer number type * @@ -74,6 +76,7 @@ public interface FakeApi { Mono fakeOuterCompositeSerialize( @Body @Nullable @Valid OuterComposite _body ); + /** * Test serialization of outer number types * @@ -86,6 +89,7 @@ public interface FakeApi { Mono fakeOuterNumberSerialize( @Body @Nullable BigDecimal _body ); + /** * Test serialization of outer string types * @@ -98,6 +102,7 @@ public interface FakeApi { Mono fakeOuterStringSerialize( @Body @Nullable String _body ); + /** * For this test, the body for this request much reference a schema named `File`. * @@ -109,6 +114,7 @@ public interface FakeApi { Mono testBodyWithFileSchema( @Body @NotNull @Valid FileSchemaTestClass _body ); + /** * testBodyWithQueryParams * @@ -122,6 +128,7 @@ public interface FakeApi { @QueryValue(value="query") @NotNull String query, @Body @NotNull @Valid User _body ); + /** * To test \"client\" model * To test \"client\" model @@ -135,6 +142,7 @@ public interface FakeApi { Mono testClientModel( @Body @NotNull @Valid ModelClient _body ); + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -173,6 +181,7 @@ public interface FakeApi { @Nullable @Size(min=10, max=64) String password, @Nullable String paramCallback ); + /** * To test enum parameters * To test enum parameters @@ -199,6 +208,7 @@ public interface FakeApi { @Nullable List enumFormStringArray, @Nullable String enumFormString ); + /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) @@ -220,6 +230,7 @@ public interface FakeApi { @Header(name="boolean_group") @Nullable Boolean booleanGroup, @QueryValue(value="int64_group") @Nullable Long int64Group ); + /** * test inline additionalProperties * @@ -231,6 +242,7 @@ public interface FakeApi { Mono testInlineAdditionalProperties( @Body @NotNull Map param ); + /** * test json serialization of form data * @@ -244,6 +256,7 @@ public interface FakeApi { @NotNull String param, @NotNull String param2 ); + /** * To test the collection format in query parameters * @@ -262,4 +275,5 @@ public interface FakeApi { @QueryValue(value="url") @NotNull List url, @QueryValue(value="context") @NotNull List context ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index d7b134fe5bc..8cdc620330e 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -28,7 +28,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface FakeClassnameTags123Api { /** * To test class name in snake case @@ -43,4 +43,5 @@ public interface FakeClassnameTags123Api { Mono testClassname( @Body @NotNull @Valid ModelClient _body ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java index 7697468a7e9..ff635c948c3 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/PetApi.java @@ -31,7 +31,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface PetApi { /** * Add a new pet to the store @@ -44,6 +44,7 @@ public interface PetApi { Mono addPet( @Body @NotNull @Valid Pet _body ); + /** * Deletes a pet * @@ -56,6 +57,7 @@ public interface PetApi { @PathVariable(name="petId") @NotNull Long petId, @Header(name="api_key") @Nullable String apiKey ); + /** * Finds Pets by status * Multiple status values can be provided with comma separated strings @@ -68,6 +70,7 @@ public interface PetApi { Mono> findPetsByStatus( @QueryValue(value="status") @NotNull List status ); + /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -80,6 +83,7 @@ public interface PetApi { Mono> findPetsByTags( @QueryValue(value="tags") @NotNull Set tags ); + /** * Find pet by ID * Returns a single pet @@ -92,6 +96,7 @@ public interface PetApi { Mono getPetById( @PathVariable(name="petId") @NotNull Long petId ); + /** * Update an existing pet * @@ -103,6 +108,7 @@ public interface PetApi { Mono updatePet( @Body @NotNull @Valid Pet _body ); + /** * Updates a pet in the store with form data * @@ -118,6 +124,7 @@ public interface PetApi { @Nullable String name, @Nullable String status ); + /** * uploads an image * @@ -134,6 +141,7 @@ public interface PetApi { @Nullable String additionalMetadata, @Nullable File _file ); + /** * uploads an image (required) * @@ -150,4 +158,5 @@ public interface PetApi { @NotNull File requiredFile, @Nullable String additionalMetadata ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java index 17b77d80594..9a3b23b73cb 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java @@ -28,7 +28,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface StoreApi { /** * Delete purchase order by ID @@ -41,6 +41,7 @@ public interface StoreApi { Mono deleteOrder( @PathVariable(name="order_id") @NotNull String orderId ); + /** * Returns pet inventories by status * Returns a map of status codes to quantities @@ -50,6 +51,7 @@ public interface StoreApi { @Get(uri="/store/inventory") @Consumes(value={"application/json"}) Mono> getInventory(); + /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -62,6 +64,7 @@ public interface StoreApi { Mono getOrderById( @PathVariable(name="order_id") @NotNull @Min(1L) @Max(5L) Long orderId ); + /** * Place an order for a pet * @@ -74,4 +77,5 @@ public interface StoreApi { Mono placeOrder( @Body @NotNull @Valid Order _body ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java index 41f8102271c..316678593b7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/UserApi.java @@ -29,7 +29,7 @@ import javax.validation.Valid; import javax.validation.constraints.*; @Generated(value="org.openapitools.codegen.languages.JavaMicronautClientCodegen") -@Client("${base-path}") +@Client("${petstore-micronaut-base-path}") public interface UserApi { /** * Create user @@ -43,6 +43,7 @@ public interface UserApi { Mono createUser( @Body @NotNull @Valid User _body ); + /** * Creates list of users with given input array * @@ -54,6 +55,7 @@ public interface UserApi { Mono createUsersWithArrayInput( @Body @NotNull List _body ); + /** * Creates list of users with given input array * @@ -65,6 +67,7 @@ public interface UserApi { Mono createUsersWithListInput( @Body @NotNull List _body ); + /** * Delete user * This can only be done by the logged in user. @@ -76,6 +79,7 @@ public interface UserApi { Mono deleteUser( @PathVariable(name="username") @NotNull String username ); + /** * Get user by user name * @@ -87,6 +91,7 @@ public interface UserApi { Mono getUserByName( @PathVariable(name="username") @NotNull String username ); + /** * Logs user into the system * @@ -100,6 +105,7 @@ public interface UserApi { @QueryValue(value="username") @NotNull String username, @QueryValue(value="password") @NotNull String password ); + /** * Logs out current logged in user session * @@ -107,6 +113,7 @@ public interface UserApi { @Get(uri="/user/logout") @Consumes(value={"application/json"}) Mono logoutUser(); + /** * Updated user * This can only be done by the logged in user. @@ -121,4 +128,5 @@ public interface UserApi { @PathVariable(name="username") @NotNull String username, @Body @NotNull @Valid User _body ); + } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 7ea0ecf7aac..907f4e4be0a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class AdditionalPropertiesAnyType extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -60,7 +57,7 @@ public class AdditionalPropertiesAnyType extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java index 3f3a6fb5f0f..75d43481bab 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -52,7 +50,6 @@ public class AdditionalPropertiesArray extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -61,7 +58,7 @@ public class AdditionalPropertiesArray extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java index 5d4b5e8c050..9eee8f95f51 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class AdditionalPropertiesBoolean extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -60,7 +57,7 @@ public class AdditionalPropertiesBoolean extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java index 6809a8223b0..36365c4ff1c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; @@ -100,7 +98,6 @@ public class AdditionalPropertiesClass { * @return mapString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMapString() { @@ -109,7 +106,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { + public void setMapString(Map mapString) { this.mapString = mapString; } @@ -131,7 +128,6 @@ public class AdditionalPropertiesClass { * @return mapNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMapNumber() { @@ -140,7 +136,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { + public void setMapNumber(Map mapNumber) { this.mapNumber = mapNumber; } @@ -162,7 +158,6 @@ public class AdditionalPropertiesClass { * @return mapInteger **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMapInteger() { @@ -171,7 +166,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { + public void setMapInteger(Map mapInteger) { this.mapInteger = mapInteger; } @@ -193,7 +188,6 @@ public class AdditionalPropertiesClass { * @return mapBoolean **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMapBoolean() { @@ -202,7 +196,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { + public void setMapBoolean(Map mapBoolean) { this.mapBoolean = mapBoolean; } @@ -224,7 +218,6 @@ public class AdditionalPropertiesClass { * @return mapArrayInteger **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map> getMapArrayInteger() { @@ -233,7 +226,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { + public void setMapArrayInteger(Map> mapArrayInteger) { this.mapArrayInteger = mapArrayInteger; } @@ -255,7 +248,6 @@ public class AdditionalPropertiesClass { * @return mapArrayAnytype **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map> getMapArrayAnytype() { @@ -264,7 +256,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { + public void setMapArrayAnytype(Map> mapArrayAnytype) { this.mapArrayAnytype = mapArrayAnytype; } @@ -286,7 +278,6 @@ public class AdditionalPropertiesClass { * @return mapMapString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map> getMapMapString() { @@ -295,7 +286,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { + public void setMapMapString(Map> mapMapString) { this.mapMapString = mapMapString; } @@ -317,7 +308,6 @@ public class AdditionalPropertiesClass { * @return mapMapAnytype **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map> getMapMapAnytype() { @@ -326,7 +316,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { + public void setMapMapAnytype(Map> mapMapAnytype) { this.mapMapAnytype = mapMapAnytype; } @@ -340,7 +330,6 @@ public class AdditionalPropertiesClass { * @return anytype1 **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Object getAnytype1() { @@ -349,7 +338,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_ANYTYPE1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { + public void setAnytype1(Object anytype1) { this.anytype1 = anytype1; } @@ -363,7 +352,6 @@ public class AdditionalPropertiesClass { * @return anytype2 **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Object getAnytype2() { @@ -372,7 +360,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_ANYTYPE2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { + public void setAnytype2(Object anytype2) { this.anytype2 = anytype2; } @@ -386,7 +374,6 @@ public class AdditionalPropertiesClass { * @return anytype3 **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ANYTYPE3) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Object getAnytype3() { @@ -395,7 +382,7 @@ public class AdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_ANYTYPE3) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { + public void setAnytype3(Object anytype3) { this.anytype3 = anytype3; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java index a020738ebc2..cd8ef08023e 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class AdditionalPropertiesInteger extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -60,7 +57,7 @@ public class AdditionalPropertiesInteger extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java index c14416fb9f4..c6a441aa064 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; @@ -52,7 +50,6 @@ public class AdditionalPropertiesNumber extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -61,7 +58,7 @@ public class AdditionalPropertiesNumber extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java index 46b9daa8130..5b89cda02cf 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class AdditionalPropertiesObject extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -60,7 +57,7 @@ public class AdditionalPropertiesObject extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java index 5a2ba9d5aa4..b7f59b0229d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/AdditionalPropertiesString.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class AdditionalPropertiesString extends HashMap { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -60,7 +57,7 @@ public class AdditionalPropertiesString extends HashMap { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java index f8515029ed3..5114c4ebd29 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Animal.java @@ -17,8 +17,6 @@ import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -66,7 +64,6 @@ public class Animal { * @return className **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_CLASS_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getClassName() { @@ -75,7 +72,7 @@ public class Animal { @JsonProperty(JSON_PROPERTY_CLASS_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClassName(String className) { + public void setClassName(String className) { this.className = className; } @@ -89,7 +86,6 @@ public class Animal { * @return color **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getColor() { @@ -98,7 +94,7 @@ public class Animal { @JsonProperty(JSON_PROPERTY_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setColor(String color) { + public void setColor(String color) { this.color = color; } @@ -148,7 +144,9 @@ public class Animal { * @param the return type of the visitor * @return the result from the visitor */ - public abstract T accept(Visitor visitor); + public T accept(Visitor visitor) { + return visitor.visitAnimal(this); + } /** * A Animal visitor implementation allows visiting the various Animal types. @@ -159,6 +157,7 @@ public class Animal { R visitBigCat(BigCat value); R visitCat(Cat value); R visitDog(Dog value); + R visitAnimal(Animal value); } } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index 864a08f6bc8..fadb79c8c54 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -59,7 +57,6 @@ public class ArrayOfArrayOfNumberOnly { * @return arrayArrayNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List> getArrayArrayNumber() { @@ -68,7 +65,7 @@ public class ArrayOfArrayOfNumberOnly { @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayNumber(List> arrayArrayNumber) { + public void setArrayArrayNumber(List> arrayArrayNumber) { this.arrayArrayNumber = arrayArrayNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java index 27aa24b705d..d10cbe105bd 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -59,7 +57,6 @@ public class ArrayOfNumberOnly { * @return arrayNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getArrayNumber() { @@ -68,7 +65,7 @@ public class ArrayOfNumberOnly { @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayNumber(List arrayNumber) { + public void setArrayNumber(List arrayNumber) { this.arrayNumber = arrayNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java index 11ed7f82a40..f81d676585c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ArrayTest.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.model.ReadOnlyFirst; @@ -67,7 +65,6 @@ public class ArrayTest { * @return arrayOfString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getArrayOfString() { @@ -76,7 +73,7 @@ public class ArrayTest { @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayOfString(List arrayOfString) { + public void setArrayOfString(List arrayOfString) { this.arrayOfString = arrayOfString; } @@ -98,7 +95,6 @@ public class ArrayTest { * @return arrayArrayOfInteger **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List> getArrayArrayOfInteger() { @@ -107,7 +103,7 @@ public class ArrayTest { @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { + public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { this.arrayArrayOfInteger = arrayArrayOfInteger; } @@ -129,7 +125,6 @@ public class ArrayTest { * @return arrayArrayOfModel **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List> getArrayArrayOfModel() { @@ -138,7 +133,7 @@ public class ArrayTest { @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { + public void setArrayArrayOfModel(List> arrayArrayOfModel) { this.arrayArrayOfModel = arrayArrayOfModel; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java index 2b32767ca00..89f8c1573ab 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCat.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.BigCatAllOf; import org.openapitools.model.Cat; import com.fasterxml.jackson.annotation.*; @@ -86,7 +84,6 @@ public class BigCat extends Cat { * @return kind **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public KindEnum getKind() { @@ -95,7 +92,7 @@ public class BigCat extends Cat { @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { + public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java index 9f21a4ac831..f303a9ebc69 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -84,7 +82,6 @@ public class BigCatAllOf { * @return kind **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public KindEnum getKind() { @@ -93,7 +90,7 @@ public class BigCatAllOf { @JsonProperty(JSON_PROPERTY_KIND) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setKind(KindEnum kind) { + public void setKind(KindEnum kind) { this.kind = kind; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java index d1d3ec3a943..5ffd100f25a 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Capitalization.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -68,7 +66,6 @@ public class Capitalization { * @return smallCamel **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getSmallCamel() { @@ -77,7 +74,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallCamel(String smallCamel) { + public void setSmallCamel(String smallCamel) { this.smallCamel = smallCamel; } @@ -91,7 +88,6 @@ public class Capitalization { * @return capitalCamel **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getCapitalCamel() { @@ -100,7 +96,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalCamel(String capitalCamel) { + public void setCapitalCamel(String capitalCamel) { this.capitalCamel = capitalCamel; } @@ -114,7 +110,6 @@ public class Capitalization { * @return smallSnake **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getSmallSnake() { @@ -123,7 +118,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallSnake(String smallSnake) { + public void setSmallSnake(String smallSnake) { this.smallSnake = smallSnake; } @@ -137,7 +132,6 @@ public class Capitalization { * @return capitalSnake **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getCapitalSnake() { @@ -146,7 +140,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalSnake(String capitalSnake) { + public void setCapitalSnake(String capitalSnake) { this.capitalSnake = capitalSnake; } @@ -160,7 +154,6 @@ public class Capitalization { * @return scAETHFlowPoints **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getScAETHFlowPoints() { @@ -169,7 +162,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScAETHFlowPoints(String scAETHFlowPoints) { + public void setScAETHFlowPoints(String scAETHFlowPoints) { this.scAETHFlowPoints = scAETHFlowPoints; } @@ -183,7 +176,6 @@ public class Capitalization { * @return ATT_NAME **/ @Nullable - @ApiModelProperty(value = "Name of the pet ") @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getATTNAME() { @@ -192,7 +184,7 @@ public class Capitalization { @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setATTNAME(String ATT_NAME) { + public void setATTNAME(String ATT_NAME) { this.ATT_NAME = ATT_NAME; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java index 27967982a7f..4b89061a648 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Cat.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.CatAllOf; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class Cat extends Animal { * @return declawed **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getDeclawed() { @@ -60,7 +57,7 @@ public class Cat extends Animal { @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { + public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java index 727fb1f91e7..87d4c30e74f 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/CatAllOf.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +47,6 @@ public class CatAllOf { * @return declawed **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getDeclawed() { @@ -58,7 +55,7 @@ public class CatAllOf { @JsonProperty(JSON_PROPERTY_DECLAWED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { + public void setDeclawed(Boolean declawed) { this.declawed = declawed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java index ad1f82455c4..91352eb0d09 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Category.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -52,7 +50,6 @@ public class Category { * @return id **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -61,7 +58,7 @@ public class Category { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -75,7 +72,6 @@ public class Category { * @return name **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { @@ -84,7 +80,7 @@ public class Category { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java index b42420c2e20..4ed9eb6e21c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ClassModel.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -26,7 +24,6 @@ import javax.annotation.Generated; /** * Model for testing model with \"_class\" property */ -@ApiModel(description = "Model for testing model with \"_class\" property") @JsonPropertyOrder({ ClassModel.JSON_PROPERTY_PROPERTY_CLASS }) @@ -49,7 +46,6 @@ public class ClassModel { * @return propertyClass **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPropertyClass() { @@ -58,7 +54,7 @@ public class ClassModel { @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java index fd967f28360..c06f9057f35 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Dog.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.Animal; import org.openapitools.model.DogAllOf; import com.fasterxml.jackson.annotation.*; @@ -51,7 +49,6 @@ public class Dog extends Animal { * @return breed **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getBreed() { @@ -60,7 +57,7 @@ public class Dog extends Animal { @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { + public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java index e7e81982eab..e4af0ea8e8d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/DogAllOf.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +47,6 @@ public class DogAllOf { * @return breed **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getBreed() { @@ -58,7 +55,7 @@ public class DogAllOf { @JsonProperty(JSON_PROPERTY_BREED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { + public void setBreed(String breed) { this.breed = breed; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java index 004502a581f..60ea312f8b8 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumArrays.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.*; @@ -120,7 +118,6 @@ public class EnumArrays { * @return justSymbol **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public JustSymbolEnum getJustSymbol() { @@ -129,7 +126,7 @@ public class EnumArrays { @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustSymbol(JustSymbolEnum justSymbol) { + public void setJustSymbol(JustSymbolEnum justSymbol) { this.justSymbol = justSymbol; } @@ -151,7 +148,6 @@ public class EnumArrays { * @return arrayEnum **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getArrayEnum() { @@ -160,7 +156,7 @@ public class EnumArrays { @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayEnum(List arrayEnum) { + public void setArrayEnum(List arrayEnum) { this.arrayEnum = arrayEnum; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java index 0b53b5cf395..ec6a2594159 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/EnumTest.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnum; import com.fasterxml.jackson.annotation.*; @@ -200,7 +198,6 @@ public class EnumTest { * @return enumString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public EnumStringEnum getEnumString() { @@ -209,7 +206,7 @@ public class EnumTest { @JsonProperty(JSON_PROPERTY_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumString(EnumStringEnum enumString) { + public void setEnumString(EnumStringEnum enumString) { this.enumString = enumString; } @@ -223,7 +220,6 @@ public class EnumTest { * @return enumStringRequired **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) public EnumStringRequiredEnum getEnumStringRequired() { @@ -232,7 +228,7 @@ public class EnumTest { @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { + public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { this.enumStringRequired = enumStringRequired; } @@ -246,7 +242,6 @@ public class EnumTest { * @return enumInteger **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public EnumIntegerEnum getEnumInteger() { @@ -255,7 +250,7 @@ public class EnumTest { @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumInteger(EnumIntegerEnum enumInteger) { + public void setEnumInteger(EnumIntegerEnum enumInteger) { this.enumInteger = enumInteger; } @@ -269,7 +264,6 @@ public class EnumTest { * @return enumNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public EnumNumberEnum getEnumNumber() { @@ -278,7 +272,7 @@ public class EnumTest { @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumNumber(EnumNumberEnum enumNumber) { + public void setEnumNumber(EnumNumberEnum enumNumber) { this.enumNumber = enumNumber; } @@ -292,7 +286,6 @@ public class EnumTest { * @return outerEnum **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public OuterEnum getOuterEnum() { @@ -301,7 +294,7 @@ public class EnumTest { @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { + public void setOuterEnum(OuterEnum outerEnum) { this.outerEnum = outerEnum; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java index 241d2cf9aa7..73a1631da7d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FileSchemaTestClass.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.model.ModelFile; @@ -56,7 +54,6 @@ public class FileSchemaTestClass { **/ @Valid @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ModelFile getFile() { @@ -65,7 +62,7 @@ public class FileSchemaTestClass { @JsonProperty(JSON_PROPERTY_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFile(ModelFile _file) { + public void setFile(ModelFile _file) { this._file = _file; } @@ -87,7 +84,6 @@ public class FileSchemaTestClass { * @return files **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getFiles() { @@ -96,7 +92,7 @@ public class FileSchemaTestClass { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(List files) { this.files = files; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java index c0773d4e65e..c1f33ed5d02 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/FormatTest.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; @@ -110,7 +108,6 @@ public class FormatTest { @Nullable @Min(10) @Max(100) - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getInteger() { @@ -119,7 +116,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInteger(Integer integer) { + public void setInteger(Integer integer) { this.integer = integer; } @@ -137,7 +134,6 @@ public class FormatTest { @Nullable @Min(20) @Max(200) - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT32) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getInt32() { @@ -146,7 +142,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_INT32) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt32(Integer int32) { + public void setInt32(Integer int32) { this.int32 = int32; } @@ -160,7 +156,6 @@ public class FormatTest { * @return int64 **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INT64) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getInt64() { @@ -169,7 +164,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_INT64) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt64(Long int64) { + public void setInt64(Long int64) { this.int64 = int64; } @@ -187,7 +182,6 @@ public class FormatTest { @NotNull @DecimalMin("32.1") @DecimalMax("543.2") - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) public BigDecimal getNumber() { @@ -196,7 +190,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(BigDecimal number) { + public void setNumber(BigDecimal number) { this.number = number; } @@ -214,7 +208,6 @@ public class FormatTest { @Nullable @DecimalMin("54.3") @DecimalMax("987.6") - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FLOAT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Float getFloat() { @@ -223,7 +216,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_FLOAT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(Float _float) { + public void setFloat(Float _float) { this._float = _float; } @@ -241,7 +234,6 @@ public class FormatTest { @Nullable @DecimalMin("67.8") @DecimalMax("123.4") - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DOUBLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Double getDouble() { @@ -250,7 +242,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_DOUBLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(Double _double) { + public void setDouble(Double _double) { this._double = _double; } @@ -265,7 +257,6 @@ public class FormatTest { **/ @Nullable @Pattern(regexp="/[a-z]/i") - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getString() { @@ -274,7 +265,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setString(String string) { + public void setString(String string) { this.string = string; } @@ -288,7 +279,6 @@ public class FormatTest { * @return _byte **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BYTE) @JsonInclude(value = JsonInclude.Include.ALWAYS) public byte[] getByte() { @@ -297,7 +287,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_BYTE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setByte(byte[] _byte) { + public void setByte(byte[] _byte) { this._byte = _byte; } @@ -311,7 +301,6 @@ public class FormatTest { * @return binary **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BINARY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public File getBinary() { @@ -320,7 +309,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_BINARY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBinary(File binary) { + public void setBinary(File binary) { this.binary = binary; } @@ -334,7 +323,6 @@ public class FormatTest { * @return date **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") @@ -345,7 +333,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - public void setDate(LocalDate date) { + public void setDate(LocalDate date) { this.date = date; } @@ -359,7 +347,6 @@ public class FormatTest { * @return dateTime **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") @@ -370,7 +357,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(OffsetDateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -384,7 +371,6 @@ public class FormatTest { * @return uuid **/ @Nullable - @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getUuid() { @@ -393,7 +379,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { + public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -408,7 +394,6 @@ public class FormatTest { **/ @NotNull @Size(min=10, max=64) - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getPassword() { @@ -417,7 +402,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPassword(String password) { + public void setPassword(String password) { this.password = password; } @@ -431,7 +416,6 @@ public class FormatTest { * @return bigDecimal **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getBigDecimal() { @@ -440,7 +424,7 @@ public class FormatTest { @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { + public void setBigDecimal(BigDecimal bigDecimal) { this.bigDecimal = bigDecimal; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java index d1b89a1d934..294cfbe27ae 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/HasOnlyReadOnly.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -48,7 +46,6 @@ public class HasOnlyReadOnly { * @return bar **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getBar() { @@ -60,7 +57,6 @@ public class HasOnlyReadOnly { * @return foo **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FOO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getFoo() { diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java index 165ef46a610..69153f5037c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MapTest.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -104,7 +102,6 @@ public class MapTest { * @return mapMapOfString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map> getMapMapOfString() { @@ -113,7 +110,7 @@ public class MapTest { @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapOfString(Map> mapMapOfString) { + public void setMapMapOfString(Map> mapMapOfString) { this.mapMapOfString = mapMapOfString; } @@ -135,7 +132,6 @@ public class MapTest { * @return mapOfEnumString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMapOfEnumString() { @@ -144,7 +140,7 @@ public class MapTest { @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapOfEnumString(Map mapOfEnumString) { + public void setMapOfEnumString(Map mapOfEnumString) { this.mapOfEnumString = mapOfEnumString; } @@ -166,7 +162,6 @@ public class MapTest { * @return directMap **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getDirectMap() { @@ -175,7 +170,7 @@ public class MapTest { @JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirectMap(Map directMap) { + public void setDirectMap(Map directMap) { this.directMap = directMap; } @@ -197,7 +192,6 @@ public class MapTest { * @return indirectMap **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getIndirectMap() { @@ -206,7 +200,7 @@ public class MapTest { @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndirectMap(Map indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index c9efb8f9968..484e81ca39f 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import java.util.HashMap; import java.util.List; @@ -62,7 +60,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return uuid **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public UUID getUuid() { @@ -71,7 +68,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_UUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { + public void setUuid(UUID uuid) { this.uuid = uuid; } @@ -85,7 +82,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return dateTime **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") @@ -96,7 +92,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setDateTime(OffsetDateTime dateTime) { + public void setDateTime(OffsetDateTime dateTime) { this.dateTime = dateTime; } @@ -118,7 +114,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass { * @return map **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Map getMap() { @@ -127,7 +122,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { @JsonProperty(JSON_PROPERTY_MAP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMap(Map map) { + public void setMap(Map map) { this.map = map; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java index 10479693fab..f5b12136a71 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Model200Response.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -27,7 +25,6 @@ import javax.annotation.Generated; /** * Model for testing model name starting with number */ -@ApiModel(description = "Model for testing model name starting with number") @JsonPropertyOrder({ Model200Response.JSON_PROPERTY_NAME, Model200Response.JSON_PROPERTY_PROPERTY_CLASS @@ -54,7 +51,6 @@ public class Model200Response { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getName() { @@ -63,7 +59,7 @@ public class Model200Response { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(Integer name) { + public void setName(Integer name) { this.name = name; } @@ -77,7 +73,6 @@ public class Model200Response { * @return propertyClass **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPropertyClass() { @@ -86,7 +81,7 @@ public class Model200Response { @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { + public void setPropertyClass(String propertyClass) { this.propertyClass = propertyClass; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java index 444553c17b7..8ad4e9443d0 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -57,7 +55,6 @@ public class ModelApiResponse { * @return code **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getCode() { @@ -66,7 +63,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCode(Integer code) { + public void setCode(Integer code) { this.code = code; } @@ -80,7 +77,6 @@ public class ModelApiResponse { * @return type **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getType() { @@ -89,7 +85,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(String type) { this.type = type; } @@ -103,7 +99,6 @@ public class ModelApiResponse { * @return message **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getMessage() { @@ -112,7 +107,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(String message) { this.message = message; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java index a7f5095bbd0..79590740b8b 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelClient.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +47,6 @@ public class ModelClient { * @return _client **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CLIENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getClient() { @@ -58,7 +55,7 @@ public class ModelClient { @JsonProperty(JSON_PROPERTY_CLIENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClient(String _client) { + public void setClient(String _client) { this._client = _client; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java index fe9ce28539d..8e0a521983c 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelFile.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -27,7 +25,6 @@ import javax.annotation.Generated; /** * Must be named `File` for test. */ -@ApiModel(description = "Must be named `File` for test.") @JsonPropertyOrder({ ModelFile.JSON_PROPERTY_SOURCE_U_R_I }) @@ -50,7 +47,6 @@ public class ModelFile { * @return sourceURI **/ @Nullable - @ApiModelProperty(value = "Test capitalization") @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getSourceURI() { @@ -59,7 +55,7 @@ public class ModelFile { @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceURI(String sourceURI) { + public void setSourceURI(String sourceURI) { this.sourceURI = sourceURI; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java index 0c032a0d6ca..e35a6b61545 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelList.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +47,6 @@ public class ModelList { * @return _123list **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String get123list() { @@ -58,7 +55,7 @@ public class ModelList { @JsonProperty(JSON_PROPERTY_123LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set123list(String _123list) { + public void set123list(String _123list) { this._123list = _123list; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java index 507388f348b..648b21603cf 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ModelReturn.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -27,7 +25,6 @@ import javax.annotation.Generated; /** * Model for testing reserved words */ -@ApiModel(description = "Model for testing reserved words") @JsonPropertyOrder({ ModelReturn.JSON_PROPERTY_RETURN }) @@ -50,7 +47,6 @@ public class ModelReturn { * @return _return **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_RETURN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getReturn() { @@ -59,7 +55,7 @@ public class ModelReturn { @JsonProperty(JSON_PROPERTY_RETURN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReturn(Integer _return) { + public void setReturn(Integer _return) { this._return = _return; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java index 96a94825b5a..51914b985b7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Name.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -26,7 +24,6 @@ import javax.annotation.Generated; /** * Model for testing model name same as property name */ -@ApiModel(description = "Model for testing model name same as property name") @JsonPropertyOrder({ Name.JSON_PROPERTY_NAME, Name.JSON_PROPERTY_SNAKE_CASE, @@ -61,7 +58,6 @@ public class Name { * @return name **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Integer getName() { @@ -70,7 +66,7 @@ public class Name { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(Integer name) { + public void setName(Integer name) { this.name = name; } @@ -79,7 +75,6 @@ public class Name { * @return snakeCase **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SNAKE_CASE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getSnakeCase() { @@ -96,7 +91,6 @@ public class Name { * @return property **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getProperty() { @@ -105,7 +99,7 @@ public class Name { @JsonProperty(JSON_PROPERTY_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProperty(String property) { + public void setProperty(String property) { this.property = property; } @@ -114,7 +108,6 @@ public class Name { * @return _123number **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_123NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer get123number() { diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java index 77ee9e857c1..abd009b546d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/NumberOnly.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.*; @@ -49,7 +47,6 @@ public class NumberOnly { * @return justNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_JUST_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getJustNumber() { @@ -58,7 +55,7 @@ public class NumberOnly { @JsonProperty(JSON_PROPERTY_JUST_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustNumber(BigDecimal justNumber) { + public void setJustNumber(BigDecimal justNumber) { this.justNumber = justNumber; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java index 470b588c724..82be9f4c1e2 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Order.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.*; @@ -103,7 +101,6 @@ public class Order { * @return id **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -112,7 +109,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -126,7 +123,6 @@ public class Order { * @return petId **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getPetId() { @@ -135,7 +131,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetId(Long petId) { + public void setPetId(Long petId) { this.petId = petId; } @@ -149,7 +145,6 @@ public class Order { * @return quantity **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getQuantity() { @@ -158,7 +153,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(Integer quantity) { + public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -172,7 +167,6 @@ public class Order { * @return shipDate **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") @@ -183,7 +177,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setShipDate(OffsetDateTime shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -197,7 +191,6 @@ public class Order { * @return status **/ @Nullable - @ApiModelProperty(value = "Order Status") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -206,7 +199,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { + public void setStatus(StatusEnum status) { this.status = status; } @@ -220,7 +213,6 @@ public class Order { * @return complete **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getComplete() { @@ -229,7 +221,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setComplete(Boolean complete) { + public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java index 93431dd14e9..5b390f83312 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/OuterComposite.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.*; @@ -57,7 +55,6 @@ public class OuterComposite { * @return myNumber **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getMyNumber() { @@ -66,7 +63,7 @@ public class OuterComposite { @JsonProperty(JSON_PROPERTY_MY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyNumber(BigDecimal myNumber) { + public void setMyNumber(BigDecimal myNumber) { this.myNumber = myNumber; } @@ -80,7 +77,6 @@ public class OuterComposite { * @return myString **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getMyString() { @@ -89,7 +85,7 @@ public class OuterComposite { @JsonProperty(JSON_PROPERTY_MY_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyString(String myString) { + public void setMyString(String myString) { this.myString = myString; } @@ -103,7 +99,6 @@ public class OuterComposite { * @return myBoolean **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getMyBoolean() { @@ -112,7 +107,7 @@ public class OuterComposite { @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyBoolean(Boolean myBoolean) { + public void setMyBoolean(Boolean myBoolean) { this.myBoolean = myBoolean; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java index 4a103cf9696..56e43b48d0d 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Pet.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; @@ -109,7 +107,6 @@ public class Pet { * @return id **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -118,7 +115,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -133,7 +130,6 @@ public class Pet { **/ @Valid @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Category getCategory() { @@ -142,7 +138,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCategory(Category category) { + public void setCategory(Category category) { this.category = category; } @@ -156,7 +152,6 @@ public class Pet { * @return name **/ @NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { @@ -165,7 +160,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(String name) { this.name = name; } @@ -184,7 +179,6 @@ public class Pet { * @return photoUrls **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Set getPhotoUrls() { @@ -194,7 +188,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonDeserialize(as = LinkedHashSet.class) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } @@ -216,7 +210,6 @@ public class Pet { * @return tags **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getTags() { @@ -225,7 +218,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List tags) { this.tags = tags; } @@ -239,7 +232,6 @@ public class Pet { * @return status **/ @Nullable - @ApiModelProperty(value = "pet status in the store") @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -248,7 +240,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { + public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java index 72e8a80aa13..c1ec89b33b2 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/ReadOnlyFirst.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -47,7 +45,6 @@ public class ReadOnlyFirst { * @return bar **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getBar() { @@ -64,7 +61,6 @@ public class ReadOnlyFirst { * @return baz **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_BAZ) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getBaz() { @@ -73,7 +69,7 @@ public class ReadOnlyFirst { @JsonProperty(JSON_PROPERTY_BAZ) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBaz(String baz) { + public void setBaz(String baz) { this.baz = baz; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java index d8c9996b043..e4bc0ecf874 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/SpecialModelName.java @@ -15,8 +15,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -49,7 +47,6 @@ public class SpecialModelName { * @return $specialPropertyName **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long get$SpecialPropertyName() { @@ -58,7 +55,7 @@ public class SpecialModelName { @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set$SpecialPropertyName(Long $specialPropertyName) { + public void set$SpecialPropertyName(Long $specialPropertyName) { this.$specialPropertyName = $specialPropertyName; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java index 8bdd9c78015..91bf95a9362 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/Tag.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -52,7 +50,6 @@ public class Tag { * @return id **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -61,7 +58,7 @@ public class Tag { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -75,7 +72,6 @@ public class Tag { * @return name **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -84,7 +80,7 @@ public class Tag { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java index aa9443cc906..37daa7895c8 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderDefault.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -67,7 +65,6 @@ public class TypeHolderDefault { * @return stringItem **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getStringItem() { @@ -76,7 +73,7 @@ public class TypeHolderDefault { @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { + public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -90,7 +87,6 @@ public class TypeHolderDefault { * @return numberItem **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public BigDecimal getNumberItem() { @@ -99,7 +95,7 @@ public class TypeHolderDefault { @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { + public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -113,7 +109,6 @@ public class TypeHolderDefault { * @return integerItem **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Integer getIntegerItem() { @@ -122,7 +117,7 @@ public class TypeHolderDefault { @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { + public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -136,7 +131,6 @@ public class TypeHolderDefault { * @return boolItem **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getBoolItem() { @@ -145,7 +139,7 @@ public class TypeHolderDefault { @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { + public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -164,7 +158,6 @@ public class TypeHolderDefault { * @return arrayItem **/ @NotNull - @ApiModelProperty(required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getArrayItem() { @@ -173,7 +166,7 @@ public class TypeHolderDefault { @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { + public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java index fb781a3808e..1756fe9a085 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/TypeHolderExample.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -71,7 +69,6 @@ public class TypeHolderExample { * @return stringItem **/ @NotNull - @ApiModelProperty(example = "what", required = true, value = "") @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getStringItem() { @@ -80,7 +77,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_STRING_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStringItem(String stringItem) { + public void setStringItem(String stringItem) { this.stringItem = stringItem; } @@ -94,7 +91,6 @@ public class TypeHolderExample { * @return numberItem **/ @NotNull - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public BigDecimal getNumberItem() { @@ -103,7 +99,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_NUMBER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumberItem(BigDecimal numberItem) { + public void setNumberItem(BigDecimal numberItem) { this.numberItem = numberItem; } @@ -117,7 +113,6 @@ public class TypeHolderExample { * @return floatItem **/ @NotNull - @ApiModelProperty(example = "1.234", required = true, value = "") @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Float getFloatItem() { @@ -126,7 +121,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_FLOAT_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFloatItem(Float floatItem) { + public void setFloatItem(Float floatItem) { this.floatItem = floatItem; } @@ -140,7 +135,6 @@ public class TypeHolderExample { * @return integerItem **/ @NotNull - @ApiModelProperty(example = "-2", required = true, value = "") @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Integer getIntegerItem() { @@ -149,7 +143,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_INTEGER_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIntegerItem(Integer integerItem) { + public void setIntegerItem(Integer integerItem) { this.integerItem = integerItem; } @@ -163,7 +157,6 @@ public class TypeHolderExample { * @return boolItem **/ @NotNull - @ApiModelProperty(example = "true", required = true, value = "") @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Boolean getBoolItem() { @@ -172,7 +165,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_BOOL_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBoolItem(Boolean boolItem) { + public void setBoolItem(Boolean boolItem) { this.boolItem = boolItem; } @@ -191,7 +184,6 @@ public class TypeHolderExample { * @return arrayItem **/ @NotNull - @ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "") @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getArrayItem() { @@ -200,7 +192,7 @@ public class TypeHolderExample { @JsonProperty(JSON_PROPERTY_ARRAY_ITEM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setArrayItem(List arrayItem) { + public void setArrayItem(List arrayItem) { this.arrayItem = arrayItem; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java index 71b20750b61..42bd0258eef 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/User.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; @@ -76,7 +74,6 @@ public class User { * @return id **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -85,7 +82,7 @@ public class User { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -99,7 +96,6 @@ public class User { * @return username **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getUsername() { @@ -108,7 +104,7 @@ public class User { @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsername(String username) { + public void setUsername(String username) { this.username = username; } @@ -122,7 +118,6 @@ public class User { * @return firstName **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getFirstName() { @@ -131,7 +126,7 @@ public class User { @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstName(String firstName) { + public void setFirstName(String firstName) { this.firstName = firstName; } @@ -145,7 +140,6 @@ public class User { * @return lastName **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getLastName() { @@ -154,7 +148,7 @@ public class User { @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastName(String lastName) { + public void setLastName(String lastName) { this.lastName = lastName; } @@ -168,7 +162,6 @@ public class User { * @return email **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getEmail() { @@ -177,7 +170,7 @@ public class User { @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmail(String email) { + public void setEmail(String email) { this.email = email; } @@ -191,7 +184,6 @@ public class User { * @return password **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPassword() { @@ -200,7 +192,7 @@ public class User { @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPassword(String password) { + public void setPassword(String password) { this.password = password; } @@ -214,7 +206,6 @@ public class User { * @return phone **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPhone() { @@ -223,7 +214,7 @@ public class User { @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(String phone) { + public void setPhone(String phone) { this.phone = phone; } @@ -237,7 +228,6 @@ public class User { * @return userStatus **/ @Nullable - @ApiModelProperty(value = "User Status") @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getUserStatus() { @@ -246,7 +236,7 @@ public class User { @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserStatus(Integer userStatus) { + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java index 5249887774b..c241ee3adf7 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/model/XmlItem.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -163,7 +161,6 @@ public class XmlItem { * @return attributeString **/ @Nullable - @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getAttributeString() { @@ -172,7 +169,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_ATTRIBUTE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeString(String attributeString) { + public void setAttributeString(String attributeString) { this.attributeString = attributeString; } @@ -186,7 +183,6 @@ public class XmlItem { * @return attributeNumber **/ @Nullable - @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getAttributeNumber() { @@ -195,7 +191,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_ATTRIBUTE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeNumber(BigDecimal attributeNumber) { + public void setAttributeNumber(BigDecimal attributeNumber) { this.attributeNumber = attributeNumber; } @@ -209,7 +205,6 @@ public class XmlItem { * @return attributeInteger **/ @Nullable - @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getAttributeInteger() { @@ -218,7 +213,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_ATTRIBUTE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeInteger(Integer attributeInteger) { + public void setAttributeInteger(Integer attributeInteger) { this.attributeInteger = attributeInteger; } @@ -232,7 +227,6 @@ public class XmlItem { * @return attributeBoolean **/ @Nullable - @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getAttributeBoolean() { @@ -241,7 +235,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_ATTRIBUTE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttributeBoolean(Boolean attributeBoolean) { + public void setAttributeBoolean(Boolean attributeBoolean) { this.attributeBoolean = attributeBoolean; } @@ -263,7 +257,6 @@ public class XmlItem { * @return wrappedArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getWrappedArray() { @@ -272,7 +265,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWrappedArray(List wrappedArray) { + public void setWrappedArray(List wrappedArray) { this.wrappedArray = wrappedArray; } @@ -286,7 +279,6 @@ public class XmlItem { * @return nameString **/ @Nullable - @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAME_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getNameString() { @@ -295,7 +287,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameString(String nameString) { + public void setNameString(String nameString) { this.nameString = nameString; } @@ -309,7 +301,6 @@ public class XmlItem { * @return nameNumber **/ @Nullable - @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAME_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getNameNumber() { @@ -318,7 +309,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameNumber(BigDecimal nameNumber) { + public void setNameNumber(BigDecimal nameNumber) { this.nameNumber = nameNumber; } @@ -332,7 +323,6 @@ public class XmlItem { * @return nameInteger **/ @Nullable - @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAME_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getNameInteger() { @@ -341,7 +331,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameInteger(Integer nameInteger) { + public void setNameInteger(Integer nameInteger) { this.nameInteger = nameInteger; } @@ -355,7 +345,6 @@ public class XmlItem { * @return nameBoolean **/ @Nullable - @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getNameBoolean() { @@ -364,7 +353,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameBoolean(Boolean nameBoolean) { + public void setNameBoolean(Boolean nameBoolean) { this.nameBoolean = nameBoolean; } @@ -386,7 +375,6 @@ public class XmlItem { * @return nameArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getNameArray() { @@ -395,7 +383,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameArray(List nameArray) { + public void setNameArray(List nameArray) { this.nameArray = nameArray; } @@ -417,7 +405,6 @@ public class XmlItem { * @return nameWrappedArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getNameWrappedArray() { @@ -426,7 +413,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAME_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNameWrappedArray(List nameWrappedArray) { + public void setNameWrappedArray(List nameWrappedArray) { this.nameWrappedArray = nameWrappedArray; } @@ -440,7 +427,6 @@ public class XmlItem { * @return prefixString **/ @Nullable - @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPrefixString() { @@ -449,7 +435,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixString(String prefixString) { + public void setPrefixString(String prefixString) { this.prefixString = prefixString; } @@ -463,7 +449,6 @@ public class XmlItem { * @return prefixNumber **/ @Nullable - @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getPrefixNumber() { @@ -472,7 +457,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNumber(BigDecimal prefixNumber) { + public void setPrefixNumber(BigDecimal prefixNumber) { this.prefixNumber = prefixNumber; } @@ -486,7 +471,6 @@ public class XmlItem { * @return prefixInteger **/ @Nullable - @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getPrefixInteger() { @@ -495,7 +479,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixInteger(Integer prefixInteger) { + public void setPrefixInteger(Integer prefixInteger) { this.prefixInteger = prefixInteger; } @@ -509,7 +493,6 @@ public class XmlItem { * @return prefixBoolean **/ @Nullable - @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getPrefixBoolean() { @@ -518,7 +501,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixBoolean(Boolean prefixBoolean) { + public void setPrefixBoolean(Boolean prefixBoolean) { this.prefixBoolean = prefixBoolean; } @@ -540,7 +523,6 @@ public class XmlItem { * @return prefixArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getPrefixArray() { @@ -549,7 +531,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixArray(List prefixArray) { + public void setPrefixArray(List prefixArray) { this.prefixArray = prefixArray; } @@ -571,7 +553,6 @@ public class XmlItem { * @return prefixWrappedArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getPrefixWrappedArray() { @@ -580,7 +561,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixWrappedArray(List prefixWrappedArray) { + public void setPrefixWrappedArray(List prefixWrappedArray) { this.prefixWrappedArray = prefixWrappedArray; } @@ -594,7 +575,6 @@ public class XmlItem { * @return namespaceString **/ @Nullable - @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getNamespaceString() { @@ -603,7 +583,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceString(String namespaceString) { + public void setNamespaceString(String namespaceString) { this.namespaceString = namespaceString; } @@ -617,7 +597,6 @@ public class XmlItem { * @return namespaceNumber **/ @Nullable - @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getNamespaceNumber() { @@ -626,7 +605,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceNumber(BigDecimal namespaceNumber) { + public void setNamespaceNumber(BigDecimal namespaceNumber) { this.namespaceNumber = namespaceNumber; } @@ -640,7 +619,6 @@ public class XmlItem { * @return namespaceInteger **/ @Nullable - @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getNamespaceInteger() { @@ -649,7 +627,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceInteger(Integer namespaceInteger) { + public void setNamespaceInteger(Integer namespaceInteger) { this.namespaceInteger = namespaceInteger; } @@ -663,7 +641,6 @@ public class XmlItem { * @return namespaceBoolean **/ @Nullable - @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getNamespaceBoolean() { @@ -672,7 +649,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceBoolean(Boolean namespaceBoolean) { + public void setNamespaceBoolean(Boolean namespaceBoolean) { this.namespaceBoolean = namespaceBoolean; } @@ -694,7 +671,6 @@ public class XmlItem { * @return namespaceArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getNamespaceArray() { @@ -703,7 +679,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceArray(List namespaceArray) { + public void setNamespaceArray(List namespaceArray) { this.namespaceArray = namespaceArray; } @@ -725,7 +701,6 @@ public class XmlItem { * @return namespaceWrappedArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getNamespaceWrappedArray() { @@ -734,7 +709,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_NAMESPACE_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamespaceWrappedArray(List namespaceWrappedArray) { + public void setNamespaceWrappedArray(List namespaceWrappedArray) { this.namespaceWrappedArray = namespaceWrappedArray; } @@ -748,7 +723,6 @@ public class XmlItem { * @return prefixNsString **/ @Nullable - @ApiModelProperty(example = "string", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPrefixNsString() { @@ -757,7 +731,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_STRING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsString(String prefixNsString) { + public void setPrefixNsString(String prefixNsString) { this.prefixNsString = prefixNsString; } @@ -771,7 +745,6 @@ public class XmlItem { * @return prefixNsNumber **/ @Nullable - @ApiModelProperty(example = "1.234", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public BigDecimal getPrefixNsNumber() { @@ -780,7 +753,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsNumber(BigDecimal prefixNsNumber) { + public void setPrefixNsNumber(BigDecimal prefixNsNumber) { this.prefixNsNumber = prefixNsNumber; } @@ -794,7 +767,6 @@ public class XmlItem { * @return prefixNsInteger **/ @Nullable - @ApiModelProperty(example = "-2", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getPrefixNsInteger() { @@ -803,7 +775,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsInteger(Integer prefixNsInteger) { + public void setPrefixNsInteger(Integer prefixNsInteger) { this.prefixNsInteger = prefixNsInteger; } @@ -817,7 +789,6 @@ public class XmlItem { * @return prefixNsBoolean **/ @Nullable - @ApiModelProperty(example = "true", value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getPrefixNsBoolean() { @@ -826,7 +797,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_BOOLEAN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsBoolean(Boolean prefixNsBoolean) { + public void setPrefixNsBoolean(Boolean prefixNsBoolean) { this.prefixNsBoolean = prefixNsBoolean; } @@ -848,7 +819,6 @@ public class XmlItem { * @return prefixNsArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getPrefixNsArray() { @@ -857,7 +827,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsArray(List prefixNsArray) { + public void setPrefixNsArray(List prefixNsArray) { this.prefixNsArray = prefixNsArray; } @@ -879,7 +849,6 @@ public class XmlItem { * @return prefixNsWrappedArray **/ @Nullable - @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getPrefixNsWrappedArray() { @@ -888,7 +857,7 @@ public class XmlItem { @JsonProperty(JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { + public void setPrefixNsWrappedArray(List prefixNsWrappedArray) { this.prefixNsWrappedArray = prefixNsWrappedArray; } diff --git a/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml b/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml index 8a26449b1a7..f71623ea283 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml +++ b/samples/client/petstore/java-micronaut-client/src/main/resources/application.yml @@ -1,31 +1,31 @@ -base-path: "http://petstore.swagger.io:80/v2/" +petstore-micronaut-base-path: "http://petstore.swagger.io:80/v2" micronaut: - application: - name: petstore-micronaut - # TODO configure security features - security: - oauth2: - clients: - # An example of how oauth client is filled - # name: - # grant-type: authorization_code | client_credentials - # scopes: [] - # token: - # auth-method: client_secret_basic - # url: "https://" - # client-id: - # client-secret - # An example of how to apply other authorization methods - # authentication: bearer | cookie | session + application: + name: petstore-micronaut + # TODO configure security features + security: + oauth2: + clients: + # An example of how oauth client is filled + # name: + # grant-type: authorization_code | client_credentials + # scopes: [] + # token: + # auth-method: client_secret_basic + # url: "https://" + # client-id: + # client-secret: + # An example of how to apply other authorization methods + # authentication: bearer | cookie | session jackson: - serialization: - writeEnumsUsingToString: true - writeDatesAsTimestamps: false - deserialization: - readEnumsUsingToString: true - failOnUnknownProperties: false - failOnInvalidSubtype: false + serialization: + writeEnumsUsingToString: true + writeDatesAsTimestamps: false + deserialization: + readEnumsUsingToString: true + failOnUnknownProperties: false + failOnInvalidSubtype: false diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesAnyTypeSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesAnyTypeSpec.groovy index cf38af5eb11..d4d194054a2 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesAnyTypeSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesAnyTypeSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.Map import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,20 +11,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesAnyTypeSpec extends Specification { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType() + private final AdditionalPropertiesAnyType model = null /** * Model tests for AdditionalPropertiesAnyType */ - void "AdditionalPropertiesAnyType test"() { + void 'AdditionalPropertiesAnyType test'() { // TODO: test AdditionalPropertiesAnyType } /** * Test the property 'name' */ - void "AdditionalPropertiesAnyType property name test"() { - // TODO: test name + void 'AdditionalPropertiesAnyType property name test'() { + // TODO: test name property of AdditionalPropertiesAnyType } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesArraySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesArraySpec.groovy index 7724dbd9d71..319d2b1fe87 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesArraySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesArraySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.List import java.util.Map @@ -14,20 +12,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesArraySpec extends Specification { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray() + private final AdditionalPropertiesArray model = null /** * Model tests for AdditionalPropertiesArray */ - void "AdditionalPropertiesArray test"() { + void 'AdditionalPropertiesArray test'() { // TODO: test AdditionalPropertiesArray } /** * Test the property 'name' */ - void "AdditionalPropertiesArray property name test"() { - // TODO: test name + void 'AdditionalPropertiesArray property name test'() { + // TODO: test name property of AdditionalPropertiesArray } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesBooleanSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesBooleanSpec.groovy index a0a8981087d..f36e697f5da 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesBooleanSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesBooleanSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.Map import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,20 +11,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesBooleanSpec extends Specification { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean() + private final AdditionalPropertiesBoolean model = null /** * Model tests for AdditionalPropertiesBoolean */ - void "AdditionalPropertiesBoolean test"() { + void 'AdditionalPropertiesBoolean test'() { // TODO: test AdditionalPropertiesBoolean } /** * Test the property 'name' */ - void "AdditionalPropertiesBoolean property name test"() { - // TODO: test name + void 'AdditionalPropertiesBoolean property name test'() { + // TODO: test name property of AdditionalPropertiesBoolean } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesClassSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesClassSpec.groovy index f11a43776d4..7a646fc6c1e 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesClassSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesClassSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.HashMap import java.util.List @@ -15,90 +13,90 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesClassSpec extends Specification { - private final AdditionalPropertiesClass model = new AdditionalPropertiesClass() + private final AdditionalPropertiesClass model = null /** * Model tests for AdditionalPropertiesClass */ - void "AdditionalPropertiesClass test"() { + void 'AdditionalPropertiesClass test'() { // TODO: test AdditionalPropertiesClass } /** * Test the property 'mapString' */ - void "AdditionalPropertiesClass property mapString test"() { - // TODO: test mapString + void 'AdditionalPropertiesClass property mapString test'() { + // TODO: test mapString property of AdditionalPropertiesClass } /** * Test the property 'mapNumber' */ - void "AdditionalPropertiesClass property mapNumber test"() { - // TODO: test mapNumber + void 'AdditionalPropertiesClass property mapNumber test'() { + // TODO: test mapNumber property of AdditionalPropertiesClass } /** * Test the property 'mapInteger' */ - void "AdditionalPropertiesClass property mapInteger test"() { - // TODO: test mapInteger + void 'AdditionalPropertiesClass property mapInteger test'() { + // TODO: test mapInteger property of AdditionalPropertiesClass } /** * Test the property 'mapBoolean' */ - void "AdditionalPropertiesClass property mapBoolean test"() { - // TODO: test mapBoolean + void 'AdditionalPropertiesClass property mapBoolean test'() { + // TODO: test mapBoolean property of AdditionalPropertiesClass } /** * Test the property 'mapArrayInteger' */ - void "AdditionalPropertiesClass property mapArrayInteger test"() { - // TODO: test mapArrayInteger + void 'AdditionalPropertiesClass property mapArrayInteger test'() { + // TODO: test mapArrayInteger property of AdditionalPropertiesClass } /** * Test the property 'mapArrayAnytype' */ - void "AdditionalPropertiesClass property mapArrayAnytype test"() { - // TODO: test mapArrayAnytype + void 'AdditionalPropertiesClass property mapArrayAnytype test'() { + // TODO: test mapArrayAnytype property of AdditionalPropertiesClass } /** * Test the property 'mapMapString' */ - void "AdditionalPropertiesClass property mapMapString test"() { - // TODO: test mapMapString + void 'AdditionalPropertiesClass property mapMapString test'() { + // TODO: test mapMapString property of AdditionalPropertiesClass } /** * Test the property 'mapMapAnytype' */ - void "AdditionalPropertiesClass property mapMapAnytype test"() { - // TODO: test mapMapAnytype + void 'AdditionalPropertiesClass property mapMapAnytype test'() { + // TODO: test mapMapAnytype property of AdditionalPropertiesClass } /** * Test the property 'anytype1' */ - void "AdditionalPropertiesClass property anytype1 test"() { - // TODO: test anytype1 + void 'AdditionalPropertiesClass property anytype1 test'() { + // TODO: test anytype1 property of AdditionalPropertiesClass } /** * Test the property 'anytype2' */ - void "AdditionalPropertiesClass property anytype2 test"() { - // TODO: test anytype2 + void 'AdditionalPropertiesClass property anytype2 test'() { + // TODO: test anytype2 property of AdditionalPropertiesClass } /** * Test the property 'anytype3' */ - void "AdditionalPropertiesClass property anytype3 test"() { - // TODO: test anytype3 + void 'AdditionalPropertiesClass property anytype3 test'() { + // TODO: test anytype3 property of AdditionalPropertiesClass } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesIntegerSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesIntegerSpec.groovy index 160361ef1ec..8dee20737e9 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesIntegerSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesIntegerSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.Map import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,20 +11,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesIntegerSpec extends Specification { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger() + private final AdditionalPropertiesInteger model = null /** * Model tests for AdditionalPropertiesInteger */ - void "AdditionalPropertiesInteger test"() { + void 'AdditionalPropertiesInteger test'() { // TODO: test AdditionalPropertiesInteger } /** * Test the property 'name' */ - void "AdditionalPropertiesInteger property name test"() { - // TODO: test name + void 'AdditionalPropertiesInteger property name test'() { + // TODO: test name property of AdditionalPropertiesInteger } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesNumberSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesNumberSpec.groovy index ec09dae257c..26792b36bff 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesNumberSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesNumberSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.HashMap import java.util.Map @@ -14,20 +12,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesNumberSpec extends Specification { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber() + private final AdditionalPropertiesNumber model = null /** * Model tests for AdditionalPropertiesNumber */ - void "AdditionalPropertiesNumber test"() { + void 'AdditionalPropertiesNumber test'() { // TODO: test AdditionalPropertiesNumber } /** * Test the property 'name' */ - void "AdditionalPropertiesNumber property name test"() { - // TODO: test name + void 'AdditionalPropertiesNumber property name test'() { + // TODO: test name property of AdditionalPropertiesNumber } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesObjectSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesObjectSpec.groovy index 013a6271f48..15116f4f57e 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesObjectSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesObjectSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.Map import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,20 +11,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesObjectSpec extends Specification { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject() + private final AdditionalPropertiesObject model = null /** * Model tests for AdditionalPropertiesObject */ - void "AdditionalPropertiesObject test"() { + void 'AdditionalPropertiesObject test'() { // TODO: test AdditionalPropertiesObject } /** * Test the property 'name' */ - void "AdditionalPropertiesObject property name test"() { - // TODO: test name + void 'AdditionalPropertiesObject property name test'() { + // TODO: test name property of AdditionalPropertiesObject } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesStringSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesStringSpec.groovy index c7eb9462b92..3f93f65ab21 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesStringSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AdditionalPropertiesStringSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.Map import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,20 +11,20 @@ import jakarta.inject.Inject */ @MicronautTest public class AdditionalPropertiesStringSpec extends Specification { - private final AdditionalPropertiesString model = new AdditionalPropertiesString() + private final AdditionalPropertiesString model = null /** * Model tests for AdditionalPropertiesString */ - void "AdditionalPropertiesString test"() { + void 'AdditionalPropertiesString test'() { // TODO: test AdditionalPropertiesString } /** * Test the property 'name' */ - void "AdditionalPropertiesString property name test"() { - // TODO: test name + void 'AdditionalPropertiesString property name test'() { + // TODO: test name property of AdditionalPropertiesString } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AnimalSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AnimalSpec.groovy index 11fcb24d201..7ebe453172d 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AnimalSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/AnimalSpec.groovy @@ -1,9 +1,8 @@ package org.openapitools.model +import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -13,27 +12,27 @@ import jakarta.inject.Inject */ @MicronautTest public class AnimalSpec extends Specification { - private final Animal model = new Animal() + private final Animal model = null /** * Model tests for Animal */ - void "Animal test"() { + void 'Animal test'() { // TODO: test Animal } /** * Test the property 'className' */ - void "Animal property className test"() { - // TODO: test className + void 'Animal property className test'() { + // TODO: test className property of Animal } /** * Test the property 'color' */ - void "Animal property color test"() { - // TODO: test color + void 'Animal property color test'() { + // TODO: test color property of Animal } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfArrayOfNumberOnlySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfArrayOfNumberOnlySpec.groovy index d364a888027..e8bddaf16f1 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfArrayOfNumberOnlySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfArrayOfNumberOnlySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.ArrayList import java.util.List @@ -14,20 +12,20 @@ import jakarta.inject.Inject */ @MicronautTest public class ArrayOfArrayOfNumberOnlySpec extends Specification { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly() + private final ArrayOfArrayOfNumberOnly model = null /** * Model tests for ArrayOfArrayOfNumberOnly */ - void "ArrayOfArrayOfNumberOnly test"() { + void 'ArrayOfArrayOfNumberOnly test'() { // TODO: test ArrayOfArrayOfNumberOnly } /** * Test the property 'arrayArrayNumber' */ - void "ArrayOfArrayOfNumberOnly property arrayArrayNumber test"() { - // TODO: test arrayArrayNumber + void 'ArrayOfArrayOfNumberOnly property arrayArrayNumber test'() { + // TODO: test arrayArrayNumber property of ArrayOfArrayOfNumberOnly } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfNumberOnlySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfNumberOnlySpec.groovy index 750d991c189..eedf098a693 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfNumberOnlySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayOfNumberOnlySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.ArrayList import java.util.List @@ -14,20 +12,20 @@ import jakarta.inject.Inject */ @MicronautTest public class ArrayOfNumberOnlySpec extends Specification { - private final ArrayOfNumberOnly model = new ArrayOfNumberOnly() + private final ArrayOfNumberOnly model = null /** * Model tests for ArrayOfNumberOnly */ - void "ArrayOfNumberOnly test"() { + void 'ArrayOfNumberOnly test'() { // TODO: test ArrayOfNumberOnly } /** * Test the property 'arrayNumber' */ - void "ArrayOfNumberOnly property arrayNumber test"() { - // TODO: test arrayNumber + void 'ArrayOfNumberOnly property arrayNumber test'() { + // TODO: test arrayNumber property of ArrayOfNumberOnly } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayTestSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayTestSpec.groovy index 14067f25c49..0ef861b8048 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayTestSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ArrayTestSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.ArrayList import java.util.List import org.openapitools.model.ReadOnlyFirst @@ -14,34 +12,34 @@ import jakarta.inject.Inject */ @MicronautTest public class ArrayTestSpec extends Specification { - private final ArrayTest model = new ArrayTest() + private final ArrayTest model = null /** * Model tests for ArrayTest */ - void "ArrayTest test"() { + void 'ArrayTest test'() { // TODO: test ArrayTest } /** * Test the property 'arrayOfString' */ - void "ArrayTest property arrayOfString test"() { - // TODO: test arrayOfString + void 'ArrayTest property arrayOfString test'() { + // TODO: test arrayOfString property of ArrayTest } /** * Test the property 'arrayArrayOfInteger' */ - void "ArrayTest property arrayArrayOfInteger test"() { - // TODO: test arrayArrayOfInteger + void 'ArrayTest property arrayArrayOfInteger test'() { + // TODO: test arrayArrayOfInteger property of ArrayTest } /** * Test the property 'arrayArrayOfModel' */ - void "ArrayTest property arrayArrayOfModel test"() { - // TODO: test arrayArrayOfModel + void 'ArrayTest property arrayArrayOfModel test'() { + // TODO: test arrayArrayOfModel property of ArrayTest } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy index 9e56d921ef1..4885fd0eed9 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatAllOfSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class BigCatAllOfSpec extends Specification { - private final BigCatAllOf model = new BigCatAllOf() + private final BigCatAllOf model = null /** * Model tests for BigCatAllOf */ - void "BigCatAllOf test"() { + void 'BigCatAllOf test'() { // TODO: test BigCatAllOf } /** * Test the property 'kind' */ - void "BigCatAllOf property kind test"() { - // TODO: test kind + void 'BigCatAllOf property kind test'() { + // TODO: test kind property of BigCatAllOf } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy index 3edb46ca10e..9460011c0cd 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/BigCatSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import org.openapitools.model.BigCatAllOf import org.openapitools.model.Cat import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,41 +11,41 @@ import jakarta.inject.Inject */ @MicronautTest public class BigCatSpec extends Specification { - private final BigCat model = new BigCat() + private final BigCat model = null /** * Model tests for BigCat */ - void "BigCat test"() { + void 'BigCat test'() { // TODO: test BigCat } /** * Test the property 'className' */ - void "BigCat property className test"() { - // TODO: test className + void 'BigCat property className test'() { + // TODO: test className property of BigCat } /** * Test the property 'color' */ - void "BigCat property color test"() { - // TODO: test color + void 'BigCat property color test'() { + // TODO: test color property of BigCat } /** * Test the property 'declawed' */ - void "BigCat property declawed test"() { - // TODO: test declawed + void 'BigCat property declawed test'() { + // TODO: test declawed property of BigCat } /** * Test the property 'kind' */ - void "BigCat property kind test"() { - // TODO: test kind + void 'BigCat property kind test'() { + // TODO: test kind property of BigCat } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CapitalizationSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CapitalizationSpec.groovy index 5ffc7f1d8bf..df7833dab0a 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CapitalizationSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CapitalizationSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,55 +9,55 @@ import jakarta.inject.Inject */ @MicronautTest public class CapitalizationSpec extends Specification { - private final Capitalization model = new Capitalization() + private final Capitalization model = null /** * Model tests for Capitalization */ - void "Capitalization test"() { + void 'Capitalization test'() { // TODO: test Capitalization } /** * Test the property 'smallCamel' */ - void "Capitalization property smallCamel test"() { - // TODO: test smallCamel + void 'Capitalization property smallCamel test'() { + // TODO: test smallCamel property of Capitalization } /** * Test the property 'capitalCamel' */ - void "Capitalization property capitalCamel test"() { - // TODO: test capitalCamel + void 'Capitalization property capitalCamel test'() { + // TODO: test capitalCamel property of Capitalization } /** * Test the property 'smallSnake' */ - void "Capitalization property smallSnake test"() { - // TODO: test smallSnake + void 'Capitalization property smallSnake test'() { + // TODO: test smallSnake property of Capitalization } /** * Test the property 'capitalSnake' */ - void "Capitalization property capitalSnake test"() { - // TODO: test capitalSnake + void 'Capitalization property capitalSnake test'() { + // TODO: test capitalSnake property of Capitalization } /** * Test the property 'scAETHFlowPoints' */ - void "Capitalization property scAETHFlowPoints test"() { - // TODO: test scAETHFlowPoints + void 'Capitalization property scAETHFlowPoints test'() { + // TODO: test scAETHFlowPoints property of Capitalization } /** * Test the property 'ATT_NAME' */ - void "Capitalization property ATT_NAME test"() { - // TODO: test ATT_NAME + void 'Capitalization property ATT_NAME test'() { + // TODO: test ATT_NAME property of Capitalization } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy index c4762339d43..ba77d196d54 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatAllOfSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class CatAllOfSpec extends Specification { - private final CatAllOf model = new CatAllOf() + private final CatAllOf model = null /** * Model tests for CatAllOf */ - void "CatAllOf test"() { + void 'CatAllOf test'() { // TODO: test CatAllOf } /** * Test the property 'declawed' */ - void "CatAllOf property declawed test"() { - // TODO: test declawed + void 'CatAllOf property declawed test'() { + // TODO: test declawed property of CatAllOf } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy index eede5552627..5b36d718137 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CatSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import org.openapitools.model.Animal import org.openapitools.model.CatAllOf import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,34 +11,34 @@ import jakarta.inject.Inject */ @MicronautTest public class CatSpec extends Specification { - private final Cat model = new Cat() + private final Cat model = null /** * Model tests for Cat */ - void "Cat test"() { + void 'Cat test'() { // TODO: test Cat } /** * Test the property 'className' */ - void "Cat property className test"() { - // TODO: test className + void 'Cat property className test'() { + // TODO: test className property of Cat } /** * Test the property 'color' */ - void "Cat property color test"() { - // TODO: test color + void 'Cat property color test'() { + // TODO: test color property of Cat } /** * Test the property 'declawed' */ - void "Cat property declawed test"() { - // TODO: test declawed + void 'Cat property declawed test'() { + // TODO: test declawed property of Cat } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CategorySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CategorySpec.groovy index 58e243ddfae..7001c6fb579 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CategorySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/CategorySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,27 +9,27 @@ import jakarta.inject.Inject */ @MicronautTest public class CategorySpec extends Specification { - private final Category model = new Category() + private final Category model = null /** * Model tests for Category */ - void "Category test"() { + void 'Category test'() { // TODO: test Category } /** * Test the property 'id' */ - void "Category property id test"() { - // TODO: test id + void 'Category property id test'() { + // TODO: test id property of Category } /** * Test the property 'name' */ - void "Category property name test"() { - // TODO: test name + void 'Category property name test'() { + // TODO: test name property of Category } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ClassModelSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ClassModelSpec.groovy index 491cd582644..55a33b123a9 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ClassModelSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ClassModelSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +9,20 @@ import jakarta.inject.Inject */ @MicronautTest public class ClassModelSpec extends Specification { - private final ClassModel model = new ClassModel() + private final ClassModel model = null /** * Model tests for ClassModel */ - void "ClassModel test"() { + void 'ClassModel test'() { // TODO: test ClassModel } /** * Test the property 'propertyClass' */ - void "ClassModel property propertyClass test"() { - // TODO: test propertyClass + void 'ClassModel property propertyClass test'() { + // TODO: test propertyClass property of ClassModel } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy index 733d8487c5d..a16c637fb87 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogAllOfSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class DogAllOfSpec extends Specification { - private final DogAllOf model = new DogAllOf() + private final DogAllOf model = null /** * Model tests for DogAllOf */ - void "DogAllOf test"() { + void 'DogAllOf test'() { // TODO: test DogAllOf } /** * Test the property 'breed' */ - void "DogAllOf property breed test"() { - // TODO: test breed + void 'DogAllOf property breed test'() { + // TODO: test breed property of DogAllOf } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy index b56f98b8fc5..af1fd87c9a1 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/DogSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import org.openapitools.model.Animal import org.openapitools.model.DogAllOf import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,34 +11,34 @@ import jakarta.inject.Inject */ @MicronautTest public class DogSpec extends Specification { - private final Dog model = new Dog() + private final Dog model = null /** * Model tests for Dog */ - void "Dog test"() { + void 'Dog test'() { // TODO: test Dog } /** * Test the property 'className' */ - void "Dog property className test"() { - // TODO: test className + void 'Dog property className test'() { + // TODO: test className property of Dog } /** * Test the property 'color' */ - void "Dog property color test"() { - // TODO: test color + void 'Dog property color test'() { + // TODO: test color property of Dog } /** * Test the property 'breed' */ - void "Dog property breed test"() { - // TODO: test breed + void 'Dog property breed test'() { + // TODO: test breed property of Dog } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumArraysSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumArraysSpec.groovy index fd3f8cd8c1e..63d236094b2 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumArraysSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumArraysSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.ArrayList import java.util.List import io.micronaut.test.extensions.spock.annotation.MicronautTest @@ -13,27 +11,27 @@ import jakarta.inject.Inject */ @MicronautTest public class EnumArraysSpec extends Specification { - private final EnumArrays model = new EnumArrays() + private final EnumArrays model = null /** * Model tests for EnumArrays */ - void "EnumArrays test"() { + void 'EnumArrays test'() { // TODO: test EnumArrays } /** * Test the property 'justSymbol' */ - void "EnumArrays property justSymbol test"() { - // TODO: test justSymbol + void 'EnumArrays property justSymbol test'() { + // TODO: test justSymbol property of EnumArrays } /** * Test the property 'arrayEnum' */ - void "EnumArrays property arrayEnum test"() { - // TODO: test arrayEnum + void 'EnumArrays property arrayEnum test'() { + // TODO: test arrayEnum property of EnumArrays } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumClassSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumClassSpec.groovy index fb0f558262d..56274f11266 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumClassSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumClassSpec.groovy @@ -12,7 +12,7 @@ public class EnumClassSpec extends Specification { /** * Model tests for EnumClass */ - void "EnumClass test"() { + void 'EnumClass test'() { // TODO: test EnumClass } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumTestSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumTestSpec.groovy index 5b1e4a3b87a..1183ff14b43 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumTestSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/EnumTestSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import org.openapitools.model.OuterEnum import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification @@ -12,48 +11,48 @@ import jakarta.inject.Inject */ @MicronautTest public class EnumTestSpec extends Specification { - private final EnumTest model = new EnumTest() + private final EnumTest model = null /** * Model tests for EnumTest */ - void "EnumTest test"() { + void 'EnumTest test'() { // TODO: test EnumTest } /** * Test the property 'enumString' */ - void "EnumTest property enumString test"() { - // TODO: test enumString + void 'EnumTest property enumString test'() { + // TODO: test enumString property of EnumTest } /** * Test the property 'enumStringRequired' */ - void "EnumTest property enumStringRequired test"() { - // TODO: test enumStringRequired + void 'EnumTest property enumStringRequired test'() { + // TODO: test enumStringRequired property of EnumTest } /** * Test the property 'enumInteger' */ - void "EnumTest property enumInteger test"() { - // TODO: test enumInteger + void 'EnumTest property enumInteger test'() { + // TODO: test enumInteger property of EnumTest } /** * Test the property 'enumNumber' */ - void "EnumTest property enumNumber test"() { - // TODO: test enumNumber + void 'EnumTest property enumNumber test'() { + // TODO: test enumNumber property of EnumTest } /** * Test the property 'outerEnum' */ - void "EnumTest property outerEnum test"() { - // TODO: test outerEnum + void 'EnumTest property outerEnum test'() { + // TODO: test outerEnum property of EnumTest } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FileSchemaTestClassSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FileSchemaTestClassSpec.groovy index d4c964acb4b..61edd2ec705 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FileSchemaTestClassSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FileSchemaTestClassSpec.groovy @@ -1,9 +1,8 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.ArrayList import java.util.List +import org.openapitools.model.ModelFile import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -13,27 +12,27 @@ import jakarta.inject.Inject */ @MicronautTest public class FileSchemaTestClassSpec extends Specification { - private final FileSchemaTestClass model = new FileSchemaTestClass() + private final FileSchemaTestClass model = null /** * Model tests for FileSchemaTestClass */ - void "FileSchemaTestClass test"() { + void 'FileSchemaTestClass test'() { // TODO: test FileSchemaTestClass } /** - * Test the property 'file' + * Test the property '_file' */ - void "FileSchemaTestClass property file test"() { - // TODO: test file + void 'FileSchemaTestClass property _file test'() { + // TODO: test _file property of FileSchemaTestClass } /** * Test the property 'files' */ - void "FileSchemaTestClass property files test"() { - // TODO: test files + void 'FileSchemaTestClass property files test'() { + // TODO: test files property of FileSchemaTestClass } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FormatTestSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FormatTestSpec.groovy index 042fe9c5f7a..6a10da4b8e7 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FormatTestSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/FormatTestSpec.groovy @@ -1,11 +1,10 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import java.io.File import java.math.BigDecimal import java.time.LocalDate -import java.time.LocalDateTime +import java.time.OffsetDateTime import java.util.UUID import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification @@ -16,111 +15,111 @@ import jakarta.inject.Inject */ @MicronautTest public class FormatTestSpec extends Specification { - private final FormatTest model = new FormatTest() + private final FormatTest model = null /** * Model tests for FormatTest */ - void "FormatTest test"() { + void 'FormatTest test'() { // TODO: test FormatTest } /** * Test the property 'integer' */ - void "FormatTest property integer test"() { - // TODO: test integer + void 'FormatTest property integer test'() { + // TODO: test integer property of FormatTest } /** * Test the property 'int32' */ - void "FormatTest property int32 test"() { - // TODO: test int32 + void 'FormatTest property int32 test'() { + // TODO: test int32 property of FormatTest } /** * Test the property 'int64' */ - void "FormatTest property int64 test"() { - // TODO: test int64 + void 'FormatTest property int64 test'() { + // TODO: test int64 property of FormatTest } /** * Test the property 'number' */ - void "FormatTest property number test"() { - // TODO: test number + void 'FormatTest property number test'() { + // TODO: test number property of FormatTest } /** * Test the property '_float' */ - void "FormatTest property _float test"() { - // TODO: test _float + void 'FormatTest property _float test'() { + // TODO: test _float property of FormatTest } /** * Test the property '_double' */ - void "FormatTest property _double test"() { - // TODO: test _double + void 'FormatTest property _double test'() { + // TODO: test _double property of FormatTest } /** * Test the property 'string' */ - void "FormatTest property string test"() { - // TODO: test string + void 'FormatTest property string test'() { + // TODO: test string property of FormatTest } /** * Test the property '_byte' */ - void "FormatTest property _byte test"() { - // TODO: test _byte + void 'FormatTest property _byte test'() { + // TODO: test _byte property of FormatTest } /** * Test the property 'binary' */ - void "FormatTest property binary test"() { - // TODO: test binary + void 'FormatTest property binary test'() { + // TODO: test binary property of FormatTest } /** * Test the property 'date' */ - void "FormatTest property date test"() { - // TODO: test date + void 'FormatTest property date test'() { + // TODO: test date property of FormatTest } /** * Test the property 'dateTime' */ - void "FormatTest property dateTime test"() { - // TODO: test dateTime + void 'FormatTest property dateTime test'() { + // TODO: test dateTime property of FormatTest } /** * Test the property 'uuid' */ - void "FormatTest property uuid test"() { - // TODO: test uuid + void 'FormatTest property uuid test'() { + // TODO: test uuid property of FormatTest } /** * Test the property 'password' */ - void "FormatTest property password test"() { - // TODO: test password + void 'FormatTest property password test'() { + // TODO: test password property of FormatTest } /** * Test the property 'bigDecimal' */ - void "FormatTest property bigDecimal test"() { - // TODO: test bigDecimal + void 'FormatTest property bigDecimal test'() { + // TODO: test bigDecimal property of FormatTest } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/HasOnlyReadOnlySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/HasOnlyReadOnlySpec.groovy index dc494b74eab..5689ef6afc7 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/HasOnlyReadOnlySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/HasOnlyReadOnlySpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,27 +10,27 @@ import jakarta.inject.Inject */ @MicronautTest public class HasOnlyReadOnlySpec extends Specification { - private final HasOnlyReadOnly model = new HasOnlyReadOnly() + private final HasOnlyReadOnly model = null /** * Model tests for HasOnlyReadOnly */ - void "HasOnlyReadOnly test"() { + void 'HasOnlyReadOnly test'() { // TODO: test HasOnlyReadOnly } /** * Test the property 'bar' */ - void "HasOnlyReadOnly property bar test"() { - // TODO: test bar + void 'HasOnlyReadOnly property bar test'() { + // TODO: test bar property of HasOnlyReadOnly } /** * Test the property 'foo' */ - void "HasOnlyReadOnly property foo test"() { - // TODO: test foo + void 'HasOnlyReadOnly property foo test'() { + // TODO: test foo property of HasOnlyReadOnly } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MapTestSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MapTestSpec.groovy index 80a970ab70b..3b3a8bf99a9 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MapTestSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MapTestSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.HashMap import java.util.List import java.util.Map @@ -14,41 +12,41 @@ import jakarta.inject.Inject */ @MicronautTest public class MapTestSpec extends Specification { - private final MapTest model = new MapTest() + private final MapTest model = null /** * Model tests for MapTest */ - void "MapTest test"() { + void 'MapTest test'() { // TODO: test MapTest } /** * Test the property 'mapMapOfString' */ - void "MapTest property mapMapOfString test"() { - // TODO: test mapMapOfString + void 'MapTest property mapMapOfString test'() { + // TODO: test mapMapOfString property of MapTest } /** * Test the property 'mapOfEnumString' */ - void "MapTest property mapOfEnumString test"() { - // TODO: test mapOfEnumString + void 'MapTest property mapOfEnumString test'() { + // TODO: test mapOfEnumString property of MapTest } /** * Test the property 'directMap' */ - void "MapTest property directMap test"() { - // TODO: test directMap + void 'MapTest property directMap test'() { + // TODO: test directMap property of MapTest } /** * Test the property 'indirectMap' */ - void "MapTest property indirectMap test"() { - // TODO: test indirectMap + void 'MapTest property indirectMap test'() { + // TODO: test indirectMap property of MapTest } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassSpec.groovy index 6beabf63499..e168e7761aa 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassSpec.groovy @@ -1,8 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty -import java.time.LocalDateTime +import java.time.OffsetDateTime import java.util.HashMap import java.util.List import java.util.Map @@ -17,34 +15,34 @@ import jakarta.inject.Inject */ @MicronautTest public class MixedPropertiesAndAdditionalPropertiesClassSpec extends Specification { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass() + private final MixedPropertiesAndAdditionalPropertiesClass model = null /** * Model tests for MixedPropertiesAndAdditionalPropertiesClass */ - void "MixedPropertiesAndAdditionalPropertiesClass test"() { + void 'MixedPropertiesAndAdditionalPropertiesClass test'() { // TODO: test MixedPropertiesAndAdditionalPropertiesClass } /** * Test the property 'uuid' */ - void "MixedPropertiesAndAdditionalPropertiesClass property uuid test"() { - // TODO: test uuid + void 'MixedPropertiesAndAdditionalPropertiesClass property uuid test'() { + // TODO: test uuid property of MixedPropertiesAndAdditionalPropertiesClass } /** * Test the property 'dateTime' */ - void "MixedPropertiesAndAdditionalPropertiesClass property dateTime test"() { - // TODO: test dateTime + void 'MixedPropertiesAndAdditionalPropertiesClass property dateTime test'() { + // TODO: test dateTime property of MixedPropertiesAndAdditionalPropertiesClass } /** * Test the property 'map' */ - void "MixedPropertiesAndAdditionalPropertiesClass property map test"() { - // TODO: test map + void 'MixedPropertiesAndAdditionalPropertiesClass property map test'() { + // TODO: test map property of MixedPropertiesAndAdditionalPropertiesClass } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/Model200ResponseSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/Model200ResponseSpec.groovy index 97093ff2eba..acefb9d1445 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/Model200ResponseSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/Model200ResponseSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,27 +10,27 @@ import jakarta.inject.Inject */ @MicronautTest public class Model200ResponseSpec extends Specification { - private final Model200Response model = new Model200Response() + private final Model200Response model = null /** * Model tests for Model200Response */ - void "Model200Response test"() { + void 'Model200Response test'() { // TODO: test Model200Response } /** * Test the property 'name' */ - void "Model200Response property name test"() { - // TODO: test name + void 'Model200Response property name test'() { + // TODO: test name property of Model200Response } /** * Test the property 'propertyClass' */ - void "Model200Response property propertyClass test"() { - // TODO: test propertyClass + void 'Model200Response property propertyClass test'() { + // TODO: test propertyClass property of Model200Response } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy index 344e6736457..774c2c37c32 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,34 +10,34 @@ import jakarta.inject.Inject */ @MicronautTest public class ModelApiResponseSpec extends Specification { - private final ModelApiResponse model = new ModelApiResponse() + private final ModelApiResponse model = null /** * Model tests for ModelApiResponse */ - void "ModelApiResponse test"() { + void 'ModelApiResponse test'() { // TODO: test ModelApiResponse } /** * Test the property 'code' */ - void "ModelApiResponse property code test"() { - // TODO: test code + void 'ModelApiResponse property code test'() { + // TODO: test code property of ModelApiResponse } /** * Test the property 'type' */ - void "ModelApiResponse property type test"() { - // TODO: test type + void 'ModelApiResponse property type test'() { + // TODO: test type property of ModelApiResponse } /** * Test the property 'message' */ - void "ModelApiResponse property message test"() { - // TODO: test message + void 'ModelApiResponse property message test'() { + // TODO: test message property of ModelApiResponse } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelClientSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelClientSpec.groovy index 15de84e16e1..b356f1f541b 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelClientSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelClientSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class ModelClientSpec extends Specification { - private final ModelClient model = new ModelClient() + private final ModelClient model = null /** * Model tests for ModelClient */ - void "ModelClient test"() { + void 'ModelClient test'() { // TODO: test ModelClient } /** * Test the property '_client' */ - void "ModelClient property _client test"() { - // TODO: test _client + void 'ModelClient property _client test'() { + // TODO: test _client property of ModelClient } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelFileSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelFileSpec.groovy index 437aa0a889b..b942a095b1d 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelFileSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelFileSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,7 +10,7 @@ import jakarta.inject.Inject */ @MicronautTest public class ModelFileSpec extends Specification { - private final ModelFile model = new ModelFile() + private final ModelFile model = null /** * Model tests for ModelFile @@ -24,7 +23,7 @@ public class ModelFileSpec extends Specification { * Test the property 'sourceURI' */ void 'ModelFile property sourceURI test'() { - // TODO: test sourceURI + // TODO: test sourceURI property of ModelFile } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelListSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelListSpec.groovy index 90939aa9761..59da79bda0a 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelListSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelListSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,7 +10,7 @@ import jakarta.inject.Inject */ @MicronautTest public class ModelListSpec extends Specification { - private final ModelList model = new ModelList() + private final ModelList model = null /** * Model tests for ModelList @@ -24,7 +23,7 @@ public class ModelListSpec extends Specification { * Test the property '_123list' */ void 'ModelList property _123list test'() { - // TODO: test _123list + // TODO: test _123list property of ModelList } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelReturnSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelReturnSpec.groovy index ec9ff8427f8..0ae613c2847 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelReturnSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ModelReturnSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class ModelReturnSpec extends Specification { - private final ModelReturn model = new ModelReturn() + private final ModelReturn model = null /** * Model tests for ModelReturn */ - void "ModelReturn test"() { + void 'ModelReturn test'() { // TODO: test ModelReturn } /** * Test the property '_return' */ - void "ModelReturn property _return test"() { - // TODO: test _return + void 'ModelReturn property _return test'() { + // TODO: test _return property of ModelReturn } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NameSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NameSpec.groovy index af3bcb6f545..59b471a6c16 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NameSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NameSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,41 +9,41 @@ import jakarta.inject.Inject */ @MicronautTest public class NameSpec extends Specification { - private final Name model = new Name() + private final Name model = null /** * Model tests for Name */ - void "Name test"() { + void 'Name test'() { // TODO: test Name } /** * Test the property 'name' */ - void "Name property name test"() { - // TODO: test name + void 'Name property name test'() { + // TODO: test name property of Name } /** * Test the property 'snakeCase' */ - void "Name property snakeCase test"() { - // TODO: test snakeCase + void 'Name property snakeCase test'() { + // TODO: test snakeCase property of Name } /** * Test the property 'property' */ - void "Name property property test"() { - // TODO: test property + void 'Name property property test'() { + // TODO: test property property of Name } /** * Test the property '_123number' */ - void "Name property _123number test"() { - // TODO: test _123number + void 'Name property _123number test'() { + // TODO: test _123number property of Name } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NumberOnlySpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NumberOnlySpec.groovy index 19abee7e60f..081a7cf9c9a 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NumberOnlySpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/NumberOnlySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification @@ -12,20 +10,20 @@ import jakarta.inject.Inject */ @MicronautTest public class NumberOnlySpec extends Specification { - private final NumberOnly model = new NumberOnly() + private final NumberOnly model = null /** * Model tests for NumberOnly */ - void "NumberOnly test"() { + void 'NumberOnly test'() { // TODO: test NumberOnly } /** * Test the property 'justNumber' */ - void "NumberOnly property justNumber test"() { - // TODO: test justNumber + void 'NumberOnly property justNumber test'() { + // TODO: test justNumber property of NumberOnly } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OrderSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OrderSpec.groovy index c4421f8c243..c5141d7506b 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OrderSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OrderSpec.groovy @@ -1,8 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty -import java.time.LocalDateTime +import java.time.OffsetDateTime import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -12,55 +10,55 @@ import jakarta.inject.Inject */ @MicronautTest public class OrderSpec extends Specification { - private final Order model = new Order() + private final Order model = null /** * Model tests for Order */ - void "Order test"() { + void 'Order test'() { // TODO: test Order } /** * Test the property 'id' */ - void "Order property id test"() { - // TODO: test id + void 'Order property id test'() { + // TODO: test id property of Order } /** * Test the property 'petId' */ - void "Order property petId test"() { - // TODO: test petId + void 'Order property petId test'() { + // TODO: test petId property of Order } /** * Test the property 'quantity' */ - void "Order property quantity test"() { - // TODO: test quantity + void 'Order property quantity test'() { + // TODO: test quantity property of Order } /** * Test the property 'shipDate' */ - void "Order property shipDate test"() { - // TODO: test shipDate + void 'Order property shipDate test'() { + // TODO: test shipDate property of Order } /** * Test the property 'status' */ - void "Order property status test"() { - // TODO: test status + void 'Order property status test'() { + // TODO: test status property of Order } /** * Test the property 'complete' */ - void "Order property complete test"() { - // TODO: test complete + void 'Order property complete test'() { + // TODO: test complete property of Order } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterCompositeSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterCompositeSpec.groovy index db5caf95e62..0300cb47a1f 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterCompositeSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterCompositeSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification @@ -12,34 +10,34 @@ import jakarta.inject.Inject */ @MicronautTest public class OuterCompositeSpec extends Specification { - private final OuterComposite model = new OuterComposite() + private final OuterComposite model = null /** * Model tests for OuterComposite */ - void "OuterComposite test"() { + void 'OuterComposite test'() { // TODO: test OuterComposite } /** * Test the property 'myNumber' */ - void "OuterComposite property myNumber test"() { - // TODO: test myNumber + void 'OuterComposite property myNumber test'() { + // TODO: test myNumber property of OuterComposite } /** * Test the property 'myString' */ - void "OuterComposite property myString test"() { - // TODO: test myString + void 'OuterComposite property myString test'() { + // TODO: test myString property of OuterComposite } /** * Test the property 'myBoolean' */ - void "OuterComposite property myBoolean test"() { - // TODO: test myBoolean + void 'OuterComposite property myBoolean test'() { + // TODO: test myBoolean property of OuterComposite } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterEnumSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterEnumSpec.groovy index abfdae04e77..ae53534bbab 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterEnumSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/OuterEnumSpec.groovy @@ -12,7 +12,7 @@ public class OuterEnumSpec extends Specification { /** * Model tests for OuterEnum */ - void "OuterEnum test"() { + void 'OuterEnum test'() { // TODO: test OuterEnum } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/PetSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/PetSpec.groovy index dd72edcc319..fdcc482b95b 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/PetSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/PetSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.databind.annotation.JsonDeserialize import java.util.ArrayList import java.util.LinkedHashSet import java.util.List @@ -17,55 +16,55 @@ import jakarta.inject.Inject */ @MicronautTest public class PetSpec extends Specification { - private final Pet model = new Pet() + private final Pet model = null /** * Model tests for Pet */ - void "Pet test"() { + void 'Pet test'() { // TODO: test Pet } /** * Test the property 'id' */ - void "Pet property id test"() { - // TODO: test id + void 'Pet property id test'() { + // TODO: test id property of Pet } /** * Test the property 'category' */ - void "Pet property category test"() { - // TODO: test category + void 'Pet property category test'() { + // TODO: test category property of Pet } /** * Test the property 'name' */ - void "Pet property name test"() { - // TODO: test name + void 'Pet property name test'() { + // TODO: test name property of Pet } /** * Test the property 'photoUrls' */ - void "Pet property photoUrls test"() { - // TODO: test photoUrls + void 'Pet property photoUrls test'() { + // TODO: test photoUrls property of Pet } /** * Test the property 'tags' */ - void "Pet property tags test"() { - // TODO: test tags + void 'Pet property tags test'() { + // TODO: test tags property of Pet } /** * Test the property 'status' */ - void "Pet property status test"() { - // TODO: test status + void 'Pet property status test'() { + // TODO: test status property of Pet } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ReadOnlyFirstSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ReadOnlyFirstSpec.groovy index b16cba13912..ee2724e8465 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ReadOnlyFirstSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/ReadOnlyFirstSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,27 +9,27 @@ import jakarta.inject.Inject */ @MicronautTest public class ReadOnlyFirstSpec extends Specification { - private final ReadOnlyFirst model = new ReadOnlyFirst() + private final ReadOnlyFirst model = null /** * Model tests for ReadOnlyFirst */ - void "ReadOnlyFirst test"() { + void 'ReadOnlyFirst test'() { // TODO: test ReadOnlyFirst } /** * Test the property 'bar' */ - void "ReadOnlyFirst property bar test"() { - // TODO: test bar + void 'ReadOnlyFirst property bar test'() { + // TODO: test bar property of ReadOnlyFirst } /** * Test the property 'baz' */ - void "ReadOnlyFirst property baz test"() { - // TODO: test baz + void 'ReadOnlyFirst property baz test'() { + // TODO: test baz property of ReadOnlyFirst } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/SpecialModelNameSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/SpecialModelNameSpec.groovy index 8466e6415e2..06449cfb360 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/SpecialModelNameSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/SpecialModelNameSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,12 +10,12 @@ import jakarta.inject.Inject */ @MicronautTest public class SpecialModelNameSpec extends Specification { - private final SpecialModelName model = new SpecialModelName() + private final SpecialModelName model = null /** * Model tests for SpecialModelName */ - void "SpecialModelName test"() { + void 'SpecialModelName test'() { // TODO: test SpecialModelName } @@ -24,7 +23,7 @@ public class SpecialModelNameSpec extends Specification { * Test the property '$specialPropertyName' */ void 'SpecialModelName property $specialPropertyName test'() { - // TODO: test $specialPropertyName + // TODO: test $specialPropertyName property of SpecialModelName } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TagSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TagSpec.groovy index 15f2f00fcbf..20058bf4315 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TagSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TagSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,27 +9,27 @@ import jakarta.inject.Inject */ @MicronautTest public class TagSpec extends Specification { - private final Tag model = new Tag() + private final Tag model = null /** * Model tests for Tag */ - void "Tag test"() { + void 'Tag test'() { // TODO: test Tag } /** * Test the property 'id' */ - void "Tag property id test"() { - // TODO: test id + void 'Tag property id test'() { + // TODO: test id property of Tag } /** * Test the property 'name' */ - void "Tag property name test"() { - // TODO: test name + void 'Tag property name test'() { + // TODO: test name property of Tag } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderDefaultSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderDefaultSpec.groovy index 20ef71c2c61..5bd42fd8305 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderDefaultSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderDefaultSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.ArrayList import java.util.List @@ -14,48 +12,48 @@ import jakarta.inject.Inject */ @MicronautTest public class TypeHolderDefaultSpec extends Specification { - private final TypeHolderDefault model = new TypeHolderDefault() + private final TypeHolderDefault model = null /** * Model tests for TypeHolderDefault */ - void "TypeHolderDefault test"() { + void 'TypeHolderDefault test'() { // TODO: test TypeHolderDefault } /** * Test the property 'stringItem' */ - void "TypeHolderDefault property stringItem test"() { - // TODO: test stringItem + void 'TypeHolderDefault property stringItem test'() { + // TODO: test stringItem property of TypeHolderDefault } /** * Test the property 'numberItem' */ - void "TypeHolderDefault property numberItem test"() { - // TODO: test numberItem + void 'TypeHolderDefault property numberItem test'() { + // TODO: test numberItem property of TypeHolderDefault } /** * Test the property 'integerItem' */ - void "TypeHolderDefault property integerItem test"() { - // TODO: test integerItem + void 'TypeHolderDefault property integerItem test'() { + // TODO: test integerItem property of TypeHolderDefault } /** * Test the property 'boolItem' */ - void "TypeHolderDefault property boolItem test"() { - // TODO: test boolItem + void 'TypeHolderDefault property boolItem test'() { + // TODO: test boolItem property of TypeHolderDefault } /** * Test the property 'arrayItem' */ - void "TypeHolderDefault property arrayItem test"() { - // TODO: test arrayItem + void 'TypeHolderDefault property arrayItem test'() { + // TODO: test arrayItem property of TypeHolderDefault } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderExampleSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderExampleSpec.groovy index 29577de7621..efbe456a02d 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderExampleSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/TypeHolderExampleSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.ArrayList import java.util.List @@ -14,55 +12,55 @@ import jakarta.inject.Inject */ @MicronautTest public class TypeHolderExampleSpec extends Specification { - private final TypeHolderExample model = new TypeHolderExample() + private final TypeHolderExample model = null /** * Model tests for TypeHolderExample */ - void "TypeHolderExample test"() { + void 'TypeHolderExample test'() { // TODO: test TypeHolderExample } /** * Test the property 'stringItem' */ - void "TypeHolderExample property stringItem test"() { - // TODO: test stringItem + void 'TypeHolderExample property stringItem test'() { + // TODO: test stringItem property of TypeHolderExample } /** * Test the property 'numberItem' */ - void "TypeHolderExample property numberItem test"() { - // TODO: test numberItem + void 'TypeHolderExample property numberItem test'() { + // TODO: test numberItem property of TypeHolderExample } /** * Test the property 'floatItem' */ - void "TypeHolderExample property floatItem test"() { - // TODO: test floatItem + void 'TypeHolderExample property floatItem test'() { + // TODO: test floatItem property of TypeHolderExample } /** * Test the property 'integerItem' */ - void "TypeHolderExample property integerItem test"() { - // TODO: test integerItem + void 'TypeHolderExample property integerItem test'() { + // TODO: test integerItem property of TypeHolderExample } /** * Test the property 'boolItem' */ - void "TypeHolderExample property boolItem test"() { - // TODO: test boolItem + void 'TypeHolderExample property boolItem test'() { + // TODO: test boolItem property of TypeHolderExample } /** * Test the property 'arrayItem' */ - void "TypeHolderExample property arrayItem test"() { - // TODO: test arrayItem + void 'TypeHolderExample property arrayItem test'() { + // TODO: test arrayItem property of TypeHolderExample } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/UserSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/UserSpec.groovy index af7ec2738c3..4b4bcec67fd 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/UserSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/UserSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject @@ -11,69 +9,69 @@ import jakarta.inject.Inject */ @MicronautTest public class UserSpec extends Specification { - private final User model = new User() + private final User model = null /** * Model tests for User */ - void "User test"() { + void 'User test'() { // TODO: test User } /** * Test the property 'id' */ - void "User property id test"() { - // TODO: test id + void 'User property id test'() { + // TODO: test id property of User } /** * Test the property 'username' */ - void "User property username test"() { - // TODO: test username + void 'User property username test'() { + // TODO: test username property of User } /** * Test the property 'firstName' */ - void "User property firstName test"() { - // TODO: test firstName + void 'User property firstName test'() { + // TODO: test firstName property of User } /** * Test the property 'lastName' */ - void "User property lastName test"() { - // TODO: test lastName + void 'User property lastName test'() { + // TODO: test lastName property of User } /** * Test the property 'email' */ - void "User property email test"() { - // TODO: test email + void 'User property email test'() { + // TODO: test email property of User } /** * Test the property 'password' */ - void "User property password test"() { - // TODO: test password + void 'User property password test'() { + // TODO: test password property of User } /** * Test the property 'phone' */ - void "User property phone test"() { - // TODO: test phone + void 'User property phone test'() { + // TODO: test phone property of User } /** * Test the property 'userStatus' */ - void "User property userStatus test"() { - // TODO: test userStatus + void 'User property userStatus test'() { + // TODO: test userStatus property of User } } diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/XmlItemSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/XmlItemSpec.groovy index 02d57582c68..47d4aace76f 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/XmlItemSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/model/XmlItemSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.math.BigDecimal import java.util.ArrayList import java.util.List @@ -14,216 +12,216 @@ import jakarta.inject.Inject */ @MicronautTest public class XmlItemSpec extends Specification { - private final XmlItem model = new XmlItem() + private final XmlItem model = null /** * Model tests for XmlItem */ - void "XmlItem test"() { + void 'XmlItem test'() { // TODO: test XmlItem } /** * Test the property 'attributeString' */ - void "XmlItem property attributeString test"() { - // TODO: test attributeString + void 'XmlItem property attributeString test'() { + // TODO: test attributeString property of XmlItem } /** * Test the property 'attributeNumber' */ - void "XmlItem property attributeNumber test"() { - // TODO: test attributeNumber + void 'XmlItem property attributeNumber test'() { + // TODO: test attributeNumber property of XmlItem } /** * Test the property 'attributeInteger' */ - void "XmlItem property attributeInteger test"() { - // TODO: test attributeInteger + void 'XmlItem property attributeInteger test'() { + // TODO: test attributeInteger property of XmlItem } /** * Test the property 'attributeBoolean' */ - void "XmlItem property attributeBoolean test"() { - // TODO: test attributeBoolean + void 'XmlItem property attributeBoolean test'() { + // TODO: test attributeBoolean property of XmlItem } /** * Test the property 'wrappedArray' */ - void "XmlItem property wrappedArray test"() { - // TODO: test wrappedArray + void 'XmlItem property wrappedArray test'() { + // TODO: test wrappedArray property of XmlItem } /** * Test the property 'nameString' */ - void "XmlItem property nameString test"() { - // TODO: test nameString + void 'XmlItem property nameString test'() { + // TODO: test nameString property of XmlItem } /** * Test the property 'nameNumber' */ - void "XmlItem property nameNumber test"() { - // TODO: test nameNumber + void 'XmlItem property nameNumber test'() { + // TODO: test nameNumber property of XmlItem } /** * Test the property 'nameInteger' */ - void "XmlItem property nameInteger test"() { - // TODO: test nameInteger + void 'XmlItem property nameInteger test'() { + // TODO: test nameInteger property of XmlItem } /** * Test the property 'nameBoolean' */ - void "XmlItem property nameBoolean test"() { - // TODO: test nameBoolean + void 'XmlItem property nameBoolean test'() { + // TODO: test nameBoolean property of XmlItem } /** * Test the property 'nameArray' */ - void "XmlItem property nameArray test"() { - // TODO: test nameArray + void 'XmlItem property nameArray test'() { + // TODO: test nameArray property of XmlItem } /** * Test the property 'nameWrappedArray' */ - void "XmlItem property nameWrappedArray test"() { - // TODO: test nameWrappedArray + void 'XmlItem property nameWrappedArray test'() { + // TODO: test nameWrappedArray property of XmlItem } /** * Test the property 'prefixString' */ - void "XmlItem property prefixString test"() { - // TODO: test prefixString + void 'XmlItem property prefixString test'() { + // TODO: test prefixString property of XmlItem } /** * Test the property 'prefixNumber' */ - void "XmlItem property prefixNumber test"() { - // TODO: test prefixNumber + void 'XmlItem property prefixNumber test'() { + // TODO: test prefixNumber property of XmlItem } /** * Test the property 'prefixInteger' */ - void "XmlItem property prefixInteger test"() { - // TODO: test prefixInteger + void 'XmlItem property prefixInteger test'() { + // TODO: test prefixInteger property of XmlItem } /** * Test the property 'prefixBoolean' */ - void "XmlItem property prefixBoolean test"() { - // TODO: test prefixBoolean + void 'XmlItem property prefixBoolean test'() { + // TODO: test prefixBoolean property of XmlItem } /** * Test the property 'prefixArray' */ - void "XmlItem property prefixArray test"() { - // TODO: test prefixArray + void 'XmlItem property prefixArray test'() { + // TODO: test prefixArray property of XmlItem } /** * Test the property 'prefixWrappedArray' */ - void "XmlItem property prefixWrappedArray test"() { - // TODO: test prefixWrappedArray + void 'XmlItem property prefixWrappedArray test'() { + // TODO: test prefixWrappedArray property of XmlItem } /** * Test the property 'namespaceString' */ - void "XmlItem property namespaceString test"() { - // TODO: test namespaceString + void 'XmlItem property namespaceString test'() { + // TODO: test namespaceString property of XmlItem } /** * Test the property 'namespaceNumber' */ - void "XmlItem property namespaceNumber test"() { - // TODO: test namespaceNumber + void 'XmlItem property namespaceNumber test'() { + // TODO: test namespaceNumber property of XmlItem } /** * Test the property 'namespaceInteger' */ - void "XmlItem property namespaceInteger test"() { - // TODO: test namespaceInteger + void 'XmlItem property namespaceInteger test'() { + // TODO: test namespaceInteger property of XmlItem } /** * Test the property 'namespaceBoolean' */ - void "XmlItem property namespaceBoolean test"() { - // TODO: test namespaceBoolean + void 'XmlItem property namespaceBoolean test'() { + // TODO: test namespaceBoolean property of XmlItem } /** * Test the property 'namespaceArray' */ - void "XmlItem property namespaceArray test"() { - // TODO: test namespaceArray + void 'XmlItem property namespaceArray test'() { + // TODO: test namespaceArray property of XmlItem } /** * Test the property 'namespaceWrappedArray' */ - void "XmlItem property namespaceWrappedArray test"() { - // TODO: test namespaceWrappedArray + void 'XmlItem property namespaceWrappedArray test'() { + // TODO: test namespaceWrappedArray property of XmlItem } /** * Test the property 'prefixNsString' */ - void "XmlItem property prefixNsString test"() { - // TODO: test prefixNsString + void 'XmlItem property prefixNsString test'() { + // TODO: test prefixNsString property of XmlItem } /** * Test the property 'prefixNsNumber' */ - void "XmlItem property prefixNsNumber test"() { - // TODO: test prefixNsNumber + void 'XmlItem property prefixNsNumber test'() { + // TODO: test prefixNsNumber property of XmlItem } /** * Test the property 'prefixNsInteger' */ - void "XmlItem property prefixNsInteger test"() { - // TODO: test prefixNsInteger + void 'XmlItem property prefixNsInteger test'() { + // TODO: test prefixNsInteger property of XmlItem } /** * Test the property 'prefixNsBoolean' */ - void "XmlItem property prefixNsBoolean test"() { - // TODO: test prefixNsBoolean + void 'XmlItem property prefixNsBoolean test'() { + // TODO: test prefixNsBoolean property of XmlItem } /** * Test the property 'prefixNsArray' */ - void "XmlItem property prefixNsArray test"() { - // TODO: test prefixNsArray + void 'XmlItem property prefixNsArray test'() { + // TODO: test prefixNsArray property of XmlItem } /** * Test the property 'prefixNsWrappedArray' */ - void "XmlItem property prefixNsWrappedArray test"() { - // TODO: test prefixNsWrappedArray + void 'XmlItem property prefixNsWrappedArray test'() { + // TODO: test prefixNsWrappedArray property of XmlItem } } diff --git a/samples/server/petstore/java-micronaut-server/build.gradle b/samples/server/petstore/java-micronaut-server/build.gradle index 29b6603f793..c18d58eac65 100644 --- a/samples/server/petstore/java-micronaut-server/build.gradle +++ b/samples/server/petstore/java-micronaut-server/build.gradle @@ -27,7 +27,7 @@ dependencies { implementation("io.micronaut:micronaut-runtime") implementation("io.micronaut:micronaut-validation") implementation("io.micronaut.reactor:micronaut-reactor") - implementation("io.swagger:swagger-annotations:1.5.9") + implementation("io.swagger.core.v3:swagger-annotations:2.2.0") runtimeOnly("ch.qos.logback:logback-classic") } diff --git a/samples/server/petstore/java-micronaut-server/gradle.properties b/samples/server/petstore/java-micronaut-server/gradle.properties index 6d5febf8520..76fce170509 100644 --- a/samples/server/petstore/java-micronaut-server/gradle.properties +++ b/samples/server/petstore/java-micronaut-server/gradle.properties @@ -1 +1 @@ -micronautVersion=3.3.1 \ No newline at end of file +micronautVersion=3.4.3 \ No newline at end of file diff --git a/samples/server/petstore/java-micronaut-server/pom.xml b/samples/server/petstore/java-micronaut-server/pom.xml index 7ffa53d172b..06ae693317c 100644 --- a/samples/server/petstore/java-micronaut-server/pom.xml +++ b/samples/server/petstore/java-micronaut-server/pom.xml @@ -10,7 +10,7 @@ io.micronaut micronaut-parent - 3.3.1 + 3.4.3 @@ -19,10 +19,10 @@ UTF-8 - 3.3.1 + 3.4.3 org.openapitools.Application netty - 1.5.21 + 2.2.0 @@ -90,7 +90,7 @@ runtime - io.swagger + io.swagger.core.v3 swagger-annotations ${swagger-annotations-version} diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java index bb301d721f1..3046d5f95b4 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/PetController.java @@ -28,10 +28,18 @@ import java.util.List; import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; -import io.swagger.annotations.*; +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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; @Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") @Controller +@Tag(name = "Pet", description = "The Pet API") public class PetController { /** * Add a new pet to the store @@ -40,21 +48,23 @@ public class PetController { * @param pet Pet object that needs to be added to the store (required) * @return Pet */ - @ApiOperation( - value = "Add a new pet to the store", - nickname = "addPet", - notes = "", - response = Pet.class, - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "addPet", + summary = "Add a new pet to the store", + 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 = "405", description = "Invalid input") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 405, message = "Invalid input")}) + parameters = { + @Parameter(name = "pet", description = "Pet object that needs to be added to the store", required = true) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + } + ) @Post(uri="/pet") @Produces(value = {"application/xml", "application/json"}) @Consumes(value = {"application/json", "application/xml"}) @@ -73,19 +83,20 @@ public class PetController { * @param petId Pet id to delete (required) * @param apiKey (optional) */ - @ApiOperation( - value = "Deletes a pet", - nickname = "deletePet", - notes = "", - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "deletePet", + summary = "Deletes a pet", + responses = { + @ApiResponse(responseCode = "400", description = "Invalid pet value") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid pet value")}) + parameters = { + @Parameter(name = "petId", description = "Pet id to delete", required = true), + @Parameter(name = "apiKey") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + } + ) @Delete(uri="/pet/{petId}") @Produces(value = {}) public Mono deletePet( @@ -104,21 +115,23 @@ public class PetController { * @param status Status values that need to be considered for filter (required) * @return List<Pet> */ - @ApiOperation( - value = "Finds Pets by status", - nickname = "findPetsByStatus", - notes = "Multiple status values can be provided with comma separated strings", - response = Pet.class, - responseContainer = "array", - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "findPetsByStatus", + summary = "Finds Pets by status", + 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 status value") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), - @ApiResponse(code = 400, message = "Invalid status value")}) + parameters = { + @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "read:pets" }) + } + ) @Get(uri="/pet/findByStatus") @Produces(value = {"application/xml", "application/json"}) public Mono> findPetsByStatus( @@ -136,21 +149,23 @@ public class PetController { * @param tags Tags to filter by (required) * @return List<Pet> */ - @ApiOperation( - value = "Finds Pets by tags", - nickname = "findPetsByTags", - notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - response = Pet.class, - responseContainer = "array", - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "findPetsByTags", + summary = "Finds Pets by tags", + 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 tag value") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "array"), - @ApiResponse(code = 400, message = "Invalid tag value")}) + parameters = { + @Parameter(name = "tags", description = "Tags to filter by", required = true) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "read:pets" }) + } + ) @Get(uri="/pet/findByTags") @Produces(value = {"application/xml", "application/json"}) public Mono> findPetsByTags( @@ -168,19 +183,24 @@ public class PetController { * @param petId ID of pet to return (required) * @return Pet */ - @ApiOperation( - value = "Find pet by ID", - nickname = "getPetById", - notes = "Returns a single pet", - response = Pet.class, - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "getPetById", + summary = "Find pet by ID", + 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") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found")}) + parameters = { + @Parameter(name = "petId", description = "ID of pet to return", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Get(uri="/pet/{petId}") @Produces(value = {"application/xml", "application/json"}) public Mono getPetById( @@ -198,23 +218,25 @@ public class PetController { * @param pet Pet object that needs to be added to the store (required) * @return Pet */ - @ApiOperation( - value = "Update an existing pet", - nickname = "updatePet", - notes = "", - response = Pet.class, - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "updatePet", + summary = "Update an existing 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") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Pet not found"), - @ApiResponse(code = 405, message = "Validation exception")}) + parameters = { + @Parameter(name = "pet", description = "Pet object that needs to be added to the store", required = true) + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + } + ) @Put(uri="/pet") @Produces(value = {"application/xml", "application/json"}) @Consumes(value = {"application/json", "application/xml"}) @@ -234,19 +256,21 @@ public class PetController { * @param name Updated name of the pet (optional) * @param status Updated status of the pet (optional) */ - @ApiOperation( - value = "Updates a pet in the store with form data", - nickname = "updatePetWithForm", - notes = "", - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") - }) + @Operation( + operationId = "updatePetWithForm", + summary = "Updates a pet in the store with form data", + responses = { + @ApiResponse(responseCode = "405", description = "Invalid input") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 405, message = "Invalid input")}) + parameters = { + @Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true), + @Parameter(name = "name", description = "Updated name of the pet"), + @Parameter(name = "status", description = "Updated status of the pet") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + } + ) @Post(uri="/pet/{petId}") @Produces(value = {}) @Consumes(value = {"application/x-www-form-urlencoded"}) @@ -269,20 +293,23 @@ public class PetController { * @param _file file to upload (optional) * @return ModelApiResponse */ - @ApiOperation( - value = "uploads an image", - nickname = "uploadFile", - notes = "", - response = ModelApiResponse.class, - authorizations = { - @Authorization(value = "petstore_auth", scopes = { - @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @AuthorizationScope(scope = "read:pets", description = "read your pets") + @Operation( + operationId = "uploadFile", + summary = "uploads an image", + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class)) }) }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)}) + parameters = { + @Parameter(name = "petId", description = "ID of pet to update", required = true), + @Parameter(name = "additionalMetadata", description = "Additional data to pass to server"), + @Parameter(name = "_file", description = "file to upload") + }, + security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) + } + ) @Post(uri="/pet/{petId}/uploadImage") @Produces(value = {"application/json"}) @Consumes(value = {"multipart/form-data"}) diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java index fdb2469c3ea..406b780b5a9 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java @@ -26,10 +26,18 @@ import java.util.List; import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; -import io.swagger.annotations.*; +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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; @Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") @Controller +@Tag(name = "Store", description = "The Store API") public class StoreController { /** * Delete purchase order by ID @@ -37,15 +45,17 @@ public class StoreController { * * @param orderId ID of the order that needs to be deleted (required) */ - @ApiOperation( - value = "Delete purchase order by ID", - nickname = "deleteOrder", - notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - authorizations = {}, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found")}) + @Operation( + operationId = "deleteOrder", + summary = "Delete purchase order by ID", + responses = { + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") + }, + parameters = { + @Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) + } + ) @Delete(uri="/store/order/{orderId}") @Produces(value = {}) public Mono deleteOrder( @@ -62,18 +72,18 @@ public class StoreController { * * @return Map<String, Integer> */ - @ApiOperation( - value = "Returns pet inventories by status", - nickname = "getInventory", - notes = "Returns a map of status codes to quantities", - response = Integer.class, - responseContainer = "map", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "getInventory", + summary = "Returns pet inventories by status", + responses = { + @ApiResponse(responseCode = "200", description = "successful operation", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + }) }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "map")}) + security = { + @SecurityRequirement(name = "api_key") + } + ) @Get(uri="/store/inventory") @Produces(value = {"application/json"}) public Mono> getInventory() { @@ -89,17 +99,21 @@ public class StoreController { * @param orderId ID of pet that needs to be fetched (required) * @return Order */ - @ApiOperation( - value = "Find purchase order by ID", - nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - response = Order.class, - authorizations = {}, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid ID supplied"), - @ApiResponse(code = 404, message = "Order not found")}) + @Operation( + operationId = "getOrderById", + summary = "Find purchase order by ID", + 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") + }, + parameters = { + @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) + } + ) @Get(uri="/store/order/{orderId}") @Produces(value = {"application/xml", "application/json"}) public Mono getOrderById( @@ -117,16 +131,20 @@ public class StoreController { * @param order order placed for purchasing the pet (required) * @return Order */ - @ApiOperation( - value = "Place an order for a pet", - nickname = "placeOrder", - notes = "", - response = Order.class, - authorizations = {}, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Order.class), - @ApiResponse(code = 400, message = "Invalid Order")}) + @Operation( + operationId = "placeOrder", + summary = "Place an order for a pet", + 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") + }, + parameters = { + @Parameter(name = "order", description = "order placed for purchasing the pet", required = true) + } + ) @Post(uri="/store/order") @Produces(value = {"application/xml", "application/json"}) @Consumes(value = {"application/json"}) diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java index 39a8061982a..2f97208d1a7 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/UserController.java @@ -27,10 +27,18 @@ import java.util.List; import java.util.Map; import javax.validation.Valid; import javax.validation.constraints.*; -import io.swagger.annotations.*; +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.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; @Generated(value="org.openapitools.codegen.languages.JavaMicronautServerCodegen") @Controller +@Tag(name = "User", description = "The User API") public class UserController { /** * Create user @@ -38,16 +46,19 @@ public class UserController { * * @param user Created user object (required) */ - @ApiOperation( - value = "Create user", - nickname = "createUser", - notes = "This can only be done by the logged in user.", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "createUser", + summary = "Create user", + responses = { + @ApiResponse(responseCode = "0", description = "successful operation") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 0, message = "successful operation")}) + parameters = { + @Parameter(name = "user", description = "Created user object", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Post(uri="/user") @Produces(value = {}) @Consumes(value = {"application/json"}) @@ -65,16 +76,19 @@ public class UserController { * * @param user List of user object (required) */ - @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithArrayInput", - notes = "", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "createUsersWithArrayInput", + summary = "Creates list of users with given input array", + responses = { + @ApiResponse(responseCode = "0", description = "successful operation") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 0, message = "successful operation")}) + parameters = { + @Parameter(name = "user", description = "List of user object", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Post(uri="/user/createWithArray") @Produces(value = {}) @Consumes(value = {"application/json"}) @@ -92,16 +106,19 @@ public class UserController { * * @param user List of user object (required) */ - @ApiOperation( - value = "Creates list of users with given input array", - nickname = "createUsersWithListInput", - notes = "", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "createUsersWithListInput", + summary = "Creates list of users with given input array", + responses = { + @ApiResponse(responseCode = "0", description = "successful operation") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 0, message = "successful operation")}) + parameters = { + @Parameter(name = "user", description = "List of user object", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Post(uri="/user/createWithList") @Produces(value = {}) @Consumes(value = {"application/json"}) @@ -119,17 +136,20 @@ public class UserController { * * @param username The name that needs to be deleted (required) */ - @ApiOperation( - value = "Delete user", - nickname = "deleteUser", - notes = "This can only be done by the logged in user.", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "deleteUser", + summary = "Delete user", + responses = { + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found")}) + parameters = { + @Parameter(name = "username", description = "The name that needs to be deleted", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Delete(uri="/user/{username}") @Produces(value = {}) public Mono deleteUser( @@ -147,17 +167,21 @@ public class UserController { * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return User */ - @ApiOperation( - value = "Get user by user name", - nickname = "getUserByName", - notes = "", - response = User.class, - authorizations = {}, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = User.class), - @ApiResponse(code = 400, message = "Invalid username supplied"), - @ApiResponse(code = 404, message = "User not found")}) + @Operation( + operationId = "getUserByName", + summary = "Get user by user name", + 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") + }, + parameters = { + @Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) + } + ) @Get(uri="/user/{username}") @Produces(value = {"application/xml", "application/json"}) public Mono getUserByName( @@ -176,16 +200,21 @@ public class UserController { * @param password The password for login in clear text (required) * @return String */ - @ApiOperation( - value = "Logs user into the system", - nickname = "loginUser", - notes = "", - response = String.class, - authorizations = {}, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = String.class), - @ApiResponse(code = 400, message = "Invalid username/password supplied")}) + @Operation( + operationId = "loginUser", + summary = "Logs user into the system", + 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") + }, + parameters = { + @Parameter(name = "username", description = "The user name for login", required = true), + @Parameter(name = "password", description = "The password for login in clear text", required = true) + } + ) @Get(uri="/user/login") @Produces(value = {"application/xml", "application/json"}) public Mono loginUser( @@ -202,16 +231,16 @@ public class UserController { * * */ - @ApiOperation( - value = "Logs out current logged in user session", - nickname = "logoutUser", - notes = "", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "logoutUser", + summary = "Logs out current logged in user session", + responses = { + @ApiResponse(responseCode = "0", description = "successful operation") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 0, message = "successful operation")}) + security = { + @SecurityRequirement(name = "api_key") + } + ) @Get(uri="/user/logout") @Produces(value = {}) public Mono logoutUser() { @@ -227,17 +256,21 @@ public class UserController { * @param username name that need to be deleted (required) * @param user Updated user object (required) */ - @ApiOperation( - value = "Updated user", - nickname = "updateUser", - notes = "This can only be done by the logged in user.", - authorizations = { - @Authorization(value = "api_key") + @Operation( + operationId = "updateUser", + summary = "Updated user", + responses = { + @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") }, - tags={}) - @ApiResponses(value = { - @ApiResponse(code = 400, message = "Invalid user supplied"), - @ApiResponse(code = 404, message = "User not found")}) + parameters = { + @Parameter(name = "username", description = "name that need to be deleted", required = true), + @Parameter(name = "user", description = "Updated user object", required = true) + }, + security = { + @SecurityRequirement(name = "api_key") + } + ) @Put(uri="/user/{username}") @Produces(value = {}) @Consumes(value = {"application/json"}) diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java index 2ce23e2fd2d..9bfa4b7c9b4 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Category.java @@ -14,19 +14,18 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * A category for a pet */ -@ApiModel(description = "A category for a pet") +@Schema(name = "Category", description = "A category for a pet") @JsonPropertyOrder({ Category.JSON_PROPERTY_ID, Category.JSON_PROPERTY_NAME @@ -54,7 +53,7 @@ public class Category { * @return id **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "id", required = false) @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -63,7 +62,7 @@ public class Category { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -78,7 +77,7 @@ public class Category { **/ @Nullable @Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") - @ApiModelProperty(value = "") + @Schema(name = "name", required = false) @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -87,7 +86,7 @@ public class Category { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java index 27bb4944272..fe1b67499eb 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/ModelApiResponse.java @@ -15,19 +15,18 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * Describes the result of uploading an image resource */ -@ApiModel(description = "Describes the result of uploading an image resource") +@Schema(name = "ApiResponse", description = "Describes the result of uploading an image resource") @JsonPropertyOrder({ ModelApiResponse.JSON_PROPERTY_CODE, ModelApiResponse.JSON_PROPERTY_TYPE, @@ -59,7 +58,7 @@ public class ModelApiResponse { * @return code **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "code", required = false) @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getCode() { @@ -68,7 +67,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCode(Integer code) { + public void setCode(Integer code) { this.code = code; } @@ -82,7 +81,7 @@ public class ModelApiResponse { * @return type **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "type", required = false) @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getType() { @@ -91,7 +90,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(String type) { this.type = type; } @@ -105,7 +104,7 @@ public class ModelApiResponse { * @return message **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "message", required = false) @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getMessage() { @@ -114,7 +113,7 @@ public class ModelApiResponse { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(String message) { this.message = message; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java index 433ead3daa8..7594d35deea 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Order.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; import com.fasterxml.jackson.annotation.*; @@ -23,11 +21,12 @@ import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * An order for a pets from the pet store */ -@ApiModel(description = "An order for a pets from the pet store") +@Schema(name = "Order", description = "An order for a pets from the pet store") @JsonPropertyOrder({ Order.JSON_PROPERTY_ID, Order.JSON_PROPERTY_PET_ID, @@ -105,7 +104,7 @@ public class Order { * @return id **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "id", required = false) @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -114,7 +113,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -128,7 +127,7 @@ public class Order { * @return petId **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "petId", required = false) @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getPetId() { @@ -137,7 +136,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_PET_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetId(Long petId) { + public void setPetId(Long petId) { this.petId = petId; } @@ -151,7 +150,7 @@ public class Order { * @return quantity **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "quantity", required = false) @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getQuantity() { @@ -160,7 +159,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_QUANTITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(Integer quantity) { + public void setQuantity(Integer quantity) { this.quantity = quantity; } @@ -174,7 +173,7 @@ public class Order { * @return shipDate **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "shipDate", required = false) @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") @@ -185,7 +184,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_SHIP_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXX") - public void setShipDate(OffsetDateTime shipDate) { + public void setShipDate(OffsetDateTime shipDate) { this.shipDate = shipDate; } @@ -199,7 +198,7 @@ public class Order { * @return status **/ @Nullable - @ApiModelProperty(value = "Order Status") + @Schema(name = "status", description = "Order Status", required = false) @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -208,7 +207,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { + public void setStatus(StatusEnum status) { this.status = status; } @@ -222,7 +221,7 @@ public class Order { * @return complete **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "complete", required = false) @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getComplete() { @@ -231,7 +230,7 @@ public class Order { @JsonProperty(JSON_PROPERTY_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setComplete(Boolean complete) { + public void setComplete(Boolean complete) { this.complete = complete; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java index 275427ed8d3..1a4b66d3350 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Pet.java @@ -14,8 +14,6 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; import org.openapitools.model.Category; @@ -26,11 +24,12 @@ import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * A pet for sale in the pet store */ -@ApiModel(description = "A pet for sale in the pet store") +@Schema(name = "Pet", description = "A pet for sale in the pet store") @JsonPropertyOrder({ Pet.JSON_PROPERTY_ID, Pet.JSON_PROPERTY_CATEGORY, @@ -110,7 +109,7 @@ public class Pet { * @return id **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "id", required = false) @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -119,7 +118,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -134,7 +133,7 @@ public class Pet { **/ @Valid @Nullable - @ApiModelProperty(value = "") + @Schema(name = "category", required = false) @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Category getCategory() { @@ -143,7 +142,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCategory(Category category) { + public void setCategory(Category category) { this.category = category; } @@ -157,7 +156,7 @@ public class Pet { * @return name **/ @NotNull - @ApiModelProperty(example = "doggie", required = true, value = "") + @Schema(name = "name", example = "doggie", required = true) @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { @@ -166,7 +165,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(String name) { this.name = name; } @@ -185,7 +184,7 @@ public class Pet { * @return photoUrls **/ @NotNull - @ApiModelProperty(required = true, value = "") + @Schema(name = "photoUrls", required = true) @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getPhotoUrls() { @@ -194,7 +193,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -216,7 +215,7 @@ public class Pet { * @return tags **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "tags", required = false) @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getTags() { @@ -225,7 +224,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTags(List tags) { + public void setTags(List tags) { this.tags = tags; } @@ -239,7 +238,7 @@ public class Pet { * @return status **/ @Nullable - @ApiModelProperty(value = "pet status in the store") + @Schema(name = "status", description = "pet status in the store", required = false) @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public StatusEnum getStatus() { @@ -248,7 +247,7 @@ public class Pet { @JsonProperty(JSON_PROPERTY_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { + public void setStatus(StatusEnum status) { this.status = status; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java index 248b99114ef..b94c645596e 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/Tag.java @@ -14,19 +14,18 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * A tag for a pet */ -@ApiModel(description = "A tag for a pet") +@Schema(name = "Tag", description = "A tag for a pet") @JsonPropertyOrder({ Tag.JSON_PROPERTY_ID, Tag.JSON_PROPERTY_NAME @@ -54,7 +53,7 @@ public class Tag { * @return id **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "id", required = false) @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -63,7 +62,7 @@ public class Tag { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -77,7 +76,7 @@ public class Tag { * @return name **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "name", required = false) @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { @@ -86,7 +85,7 @@ public class Tag { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(String name) { this.name = name; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java index d696c046a1e..17cf05d120b 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/model/User.java @@ -14,19 +14,18 @@ package org.openapitools.model; import java.util.Objects; import java.util.Arrays; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.*; import javax.validation.constraints.*; import javax.validation.Valid; import io.micronaut.core.annotation.*; import javax.annotation.Generated; +import io.swagger.v3.oas.annotations.media.Schema; /** * A User who is purchasing from the pet store */ -@ApiModel(description = "A User who is purchasing from the pet store") +@Schema(name = "User", description = "A User who is purchasing from the pet store") @JsonPropertyOrder({ User.JSON_PROPERTY_ID, User.JSON_PROPERTY_USERNAME, @@ -78,7 +77,7 @@ public class User { * @return id **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "id", required = false) @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getId() { @@ -87,7 +86,7 @@ public class User { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { + public void setId(Long id) { this.id = id; } @@ -101,7 +100,7 @@ public class User { * @return username **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "username", required = false) @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getUsername() { @@ -110,7 +109,7 @@ public class User { @JsonProperty(JSON_PROPERTY_USERNAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsername(String username) { + public void setUsername(String username) { this.username = username; } @@ -124,7 +123,7 @@ public class User { * @return firstName **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "firstName", required = false) @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getFirstName() { @@ -133,7 +132,7 @@ public class User { @JsonProperty(JSON_PROPERTY_FIRST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstName(String firstName) { + public void setFirstName(String firstName) { this.firstName = firstName; } @@ -147,7 +146,7 @@ public class User { * @return lastName **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "lastName", required = false) @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getLastName() { @@ -156,7 +155,7 @@ public class User { @JsonProperty(JSON_PROPERTY_LAST_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastName(String lastName) { + public void setLastName(String lastName) { this.lastName = lastName; } @@ -170,7 +169,7 @@ public class User { * @return email **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "email", required = false) @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getEmail() { @@ -179,7 +178,7 @@ public class User { @JsonProperty(JSON_PROPERTY_EMAIL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmail(String email) { + public void setEmail(String email) { this.email = email; } @@ -193,7 +192,7 @@ public class User { * @return password **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "password", required = false) @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPassword() { @@ -202,7 +201,7 @@ public class User { @JsonProperty(JSON_PROPERTY_PASSWORD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPassword(String password) { + public void setPassword(String password) { this.password = password; } @@ -216,7 +215,7 @@ public class User { * @return phone **/ @Nullable - @ApiModelProperty(value = "") + @Schema(name = "phone", required = false) @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getPhone() { @@ -225,7 +224,7 @@ public class User { @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(String phone) { + public void setPhone(String phone) { this.phone = phone; } @@ -239,7 +238,7 @@ public class User { * @return userStatus **/ @Nullable - @ApiModelProperty(value = "User Status") + @Schema(name = "userStatus", description = "User Status", required = false) @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Integer getUserStatus() { @@ -248,7 +247,7 @@ public class User { @JsonProperty(JSON_PROPERTY_USER_STATUS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserStatus(Integer userStatus) { + public void setUserStatus(Integer userStatus) { this.userStatus = userStatus; } diff --git a/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml b/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml index dfac8f72902..be97fd4558d 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml +++ b/samples/server/petstore/java-micronaut-server/src/main/resources/application.yml @@ -1,18 +1,18 @@ micronaut: - application: - name: petstore-micronaut-server - server: - port: 8080 - context-path: "/v2" - security: - # authentication: bearer | cookie | session | idtoken + application: + name: petstore-micronaut-server + server: + port: 8080 + context-path: "/v2/" + security: + # authentication: bearer | cookie | session | idtoken jackson: - serialization: - writeEnumsUsingToString: true - writeDatesAsTimestamps: false - deserialization: - readEnumsUsingToString: true - failOnUnknownProperties: false - failOnInvalidSubtype: false + serialization: + writeEnumsUsingToString: true + writeDatesAsTimestamps: false + deserialization: + readEnumsUsingToString: true + failOnUnknownProperties: false + failOnInvalidSubtype: false diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy index 09ea5aea6bf..7001c6fb579 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/CategorySpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy index 11581554b2e..774c2c37c32 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/ModelApiResponseSpec.groovy @@ -1,7 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty +import com.fasterxml.jackson.annotation.JsonTypeName import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy index f49fd81a9a2..c5141d7506b 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/OrderSpec.groovy @@ -1,8 +1,6 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty -import java.time.LocalDateTime +import java.time.OffsetDateTime import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy index 87de485ec4b..3905df46f6e 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/PetSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import java.util.ArrayList import java.util.List import org.openapitools.model.Category diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy index 23208c3464b..20058bf4315 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/TagSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy index c3060a006bb..4b4bcec67fd 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/model/UserSpec.groovy @@ -1,7 +1,5 @@ package org.openapitools.model -import io.swagger.annotations.ApiModel -import io.swagger.annotations.ApiModelProperty import io.micronaut.test.extensions.spock.annotation.MicronautTest import spock.lang.Specification import jakarta.inject.Inject