partial fix

This commit is contained in:
William Cheng 2024-10-19 15:10:45 +08:00
parent 38dac13c26
commit 277b43bcea
9287 changed files with 38670 additions and 67381 deletions

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: mp
outputDir: samples/client/petstore/java-helidon-client/v3/mp
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/java-helidon/client
additionalProperties:
helidonVersion: 3.2.7
artifactId: petstore-helidon-client-mp

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: mp
outputDir: samples/client/petstore/java-helidon-client/v4/mp
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/java-helidon/client
additionalProperties:
helidonVersion: 4.0.11
artifactId: petstore-helidon-client-mp

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: se
outputDir: samples/client/petstore/java-helidon-client/v3/se
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/java-helidon/client
additionalProperties:
helidonVersion: 3.2.7
artifactId: petstore-helidon-client-se

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: se
outputDir: samples/client/petstore/java-helidon-client/v4/se
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/java-helidon/client
additionalProperties:
helidonVersion: 4.0.11
artifactId: petstore-helidon-client-se

View File

@ -1,6 +1,7 @@
generatorName: java-micronaut-client
outputDir: samples/client/petstore/java-micronaut-client/
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/java-micronaut/
additionalProperties:
artifactId: petstore-micronaut
hideGenerationTimestamp: "true"

View File

@ -1,6 +1,7 @@
generatorName: java-micronaut-server
outputDir: samples/server/petstore/java-micronaut-server/
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/java-micronaut/
additionalProperties:
artifactId: petstore-micronaut-server
hideGenerationTimestamp: "true"

View File

