Compare commits

...

1 Commits

Author SHA1 Message Date
William Cheng
277b43bcea partial fix 2024-10-19 15:10:45 +08:00
9287 changed files with 38670 additions and 67381 deletions

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: mp library: mp
outputDir: samples/client/petstore/java-helidon-client/v3/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 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: additionalProperties:
helidonVersion: 3.2.7 helidonVersion: 3.2.7
artifactId: petstore-helidon-client-mp artifactId: petstore-helidon-client-mp

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: mp library: mp
outputDir: samples/client/petstore/java-helidon-client/v4/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 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: additionalProperties:
helidonVersion: 4.0.11 helidonVersion: 4.0.11
artifactId: petstore-helidon-client-mp artifactId: petstore-helidon-client-mp

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: se library: se
outputDir: samples/client/petstore/java-helidon-client/v3/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 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: additionalProperties:
helidonVersion: 3.2.7 helidonVersion: 3.2.7
artifactId: petstore-helidon-client-se artifactId: petstore-helidon-client-se

View File

@ -2,6 +2,7 @@ generatorName: java-helidon-client
library: se library: se
outputDir: samples/client/petstore/java-helidon-client/v4/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 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: additionalProperties:
helidonVersion: 4.0.11 helidonVersion: 4.0.11
artifactId: petstore-helidon-client-se artifactId: petstore-helidon-client-se

View File

@ -1,6 +1,7 @@
generatorName: java-micronaut-client generatorName: java-micronaut-client
outputDir: samples/client/petstore/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 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: additionalProperties:
artifactId: petstore-micronaut artifactId: petstore-micronaut
hideGenerationTimestamp: "true" hideGenerationTimestamp: "true"

View File

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

View File