@ -20,7 +20,12 @@
{{/hasDiscriminatorWithNonEmptyMapping}}
{{/isClassnameSanitized}}
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -39,6 +44,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{>modelInnerEnum}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -73,6 +79,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}
{{>nullable_var_annotations}}
{{#isContainer}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}}
@ -191,6 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
{{#jsonb}}
@JsonbProperty("{{baseName}}")
{{/jsonb}}

View File

@ -23,7 +23,12 @@
@JsonTypeName("{{name}}")
{{/isClassnameSanitized}}
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -82,6 +87,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vendorExtensions.x-is-jackson-optional-nullable}}
@ -199,6 +205,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
@ -235,7 +242,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() {
return {{name}};
}
{{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}})
{{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
{{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}}

View File

@ -23,7 +23,12 @@
@JsonTypeName("{{name}}")
{{/isClassnameSanitized}}
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -44,6 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{>modelInnerEnum}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -82,6 +88,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vendorExtensions.x-is-jackson-optional-nullable}}
@ -199,6 +206,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
@ -215,7 +223,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}}
@JsonIgnore
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}
{{#jackson}}
{{> jackson_annotations}}
{{/jackson}}
{{/vendorExtensions.x-is-jackson-optional-nullable}}
public {{{datatypeWithEnum}}} {{getter}}() {
{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}}
@ -235,7 +247,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() {
return {{name}};
}
{{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}}
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{#vendorExtensions.x-is-jackson-optional-nullable}}
@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}})
{{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) {
{{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}}
@ -247,8 +260,15 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{#deprecated}}
@Deprecated
{{/deprecated}}
{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}}
{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) {
{{#vendorExtensions.x-setter-extra-annotation}}
{{{vendorExtensions.x-setter-extra-annotation}}}
{{/vendorExtensions.x-setter-extra-annotation}}
{{#jackson}}
{{^vendorExtensions.x-is-jackson-optional-nullable}}
{{> jackson_annotations}}
{{/vendorExtensions.x-is-jackson-optional-nullable}}
{{/jackson}}
public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) {
{{#vendorExtensions.x-enum-as-string}}
if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) {
throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES));
@ -288,11 +308,13 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
{{/useReflectionEqualsHashCode}}
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
}
{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}{{/vendorExtensions.x-jackson-optional-nullable-helpers}}
}
{{/vendorExtensions.x-jackson-optional-nullable-helpers}}
@Override
public int hashCode() {
@ -302,14 +324,16 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{^useReflectionEqualsHashCode}}
return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}{{#hasVars}}, {{/hasVars}}{{^hasVars}}{{#parent}}, {{/parent}}{{/hasVars}}additionalProperties{{/additionalPropertiesType}});
{{/useReflectionEqualsHashCode}}
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
}
{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
private static <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}{{/vendorExtensions.x-jackson-optional-nullable-helpers}}
}
{{/vendorExtensions.x-jackson-optional-nullable-helpers}}
@Override
public String toString() {

View File

@ -26,7 +26,12 @@ import {{invokerPackage}}.ApiClient;
{{/vars}}
})
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -47,6 +52,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{>modelInnerEnum}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";

View File

@ -25,7 +25,12 @@
{{/hasDiscriminatorWithNonEmptyMapping}}
{{/isClassnameSanitized}}
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
@ -44,6 +49,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{>modelInnerEnum}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -66,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}}
{{>nullable_var_annotations}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
@ -212,6 +219,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated
{{/deprecated}}
{{>nullable_var_annotations}}
{{#jsonb}}
@JsonbProperty("{{baseName}}")
{{/jsonb}}

View File

@ -1,5 +1,4 @@
{{#jackson}}
@JsonIgnoreProperties(
value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization

View File

@ -3,4 +3,6 @@
@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
@XmlAccessorType(XmlAccessType.FIELD)
{{#jackson}}
@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}"){{/jackson}}{{/withXml}}
@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
{{/jackson}}
{{/withXml}}

View File

@ -17,21 +17,35 @@ import com.fasterxml.jackson.annotation.JsonProperty;
{ {{#vars}}"{{name}}"{{^-last}}, {{/-last}}{{/vars}}
}){{/hasVars}}
{{^hasVars}}@XmlType(name = "{{classname}}"){{/hasVars}}
{{^parent}}@XmlRootElement(name="{{classname}}"){{/parent}}
{{^parent}}
@XmlRootElement(name="{{classname}}")
{{/parent}}
{{/withXml}}
{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{#description}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{#description}}
/**
* {{{description}}}
*/
@ApiModel(description="{{{description}}}")
{{/description}}{{>additionalModelTypeAnnotations}}
{{/description}}
{{>additionalModelTypeAnnotations}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}
public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#vars}}{{#isEnum}}{{^isContainer}}
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}}
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}}
{{#vars}}
{{#isEnum}}
{{^isContainer}}
{{>enumClass}}
{{/isContainer}}
{{#isContainer}}
{{#mostInnerItems}}
{{>enumClass}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#description}}
/**
* {{{.}}}

View File

@ -3,6 +3,10 @@
{{#hasVars}} @XmlType(name = "{{classname}}", propOrder =
{ {{#vars}}"{{name}}"{{^-last}}, {{/-last}}{{/vars}}
}){{/hasVars}}
{{^hasVars}}@XmlType(name = "{{classname}}"){{/hasVars}}
{{^parent}}@XmlRootElement(name="{{classname}}"){{/parent}}
{{^hasVars}}
@XmlType(name = "{{classname}}")
{{/hasVars}}
{{^parent}}
@XmlRootElement(name="{{classname}}")
{{/parent}}
{{/withXml}}

View File

@ -9,7 +9,11 @@
{{/vars}}
})
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}

View File

@ -9,7 +9,11 @@
{{/vars}}
})
{{/jackson}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}}

View File

@ -42,3 +42,4 @@
{{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}

View File

@ -6,7 +6,8 @@ import {{javaxPackage}}.validation.Valid;
/**
* {{description}}{{^description}}{{classname}}{{/description}}
*/
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
{{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}}
@ -33,15 +34,11 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtens
{{{vendorExtensions.x-field-extra-annotation}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{/isContainer}}
{{^isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}}

View File

@ -3,4 +3,5 @@
@JacksonXmlRootElement({{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
{{/jackson}}
@XmlRootElement({{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
@XmlAccessorType(XmlAccessType.FIELD){{/withXml}}
@XmlAccessorType(XmlAccessType.FIELD)
{{/withXml}}

View File

@ -27,7 +27,11 @@ using {{packageName}}.Converters;
{{#models}}
{{#model}}
namespace {{modelPackage}}
{ {{#isEnum}}{{>enumClass}}{{/isEnum}}{{^isEnum}}
{
{{#isEnum}}
{{>enumClass}}
{{/isEnum}}
{{^isEnum}}
/// <summary>
/// {{description}}
/// </summary>
@ -60,6 +64,7 @@ namespace {{modelPackage}}
{{^complexType}}
{{>enumClass}}
{{/complexType}}
{{/isEnum}}
/// <summary>
/// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}}

View File

@ -8,3 +8,4 @@
{{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}}this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{.}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},
{{/vars}}
});

View File

@ -1 +1,2 @@
{{#pubLibrary}}part of {{{.}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}}

View File

@ -223,7 +223,9 @@ public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}
{{>beanValidation}}
{{/useBeanValidation}}
{{^useBeanValidation}}
{{#required}}@NotNull{{/required}}
{{#required}}
@NotNull
{{/required}}
{{/useBeanValidation}}
{{#swagger2AnnotationLibrary}}
@Schema(name = "{{{baseName}}}"{{#isReadOnly}}, accessMode = Schema.AccessMode.READ_ONLY{{/isReadOnly}}{{#example}}, example = "{{{.}}}"{{/example}}{{#description}}, description = "{{{.}}}"{{/description}}{{#deprecated}}, deprecated = true{{/deprecated}}, requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}})

View File

@ -1,4 +1,7 @@
{{>additionalOneOfTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}}
{{>additionalOneOfTypeAnnotations}}
{{>generatedAnnotation}}
{{>typeInfoAnnotation}}
{{>xmlAnnotation}}
public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#discriminator}}
public {{propertyType}} {{propertyGetter}}();

View File

@ -46,3 +46,4 @@
{{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}}
}
}

View File

@ -60,3 +60,4 @@
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
}
}

View File

@ -23,7 +23,12 @@
{{#additionalModelTypeAnnotations}}
{{{.}}}
{{/additionalModelTypeAnnotations}}
{{>common/generatedAnnotation}}{{#discriminator}}{{>common/model/typeInfoAnnotation}}{{/discriminator}}{{>common/model/xmlAnnotation}}{{#useBeanValidation}}
{{>common/generatedAnnotation}}
{{#discriminator}}
{{>common/model/typeInfoAnnotation}}
{{/discriminator}}
{{>common/model/xmlAnnotation}}
{{#useBeanValidation}}
@Introspected
{{/useBeanValidation}}
{{#vendorExtensions.x-class-extra-annotation}}

View File

@ -1,8 +1,11 @@
/**
* {{description}}{{^description}}{{classname}}{{/description}}
*/{{#description}}
@ApiModel(description = "{{{.}}}"){{/description}}
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}
*/
{{#description}}
@ApiModel(description = "{{{.}}}")
{{/description}}
{{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#vars}}
{{#isEnum}}

View File

@ -2,8 +2,15 @@
* {{description}}{{^description}}{{classname}}{{/description}}
*/{{#description}}
@ApiModel(description = "{{{.}}}"){{/description}}
{{#useBeanValidation}}@Validated{{/useBeanValidation}}
{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}}{{>additionalModelTypeAnnotations}}
{{#useBeanValidation}}
@Validated
{{/useBeanValidation}}
{{>generatedAnnotation}}
{{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{>xmlAnnotation}}
{{>additionalModelTypeAnnotations}}
public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#serializableModel}}
private static final long serialVersionUID = 1L;

View File

@ -3,4 +3,5 @@
@JacksonXmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
{{/jackson}}
@XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
@XmlAccessorType(XmlAccessType.FIELD){{/withXml}}
@XmlAccessorType(XmlAccessType.FIELD)
{{/withXml}}

View File

@ -1,5 +1,10 @@
{{#swagger2AnnotationLibrary}}
@get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
@get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}{{/vendorExtensions.x-field-extra-annotation}}
@get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}")\
{{/swagger2AnnotationLibrary}}
{{#swagger1AnnotationLibrary}}
@get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}")
{{/swagger1AnnotationLibrary}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}?{{^discriminator}} = {{{defaultValue}}}{{^defaultValue}}null{{/defaultValue}}{{/discriminator}}

View File

@ -1,5 +1,10 @@
{{#swagger2AnnotationLibrary}}
@get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
@get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}{{/vendorExtensions.x-field-extra-annotation}}
@get:Schema({{#example}}example = "{{{.}}}", {{/example}}{{#required}}requiredMode = Schema.RequiredMode.REQUIRED, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}")
{{/swagger2AnnotationLibrary}}
{{#swagger1AnnotationLibrary}}
@get:ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}")
{{/swagger1AnnotationLibrary}}
{{#vendorExtensions.x-field-extra-annotation}}
{{{.}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInPascalCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}

View File

@ -107,3 +107,4 @@
{{/bodyParam}}
{{/x-consumes-basic}}
{{/vendorExtensions}}

View File

@ -63,3 +63,4 @@
Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", multipart_header, e)))
});

View File

@ -20,3 +20,4 @@
{{/x-produces-plain-text}}
{{/x-produces-bytes}}
{{/vendorExtensions}}

View File

@ -74,3 +74,4 @@ let param_{{{paramName}}} = match param_{{{paramName}}} {
{{/formParams}}
};
{{/vendorExtensions.x-consumes-basic}}

View File

@ -16,3 +16,4 @@
info!("{{#vendorExtensions}}{{{x-operation-id}}}{{/vendorExtensions}}({{#allParams}}{{#vendorExtensions}}{{{x-format-string}}}{{/vendorExtensions}}{{^-last}}, {{/-last}}{{/allParams}}) - X-Span-ID: {:?}"{{#allParams}}, {{{paramName}}}{{/allParams}}, context.get().0.clone());
Err(ApiError("Api-Error: Operation is NOT implemented".into()))
}

View File

@ -37,3 +37,4 @@
write_multipart(&mut body, &boundary, &body_parts)
.expect("Failed to write multipart body");
{{/-last}}

View File

@ -58,3 +58,4 @@ pub enum {{{operationId}}}Response {
{{/-last}}
{{/responses}}
}

View File

@ -58,3 +58,4 @@ impl<T, C, Target> hyper::service::Service<Target> for MakeService<T, C> where
future::ok(service)
}
}

View File

@ -316,3 +316,4 @@
}
{{/vendorExtensions.x-has-request-body}}
},

View File

@ -21,3 +21,4 @@ mod paths {
{{/hasPathParams}}
{{/pathSet}}
}

View File

@ -50,3 +50,4 @@
.expect("Unable to create Bad Request response for missing body parameter {{{baseName}}}")),
};
{{/required}}

View File

@ -22,3 +22,4 @@
{{/isMap}}
{{/formParams}}
{{/vendorExtensions}}

View File

@ -18,3 +18,4 @@
{{/bodyParams}}
{{/x-consumes-multipart}}
{{/vendorExtensions}}

View File

@ -84,3 +84,4 @@
};
{{/required}}
{{/formParams}}

View File

@ -48,3 +48,4 @@
{{/vendorExtensions}}
*response.body_mut() = Body::from(body);
{{/dataType}}

View File

@ -92,3 +92,4 @@ impl<T, C> hyper::service::Service<(Request<Body>, C)> for Service<T, C> where
Please update both places if changing how this code is autogenerated.
}}
match method {

View File

@ -1,6 +1 @@
{{^authName}}
delegate.{{operationId}}.handle(req, {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses)
{{/authName}}
{{#authName}}
delegate.{{operationId}}.handle_{{authName}}(auth, req, {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses)
{{/authName}}
{{^authName}}delegate.{{operationId}}.handle(req, {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses){{/authName}}{{#authName}}delegate.{{operationId}}.handle_{{authName}}(auth, req, {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses){{/authName}}

View File

@ -1,6 +1 @@
{{^authName}}
delegate.{{operationId}}.handle(req, req.asJsonDecode[{{{bodyParam.dataType}}}] , {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses)
{{/authName}}
{{#authName}}
delegate.{{operationId}}.handle_{{authName}}(auth, req, req.asJsonDecode[{{{bodyParam.dataType}}}] , {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses)
{{/authName}}
{{^authName}}delegate.{{operationId}}.handle(req, req.asJsonDecode[{{{bodyParam.dataType}}}] , {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses){{/authName}}{{#authName}}delegate.{{operationId}}.handle_{{authName}}(auth, req, req.asJsonDecode[{{{bodyParam.dataType}}}] , {{#pathParams}}{{baseName}}, {{/pathParams}}{{#queryParams}}{{baseName}}, {{/queryParams}}responses){{/authName}}

View File

@ -1227,7 +1227,7 @@
<jackson-threetenbp.version>2.15.2</jackson-threetenbp.version>
<jackson.version>2.17.1</jackson.version>
<jacoco.version>0.8.10</jacoco.version>
<jmustache.version>1.15</jmustache.version>
<jmustache.version>1.16</jmustache.version>
<junit.version>5.10.2</junit.version>
<kotlin.version>1.6.21</kotlin.version>
<kotlin-compiler-embeddable.version>1.6.21</kotlin-compiler-embeddable.version>

View File

@ -141,7 +141,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -143,7 +143,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -182,7 +182,6 @@ namespace Org.OpenAPITools.Model
yield return x;
}
yield break;
}
}
} }
}

View File

@ -56,7 +56,6 @@ namespace Org.OpenAPITools.Model
[EnumMember(Value = "unclassified")]
Unclassified = 3
}
/// <summary>
/// Initializes a new instance of the <see cref="DefaultValue" /> class.
/// </summary>
@ -281,7 +280,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -159,7 +159,6 @@ namespace Org.OpenAPITools.Model
}
yield break;
}
}
} }
}

View File

@ -58,7 +58,6 @@ namespace Org.OpenAPITools.Model
Sold = 3
}
/// <summary>
/// pet status in the store
/// </summary>
@ -255,7 +254,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -56,7 +56,6 @@ namespace Org.OpenAPITools.Model
[EnumMember(Value = "SKIPPED")]
SKIPPED = 3
}
/// <summary>
/// Initializes a new instance of the <see cref="Query" /> class.
/// </summary>
@ -164,7 +163,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -137,7 +137,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -123,7 +123,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -179,7 +179,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -124,7 +124,6 @@ namespace Org.OpenAPITools.Model
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
} }
}

View File

@ -160,4 +160,3 @@ func (v *NullableBird) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -160,4 +160,3 @@ func (v *NullableCategory) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -209,4 +209,3 @@ func (v *NullableDataQuery) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -388,4 +388,3 @@ func (v *NullableDefaultValue) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -196,4 +196,3 @@ func (v *NullableNumberPropertiesOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -329,4 +329,3 @@ func (v *NullablePet) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -161,4 +161,3 @@ func (v *NullableQuery) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -111,4 +111,3 @@ func (v *NullableStringEnumRef) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -160,4 +160,3 @@ func (v *NullableTag) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -232,4 +232,3 @@ func (v *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParame
return json.Unmarshal(src, &v.value)
}

View File

@ -124,4 +124,3 @@ func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) U
return json.Unmarshal(src, &v.value)
}

View File

@ -160,4 +160,3 @@ func (v *NullableBird) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -160,4 +160,3 @@ func (v *NullableCategory) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -209,4 +209,3 @@ func (v *NullableDataQuery) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -388,4 +388,3 @@ func (v *NullableDefaultValue) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -196,4 +196,3 @@ func (v *NullableNumberPropertiesOnly) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -329,4 +329,3 @@ func (v *NullablePet) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -161,4 +161,3 @@ func (v *NullableQuery) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -111,4 +111,3 @@ func (v *NullableStringEnumRef) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -160,4 +160,3 @@ func (v *NullableTag) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value)
}

View File

@ -124,4 +124,3 @@ func (v *NullableTestFormObjectMultipartRequestMarker) UnmarshalJSON(src []byte)
return json.Unmarshal(src, &v.value)
}

View File

@ -232,4 +232,3 @@ func (v *NullableTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParame
return json.Unmarshal(src, &v.value)
}

View File

@ -124,4 +124,3 @@ func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) U
return json.Unmarshal(src, &v.value)
}

View File

@ -34,14 +34,13 @@ import java.util.StringJoiner;
Bird.JSON_PROPERTY_COLOR
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class Bird {
public static final String JSON_PROPERTY_SIZE = "size";
@javax.annotation.Nullable
private String size;
@javax.annotation.Nullable private String size;
public static final String JSON_PROPERTY_COLOR = "color";
@javax.annotation.Nullable
private String color;
@javax.annotation.Nullable private String color;
public Bird() {
}
@ -56,8 +55,7 @@ public class Bird {
* Get size
* @return size
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SIZE)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSize() {
@ -81,8 +79,7 @@ public class Bird {
* Get color
* @return color
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COLOR)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() {

View File

@ -34,14 +34,13 @@ import java.util.StringJoiner;
Category.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class Category {
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
private Long id;
@javax.annotation.Nullable private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nullable
private String name;
@javax.annotation.Nullable private String name;
public Category() {
}
@ -56,8 +55,7 @@ public class Category {
* Get id
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
@ -81,8 +79,7 @@ public class Category {
* Get name
* @return name
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {

View File

@ -40,18 +40,16 @@ import java.util.StringJoiner;
DataQuery.JSON_PROPERTY_DATE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class DataQuery extends Query {
public static final String JSON_PROPERTY_SUFFIX = "suffix";
@javax.annotation.Nullable
private String suffix;
@javax.annotation.Nullable private String suffix;
public static final String JSON_PROPERTY_TEXT = "text";
@javax.annotation.Nullable
private String text;
@javax.annotation.Nullable private String text;
public static final String JSON_PROPERTY_DATE = "date";
@javax.annotation.Nullable
private OffsetDateTime date;
@javax.annotation.Nullable private OffsetDateTime date;
public DataQuery() {
@ -67,8 +65,7 @@ public class DataQuery extends Query {
* test suffix
* @return suffix
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUFFIX)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUFFIX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSuffix() {
@ -92,8 +89,7 @@ public class DataQuery extends Query {
* Some text containing white spaces
* @return text
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TEXT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getText() {
@ -117,8 +113,7 @@ public class DataQuery extends Query {
* A date
* @return date
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DATE)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDate() {

View File

@ -48,10 +48,10 @@ import java.util.StringJoiner;
DefaultValue.JSON_PROPERTY_STRING_NULLABLE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class DefaultValue {
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT = "array_string_enum_ref_default";
@javax.annotation.Nullable
private List<StringEnumRef> arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE));
@javax.annotation.Nullable private List<StringEnumRef> arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE));
/**
* Gets or Sets arrayStringEnumDefault
@ -89,34 +89,26 @@ public class DefaultValue {
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT = "array_string_enum_default";
@javax.annotation.Nullable
private List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE));
@javax.annotation.Nullable private List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE));
public static final String JSON_PROPERTY_ARRAY_STRING_DEFAULT = "array_string_default";
@javax.annotation.Nullable
private List<String> arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped"));
@javax.annotation.Nullable private List<String> arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped"));
public static final String JSON_PROPERTY_ARRAY_INTEGER_DEFAULT = "array_integer_default";
@javax.annotation.Nullable
private List<Integer> arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3));
@javax.annotation.Nullable private List<Integer> arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3));
public static final String JSON_PROPERTY_ARRAY_STRING = "array_string";
@javax.annotation.Nullable
private List<String> arrayString = new ArrayList<>();
@javax.annotation.Nullable private List<String> arrayString = new ArrayList<>();
public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable";
@javax.annotation.Nullable
private JsonNullable<List<String>> arrayStringNullable = JsonNullable.<List<String>>undefined();
@javax.annotation.Nullable private JsonNullable<List<String>> arrayStringNullable = JsonNullable.<List<String>>undefined();
public static final String JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE = "array_string_extension_nullable";
@javax.annotation.Nullable
private JsonNullable<List<String>> arrayStringExtensionNullable = JsonNullable.<List<String>>undefined();
@javax.annotation.Nullable private JsonNullable<List<String>> arrayStringExtensionNullable = JsonNullable.<List<String>>undefined();
public static final String JSON_PROPERTY_STRING_NULLABLE = "string_nullable";
@javax.annotation.Nullable
private JsonNullable<String> stringNullable = JsonNullable.<String>undefined();
@javax.annotation.Nullable private JsonNullable<String> stringNullable = JsonNullable.<String>undefined();
public DefaultValue() {
}
@ -139,8 +131,7 @@ public class DefaultValue {
* Get arrayStringEnumRefDefault
* @return arrayStringEnumRefDefault
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<StringEnumRef> getArrayStringEnumRefDefault() {
@ -172,8 +163,7 @@ public class DefaultValue {
* Get arrayStringEnumDefault
* @return arrayStringEnumDefault
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ArrayStringEnumDefaultEnum> getArrayStringEnumDefault() {
@ -205,8 +195,7 @@ public class DefaultValue {
* Get arrayStringDefault
* @return arrayStringDefault
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayStringDefault() {
@ -238,8 +227,7 @@ public class DefaultValue {
* Get arrayIntegerDefault
* @return arrayIntegerDefault
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Integer> getArrayIntegerDefault() {
@ -271,8 +259,7 @@ public class DefaultValue {
* Get arrayString
* @return arrayString
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ARRAY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayString() {
@ -308,8 +295,7 @@ public class DefaultValue {
* Get arrayStringNullable
* @return arrayStringNullable
*/
@javax.annotation.Nullable
@JsonIgnore
@javax.annotation.Nullable @JsonIgnore
public List<String> getArrayStringNullable() {
return arrayStringNullable.orElse(null);
@ -317,7 +303,6 @@ public class DefaultValue {
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getArrayStringNullable_JsonNullable() {
return arrayStringNullable;
}
@ -353,8 +338,7 @@ public class DefaultValue {
* Get arrayStringExtensionNullable
* @return arrayStringExtensionNullable
*/
@javax.annotation.Nullable
@JsonIgnore
@javax.annotation.Nullable @JsonIgnore
public List<String> getArrayStringExtensionNullable() {
return arrayStringExtensionNullable.orElse(null);
@ -362,7 +346,6 @@ public class DefaultValue {
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getArrayStringExtensionNullable_JsonNullable() {
return arrayStringExtensionNullable;
}
@ -386,8 +369,7 @@ public class DefaultValue {
* Get stringNullable
* @return stringNullable
*/
@javax.annotation.Nullable
@JsonIgnore
@javax.annotation.Nullable @JsonIgnore
public String getStringNullable() {
return stringNullable.orElse(null);
@ -395,7 +377,6 @@ public class DefaultValue {
@JsonProperty(JSON_PROPERTY_STRING_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getStringNullable_JsonNullable() {
return stringNullable;
}

View File

@ -36,18 +36,16 @@ import java.util.StringJoiner;
NumberPropertiesOnly.JSON_PROPERTY_DOUBLE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class NumberPropertiesOnly {
public static final String JSON_PROPERTY_NUMBER = "number";
@javax.annotation.Nullable
private BigDecimal number;
@javax.annotation.Nullable private BigDecimal number;
public static final String JSON_PROPERTY_FLOAT = "float";
@javax.annotation.Nullable
private Float _float;
@javax.annotation.Nullable private Float _float;
public static final String JSON_PROPERTY_DOUBLE = "double";
@javax.annotation.Nullable
private Double _double;
@javax.annotation.Nullable private Double _double;
public NumberPropertiesOnly() {
}
@ -62,8 +60,7 @@ public class NumberPropertiesOnly {
* Get number
* @return number
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NUMBER)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getNumber() {
@ -87,8 +84,7 @@ public class NumberPropertiesOnly {
* Get _float
* @return _float
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FLOAT)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() {
@ -114,8 +110,7 @@ public class NumberPropertiesOnly {
* maximum: 50.2
* @return _double
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DOUBLE)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getDouble() {

View File

@ -43,26 +43,22 @@ import java.util.StringJoiner;
Pet.JSON_PROPERTY_STATUS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class Pet {
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
private Long id;
@javax.annotation.Nullable private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nonnull
private String name;
@javax.annotation.Nonnull private String name;
public static final String JSON_PROPERTY_CATEGORY = "category";
@javax.annotation.Nullable
private Category category;
@javax.annotation.Nullable private Category category;
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
@javax.annotation.Nonnull
private List<String> photoUrls = new ArrayList<>();
@javax.annotation.Nonnull private List<String> photoUrls = new ArrayList<>();
public static final String JSON_PROPERTY_TAGS = "tags";
@javax.annotation.Nullable
private List<Tag> tags = new ArrayList<>();
@javax.annotation.Nullable private List<Tag> tags = new ArrayList<>();
/**
* pet status in the store
@ -100,10 +96,8 @@ public class Pet {
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_STATUS = "status";
@javax.annotation.Nullable
private StatusEnum status;
@javax.annotation.Nullable private StatusEnum status;
public Pet() {
}
@ -118,8 +112,7 @@ public class Pet {
* Get id
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
@ -143,8 +136,7 @@ public class Pet {
* Get name
* @return name
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@javax.annotation.Nonnull @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
@ -168,8 +160,7 @@ public class Pet {
* Get category
* @return category
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CATEGORY)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CATEGORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Category getCategory() {
@ -201,8 +192,7 @@ public class Pet {
* Get photoUrls
* @return photoUrls
*/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@javax.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List<String> getPhotoUrls() {
@ -234,8 +224,7 @@ public class Pet {
* Get tags
* @return tags
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAGS)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Tag> getTags() {
@ -259,8 +248,7 @@ public class Pet {
* pet status in the store
* @return status
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STATUS)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public StatusEnum getStatus() {

View File

@ -37,10 +37,10 @@ import java.util.StringJoiner;
Query.JSON_PROPERTY_OUTCOMES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class Query {
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
protected Long id;
@javax.annotation.Nullable protected Long id;
/**
* Gets or Sets outcomes
@ -78,10 +78,8 @@ public class Query {
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_OUTCOMES = "outcomes";
@javax.annotation.Nullable
protected List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
@javax.annotation.Nullable protected List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
public Query() {
}
@ -96,8 +94,7 @@ public class Query {
* Query
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
@ -129,8 +126,7 @@ public class Query {
* Get outcomes
* @return outcomes
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OUTCOMES)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OUTCOMES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<OutcomesEnum> getOutcomes() {

View File

@ -34,14 +34,13 @@ import java.util.StringJoiner;
Tag.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class Tag {
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
private Long id;
@javax.annotation.Nullable private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nullable
private String name;
@javax.annotation.Nullable private String name;
public Tag() {
}
@ -56,8 +55,7 @@ public class Tag {
* Get id
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
@ -81,8 +79,7 @@ public class Tag {
* Get name
* @return name
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {

View File

@ -34,10 +34,10 @@ import java.util.StringJoiner;
})
@JsonTypeName("test_form_object_multipart_request_marker")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class TestFormObjectMultipartRequestMarker {
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nullable
private String name;
@javax.annotation.Nullable private String name;
public TestFormObjectMultipartRequestMarker() {
}
@ -52,8 +52,7 @@ public class TestFormObjectMultipartRequestMarker {
* Get name
* @return name
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {

View File

@ -37,22 +37,19 @@ import java.util.StringJoiner;
})
@JsonTypeName("test_query_style_deepObject_explode_true_object_allOf_query_object_parameter")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
public static final String JSON_PROPERTY_SIZE = "size";
@javax.annotation.Nullable
private String size;
@javax.annotation.Nullable private String size;
public static final String JSON_PROPERTY_COLOR = "color";
@javax.annotation.Nullable
private String color;
@javax.annotation.Nullable private String color;
public static final String JSON_PROPERTY_ID = "id";
@javax.annotation.Nullable
private Long id;
@javax.annotation.Nullable private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@javax.annotation.Nullable
private String name;
@javax.annotation.Nullable private String name;
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
}
@ -67,8 +64,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
* Get size
* @return size
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SIZE)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSize() {
@ -92,8 +88,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
* Get color
* @return color
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COLOR)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() {
@ -117,8 +112,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
* Get id
* @return id
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
@ -142,8 +136,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
* Get name
* @return name
*/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {

Some files were not shown because too many files have changed in this diff Show More