@ -1,4 +1,4 @@
public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/parentModel}}{ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/parentModel}}{
private {{classname}} instance; private {{classname}} instance;

View File

@ -20,7 +20,12 @@
{{/hasDiscriminatorWithNonEmptyMapping}} {{/hasDiscriminatorWithNonEmptyMapping}}
{{/isClassnameSanitized}} {{/isClassnameSanitized}}
{{/jackson}} {{/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}}} {{{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}} {{>modelInnerEnum}}
{{/mostInnerItems}} {{/mostInnerItems}}
{{/isContainer}} {{/isContainer}}
{{/isEnum}} {{/isEnum}}
{{#gson}} {{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; 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}}
{{^vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#isContainer}} {{#isContainer}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}} {{/isContainer}}
@ -191,6 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated @Deprecated
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#jsonb}} {{#jsonb}}
@JsonbProperty("{{baseName}}") @JsonbProperty("{{baseName}}")
{{/jsonb}} {{/jsonb}}

View File

@ -23,7 +23,12 @@
@JsonTypeName("{{name}}") @JsonTypeName("{{name}}")
{{/isClassnameSanitized}} {{/isClassnameSanitized}}
{{/jackson}} {{/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}}} {{{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
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vendorExtensions.x-is-jackson-optional-nullable}}
@ -199,6 +205,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated @Deprecated
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#useBeanValidation}} {{#useBeanValidation}}
{{>beanValidation}} {{>beanValidation}}
{{/useBeanValidation}} {{/useBeanValidation}}
@ -235,7 +242,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() {
return {{name}}; 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}}) @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}})
{{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { {{#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}} {{! 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}}") @JsonTypeName("{{name}}")
{{/isClassnameSanitized}} {{/isClassnameSanitized}}
{{/jackson}} {{/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}}} {{{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}} {{>modelInnerEnum}}
{{/mostInnerItems}} {{/mostInnerItems}}
{{/isContainer}} {{/isContainer}}
{{/isEnum}} {{/isEnum}}
{{#gson}} {{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -82,6 +88,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated @Deprecated
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vendorExtensions.x-is-jackson-optional-nullable}}
@ -199,6 +206,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@Deprecated @Deprecated
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#useBeanValidation}} {{#useBeanValidation}}
{{>beanValidation}} {{>beanValidation}}
{{/useBeanValidation}} {{/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}} {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}}
@JsonIgnore @JsonIgnore
{{/vendorExtensions.x-is-jackson-optional-nullable}} {{/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}}() { public {{{datatypeWithEnum}}} {{getter}}() {
{{#vendorExtensions.x-is-jackson-optional-nullable}} {{#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}} {{#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() { public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() {
return {{name}}; 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}}) @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}})
{{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { {{#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}} {{! 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 @Deprecated
{{/deprecated}} {{/deprecated}}
{{#vendorExtensions.x-setter-extra-annotation}} {{{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}}
{{#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}} {{#vendorExtensions.x-enum-as-string}}
if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) {
throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); 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}} super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
{{/useReflectionEqualsHashCode}} {{/useReflectionEqualsHashCode}}
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}} }
{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { 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())); 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 @Override
public int hashCode() { public int hashCode() {
@ -302,14 +324,16 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
{{^useReflectionEqualsHashCode}} {{^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}}); 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}} {{/useReflectionEqualsHashCode}}
}{{#vendorExtensions.x-jackson-optional-nullable-helpers}} }
{{#vendorExtensions.x-jackson-optional-nullable-helpers}}
private static <T> int hashCodeNullable(JsonNullable<T> a) { private static <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) { if (a == null) {
return 1; return 1;
} }
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}{{/vendorExtensions.x-jackson-optional-nullable-helpers}} }
{{/vendorExtensions.x-jackson-optional-nullable-helpers}}
@Override @Override
public String toString() { public String toString() {

View File

@ -26,7 +26,12 @@ import {{invokerPackage}}.ApiClient;
{{/vars}} {{/vars}}
}) })
{{/jackson}} {{/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}}} {{{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}} {{>modelInnerEnum}}
{{/mostInnerItems}} {{/mostInnerItems}}
{{/isContainer}} {{/isContainer}}
{{/isEnum}} {{/isEnum}}
{{#gson}} {{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -573,6 +579,6 @@ static {
{{/discriminator}} {{/discriminator}}
{{#generateBuilders}} {{#generateBuilders}}
{{>javaBuilder}} {{>javaBuilder}}
{{/generateBuilders}} {{/generateBuilders}}
} }

View File

@ -25,7 +25,12 @@
{{/hasDiscriminatorWithNonEmptyMapping}} {{/hasDiscriminatorWithNonEmptyMapping}}
{{/isClassnameSanitized}} {{/isClassnameSanitized}}
{{/jackson}} {{/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}}} {{{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}} {{>modelInnerEnum}}
{{/mostInnerItems}} {{/mostInnerItems}}
{{/isContainer}} {{/isContainer}}
{{/isEnum}} {{/isEnum}}
{{#gson}} {{#gson}}
public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}";
@ -66,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}})
{{/gson}} {{/gson}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#vendorExtensions.x-field-extra-annotation}} {{#vendorExtensions.x-field-extra-annotation}}
{{{vendorExtensions.x-field-extra-annotation}}} {{{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
{{/deprecated}} {{/deprecated}}
{{>nullable_var_annotations}} {{>nullable_var_annotations}}
{{#jsonb}} {{#jsonb}}
@JsonbProperty("{{baseName}}") @JsonbProperty("{{baseName}}")
{{/jsonb}} {{/jsonb}}

View File

@ -1,5 +1,4 @@
{{#jackson}} {{#jackson}}
@JsonIgnoreProperties( @JsonIgnoreProperties(
value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization 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 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}}") @XmlRootElement({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
{{#jackson}} {{#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}} { {{#vars}}"{{name}}"{{^-last}}, {{/-last}}{{/vars}}
}){{/hasVars}} }){{/hasVars}}
{{^hasVars}}@XmlType(name = "{{classname}}"){{/hasVars}} {{^hasVars}}@XmlType(name = "{{classname}}"){{/hasVars}}
{{^parent}}@XmlRootElement(name="{{classname}}"){{/parent}} {{^parent}}
@XmlRootElement(name="{{classname}}")
{{/parent}}
{{/withXml}} {{/withXml}}
{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{#description}} {{#discriminator}}
{{>typeInfoAnnotation}}
{{/discriminator}}
{{#description}}
/** /**
* {{{description}}} * {{{description}}}
*/ */
@ApiModel(description="{{{description}}}") @ApiModel(description="{{{description}}}")
{{/description}}{{>additionalModelTypeAnnotations}} {{/description}}
{{>additionalModelTypeAnnotations}}
{{#vendorExtensions.x-class-extra-annotation}} {{#vendorExtensions.x-class-extra-annotation}}
{{{vendorExtensions.x-class-extra-annotation}}} {{{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}} { public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#vars}}{{#isEnum}}{{^isContainer}} {{#vars}}
{{>enumClass}}{{/isContainer}}{{#isContainer}}{{#mostInnerItems}} {{#isEnum}}
{{>enumClass}}{{/mostInnerItems}}{{/isContainer}}{{/isEnum}} {{^isContainer}}
{{>enumClass}}
{{/isContainer}}
{{#isContainer}}
{{#mostInnerItems}}
{{>enumClass}}
{{/mostInnerItems}}
{{/isContainer}}
{{/isEnum}}
{{#description}} {{#description}}
/** /**
* {{{.}}} * {{{.}}}

View File

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

View File

@ -9,7 +9,11 @@
{{/vars}} {{/vars}}
}) })
{{/jackson}} {{/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}}} {{{vendorExtensions.x-class-extra-annotation}}}
{{/vendorExtensions.x-class-extra-annotation}} {{/vendorExtensions.x-class-extra-annotation}}

View File

@ -9,7 +9,11 @@
{{/vars}} {{/vars}}
}) })
{{/jackson}} {{/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}}} {{{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}} {{#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}} * {{description}}{{^description}}{{classname}}{{/description}}
*/ */
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}} {{>additionalModelTypeAnnotations}}
{{>generatedAnnotation}}
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
{{#vendorExtensions.x-class-extra-annotation}} {{#vendorExtensions.x-class-extra-annotation}}
{{{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}}}
{{/vendorExtensions.x-field-extra-annotation}} {{/vendorExtensions.x-field-extra-annotation}}
{{#isContainer}} {{#isContainer}}
{{#useBeanValidation}} {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{/isContainer}} {{/isContainer}}
{{^isContainer}} {{^isContainer}}
{{#useBeanValidation}} {{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}} {{/isContainer}}

View File

@ -69,7 +69,7 @@ public interface {{classname}}Delegate {
{{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}{{#isFormParam}}MultipartFile{{/isFormParam}}{{^isFormParam}}{{>optionalDataType}}{{/isFormParam}}{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}}, {{#jdk8-default-interface}}default {{/jdk8-default-interface}}{{>responseType}} {{operationId}}({{#allParams}}{{^isFile}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}Mono<{{{dataType}}}>{{/isArray}}{{#isArray}}Flux<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{/isFile}}{{#isFile}}{{#isArray}}List<{{/isArray}}{{#reactive}}Flux<Part>{{/reactive}}{{^reactive}}{{#isFormParam}}MultipartFile{{/isFormParam}}{{^isFormParam}}{{>optionalDataType}}{{/isFormParam}}{{/reactive}}{{#isArray}}>{{/isArray}}{{/isFile}} {{paramName}}{{^-last}},
{{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}}, {{/-last}}{{/allParams}}{{#reactive}}{{#hasParams}},
{{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} { {{/hasParams}}ServerWebExchange exchange{{/reactive}}{{#vendorExtensions.x-spring-paginated}}{{#hasParams}}, {{/hasParams}}{{^hasParams}}{{#reactive}}, {{/reactive}}{{/hasParams}}final Pageable pageable{{/vendorExtensions.x-spring-paginated}}){{#unhandledException}} throws Exception{{/unhandledException}}{{^jdk8-default-interface}};{{/jdk8-default-interface}}{{#jdk8-default-interface}} {
{{>methodBody}} {{>methodBody}}
}{{/jdk8-default-interface}} }{{/jdk8-default-interface}}
{{/operation}} {{/operation}}

View File

@ -2,8 +2,8 @@
{{#examples}} {{#examples}}
{{#-first}} {{#-first}}
{{#async}} {{#async}}
return CompletableFuture.supplyAsync(()-> { return CompletableFuture.supplyAsync(()-> {
{{/async}}getRequest().ifPresent(request -> { {{/async}} getRequest().ifPresent(request -> {
{{#async}} {{/async}} for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { {{#async}} {{/async}} for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
{{/-first}} {{/-first}}
{{#async}} {{/async}}{{^async}} {{/async}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) { {{#async}} {{/async}}{{^async}} {{/async}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) {
@ -24,7 +24,7 @@ return CompletableFuture.supplyAsync(()-> {
{{/-last}} {{/-last}}
{{/examples}} {{/examples}}
{{^examples}} {{^examples}}
{{#useResponseEntity}}return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<>({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}){{#async}}){{/async}}; {{#useResponseEntity}} return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<>({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}){{#async}}){{/async}};
{{/useResponseEntity}} {{/useResponseEntity}}
{{^useResponseEntity}}throw new IllegalArgumentException("Not implemented"); {{^useResponseEntity}}throw new IllegalArgumentException("Not implemented");
{{/useResponseEntity}} {{/useResponseEntity}}

View File

@ -3,4 +3,5 @@
@JacksonXmlRootElement({{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @JacksonXmlRootElement({{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}localName = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}")
{{/jackson}} {{/jackson}}
@XmlRootElement({{#xmlNamespace}}namespace = "{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{classname}}{{/xmlName}}") @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}} {{#models}}
{{#model}} {{#model}}
namespace {{modelPackage}} namespace {{modelPackage}}
{ {{#isEnum}}{{>enumClass}}{{/isEnum}}{{^isEnum}} {
{{#isEnum}}
{{>enumClass}}
{{/isEnum}}
{{^isEnum}}
/// <summary> /// <summary>
/// {{description}} /// {{description}}
/// </summary> /// </summary>
@ -60,6 +64,7 @@ namespace {{modelPackage}}
{{^complexType}} {{^complexType}}
{{>enumClass}} {{>enumClass}}
{{/complexType}} {{/complexType}}
{{/isEnum}} {{/isEnum}}
/// <summary> /// <summary>
/// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}}

View File

@ -51,14 +51,14 @@ bool {{classname}}::validate(std::stringstream& msg, const std::string& pathPref
{{#required}}/* {{name}} */ {{/required}}{ {{#required}}/* {{name}} */ {{/required}}{
const {{{dataType}}}& value = m_{{name}}; const {{{dataType}}}& value = m_{{name}};
const std::string currentValuePath = _pathPrefix + ".{{nameInCamelCase}}"; const std::string currentValuePath = _pathPrefix + ".{{nameInCamelCase}}";
{{> model-validation-body }} {{> model-validation-body }}
} }
{{/isArray}}{{^isArray}}{{#hasValidation}} {{! Only generate validation if necessary }} {{/isArray}}{{^isArray}}{{#hasValidation}} {{! Only generate validation if necessary }}
{{^required}}if ({{nameInCamelCase}}IsSet()){{/required}} {{^required}}if ({{nameInCamelCase}}IsSet()){{/required}}
{{#required}}/* {{name}} */ {{/required}}{ {{#required}}/* {{name}} */ {{/required}}{
const {{{dataType}}}& value = m_{{name}}; const {{{dataType}}}& value = m_{{name}};
const std::string currentValuePath = _pathPrefix + ".{{nameInCamelCase}}"; const std::string currentValuePath = _pathPrefix + ".{{nameInCamelCase}}";
{{> model-validation-body }} {{> model-validation-body }}
} }
{{/hasValidation}}{{#required}}{{#isModel}} {{/hasValidation}}{{#required}}{{#isModel}}
if (!m_{{name}}.validate(msg, _pathPrefix + ".{{nameInCamelCase}}")) { if (!m_{{name}}.validate(msg, _pathPrefix + ".{{nameInCamelCase}}")) {

View File

@ -1,4 +1,4 @@
const auto request = session->get_request(); const auto request = session->get_request();
{{#hasBodyParam}} {{#hasBodyParam}}
// body params or form params here from the body content string // body params or form params here from the body content string
std::string bodyContent = extractBodyContent(session); std::string bodyContent = extractBodyContent(session);

View File

@ -151,7 +151,7 @@ void {{vendorExtensions.x-codegen-resource-name}}Resource::defaultSessionClose(c
void {{vendorExtensions.x-codegen-resource-name}}Resource::handler_{{httpMethod}}_internal(const std::shared_ptr<restbed::Session> session) void {{vendorExtensions.x-codegen-resource-name}}Resource::handler_{{httpMethod}}_internal(const std::shared_ptr<restbed::Session> session)
{ {
{{#lambda.indented}} {{#lambda.indented}}
{{>api-source-HandlerBody}} {{>api-source-HandlerBody}}
{{/lambda.indented}} {{/lambda.indented}}
} }
@ -160,7 +160,7 @@ void {{vendorExtensions.x-codegen-resource-name}}Resource::handler_{{httpMethod}
// x-extension // x-extension
void {{vendorExtensions.x-codegen-resource-name}}Resource::handler_{{httpMethod}}_internal(const std::shared_ptr<restbed::Session> session) { void {{vendorExtensions.x-codegen-resource-name}}Resource::handler_{{httpMethod}}_internal(const std::shared_ptr<restbed::Session> session) {
{{#lambda.indented}} {{#lambda.indented}}
{{>api-source-HandlerBody}} {{>api-source-HandlerBody}}
{{/lambda.indented}} {{/lambda.indented}}
} }

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}}, {{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}}this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{.}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},
{{/vars}} {{/vars}}
}); });

View File

@ -1 +1,2 @@
{{#pubLibrary}}part of {{{.}}};{{/pubLibrary}}{{^pubLibrary}}part of {{{pubName}}}.api;{{/pubLibrary}} {{#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}} {{>beanValidation}}
{{/useBeanValidation}} {{/useBeanValidation}}
{{^useBeanValidation}} {{^useBeanValidation}}
{{#required}}@NotNull{{/required}} {{#required}}
@NotNull
{{/required}}
{{/useBeanValidation}} {{/useBeanValidation}}
{{#swagger2AnnotationLibrary}} {{#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}}) @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}} { public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
{{#discriminator}} {{#discriminator}}
public {{propertyType}} {{propertyGetter}}(); public {{propertyType}} {{propertyGetter}}();

View File

@ -46,3 +46,4 @@
{{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} {{#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}} {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
} }
} }

View File

@ -185,3 +185,4 @@
} }
{{/responses}} {{/responses}}
} }

View File

@ -23,7 +23,12 @@
{{#additionalModelTypeAnnotations}} {{#additionalModelTypeAnnotations}}
{{{.}}} {{{.}}}
{{/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 @Introspected
{{/useBeanValidation}} {{/useBeanValidation}}
{{#vendorExtensions.x-class-extra-annotation}} {{#vendorExtensions.x-class-extra-annotation}}

View File

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

View File

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

View File

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

View File

@ -35,7 +35,7 @@ interface {{classname}}Delegate {
*/ */
{{#reactive}}{{^isArray}}suspend {{/isArray}}{{/reactive}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{^isFile}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}{{#isBodyParam}}Flow<{{{baseType}}}>{{/isBodyParam}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{/isArray}}{{/reactive}}{{/isFile}}{{#isFile}}Resource?{{/isFile}}{{^-last}}, {{#reactive}}{{^isArray}}suspend {{/isArray}}{{/reactive}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{^isFile}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}{{#isBodyParam}}Flow<{{{baseType}}}>{{/isBodyParam}}{{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{/isArray}}{{/reactive}}{{/isFile}}{{#isFile}}Resource?{{/isFile}}{{^-last}},
{{/-last}}{{/allParams}}): {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}}{{^skipDefaultDelegateInterface}} { {{/-last}}{{/allParams}}): {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}}{{^skipDefaultDelegateInterface}} {
{{>methodBody}} {{>methodBody}}
}{{/skipDefaultDelegateInterface}} }{{/skipDefaultDelegateInterface}}
{{/operation}} {{/operation}}

View File

@ -19,12 +19,12 @@
{{/-last}}{{/optionalVars}} {{/-last}}{{/optionalVars}}
) {{/discriminator}}{{#parent}}: {{{.}}}{{#serializableModel}}, Serializable{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}: Serializable{{/serializableModel}}{{/parent}}{ ) {{/discriminator}}{{#parent}}: {{{.}}}{{#serializableModel}}, Serializable{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}: Serializable{{/serializableModel}}{{/parent}}{
{{#discriminator}} {{#discriminator}}
{{#requiredVars}} {{#requiredVars}}
{{>interfaceReqVar}} {{>interfaceReqVar}}
{{/requiredVars}} {{/requiredVars}}
{{#optionalVars}} {{#optionalVars}}
{{>interfaceOptVar}} {{>interfaceOptVar}}
{{/optionalVars}} {{/optionalVars}}
{{/discriminator}} {{/discriminator}}
{{#hasEnums}}{{#vars}}{{#isEnum}} {{#hasEnums}}{{#vars}}{{#isEnum}}
/** /**

View File

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

@ -2,8 +2,8 @@
{{#examples}} {{#examples}}
{{#-first}} {{#-first}}
{{#async}} {{#async}}
return CompletableFuture.supplyAsync(()-> { return CompletableFuture.supplyAsync(()-> {
{{/async}}getRequest().ifPresent { request -> {{/async}} getRequest().ifPresent { request ->
{{#async}} {{/async}} for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) { {{#async}} {{/async}} for (mediaType in MediaType.parseMediaTypes(request.getHeader("Accept"))) {
{{/-first}} {{/-first}}
{{#async}} {{/async}}{{^async}} {{/async}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) { {{#async}} {{/async}}{{^async}} {{/async}} if (mediaType.isCompatibleWith(MediaType.valueOf("{{{contentType}}}"))) {
@ -20,9 +20,9 @@ return CompletableFuture.supplyAsync(()-> {
{{/-last}} {{/-last}}
{{/examples}} {{/examples}}
{{^examples}} {{^examples}}
return {{#async}}CompletableFuture.completedFuture({{/async}}ResponseEntity({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}) return {{#async}}CompletableFuture.completedFuture({{/async}}ResponseEntity({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}})
{{/examples}} {{/examples}}
{{/reactive}} {{/reactive}}
{{#reactive}} {{#reactive}}
return ResponseEntity({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}}) return ResponseEntity({{#returnSuccessCode}}HttpStatus.OK{{/returnSuccessCode}}{{^returnSuccessCode}}HttpStatus.NOT_IMPLEMENTED{{/returnSuccessCode}})
{{/reactive}} {{/reactive}}

View File

@ -265,3 +265,4 @@
} }
} }
} }

View File

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

View File

@ -63,3 +63,4 @@
Ok(h) => h, Ok(h) => h,
Err(e) => return Err(ApiError(format!("Unable to create header: {} - {}", multipart_header, e))) 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-plain-text}}
{{/x-produces-bytes}} {{/x-produces-bytes}}
{{/vendorExtensions}} {{/vendorExtensions}}

View File

@ -74,3 +74,4 @@ let param_{{{paramName}}} = match param_{{{paramName}}} {
{{/formParams}} {{/formParams}}
}; };
{{/vendorExtensions.x-consumes-basic}} {{/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()); 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())) Err(ApiError("Api-Error: Operation is NOT implemented".into()))
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -96,3 +96,4 @@
} }
}; };
{{/formParams}} {{/formParams}}

View File

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

View File

@ -48,3 +48,4 @@
{{/vendorExtensions}} {{/vendorExtensions}}
*response.body_mut() = Body::from(body); *response.body_mut() = Body::from(body);
{{/dataType}} {{/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. Please update both places if changing how this code is autogenerated.
}} }}
match method { match method {

View File

@ -1,6 +1 @@
{{^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}}
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}} {{^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}}
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-threetenbp.version>2.15.2</jackson-threetenbp.version>
<jackson.version>2.17.1</jackson.version> <jackson.version>2.17.1</jackson.version>
<jacoco.version>0.8.10</jacoco.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> <junit.version>5.10.2</junit.version>
<kotlin.version>1.6.21</kotlin.version> <kotlin.version>1.6.21</kotlin.version>
<kotlin-compiler-embeddable.version>1.6.21</kotlin-compiler-embeddable.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) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} } }
}
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -160,4 +160,3 @@ func (v *NullableBird) UnmarshalJSON(src []byte) error {
return json.Unmarshal(src, &v.value) 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) 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) 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) 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) 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) 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) return json.Unmarshal(src, &v.value)
} }

View File

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

View File

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

View File

@ -124,4 +124,3 @@ func (v *NullableTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) U
return json.Unmarshal(src, &v.value) 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) 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) 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) 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) 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) 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) 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) return json.Unmarshal(src, &v.value)
} }

View File

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

View File

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

View File

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

View File

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

View File

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

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