mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-05 16:30:52 +00:00
[Feature][Java/Spring] Support Discriminator Based OneOf Interface (#11650)
* Fix OpenAPITools#5381 added x-is-one-of-interface extension for oneOf interface in mustache template * Fix OpenAPITools#5381 fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf Fix OpenAPITools#5381 parcelableModel is not required * Fix OpenAPITools#5381 removed not needed methods * Fix OpenAPITools#5381 catch NPE cases in preprocessOpenAPI updated samples * Fix OpenAPITools#5381 fixed generation of oneOf Models * Fix OpenAPITools#5381 addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring * Fix OpenAPITools#5381 NPE fix * Fix OpenAPITools#5381 spring: fixed use of oneOf Models in API * Fix OpenAPITools#5381 implementing oneOf for spring lib overriding methods with different behavior from default * Fix OpenAPITools#5381 added x-is-one-of-interface extension for oneOf interface in mustache template * Fix OpenAPITools#5381 fixed name of model from UNKNOWN_BASE_TYPE to right one in api: operationId + OneOf Fix OpenAPITools#5381 removed not needed methods Fix OpenAPITools#5381 fixed generation of oneOf Models Fix OpenAPITools#5381 addOneOfInterfaceModel only for cases when useOneOfInterfaces is true and for spring Fix OpenAPITools#5381 NPE fix for tests * Fix OpenAPITools#5381 fixed handing of composed schema with array * Fix OpenAPITools#5381 fixed NPE in addOneOfInterfaceModel * Fix OpenAPITools#5381 fixed generation of oneOf models with descriminator * Initial merge of 5.0 * Aligned with master formatting * Corrected spacing for class names to align with samples. * Merged master * Updated samples * Consolidate methods from JavaClient and SpringCodegen (mov up to AbstractJavaCodegen) * set useLegacyDiscriminator to false, format templates * Suport JsonTypeName, fq class name for spring.io.Resource * Generate Samples * Test full qualified usage of the spring Resource interface. * Add java-camel to samples.circleci.spring profile * Add more complex example combining inheritance and oneof-interface * Remove x-implements Serializable from JavaClientCodegen (moved to AbstractJavaCodegen) * Fix spacing before opening brace after extends/implements * Generate Samples * Add more complex example combining inheritance and oneof-interface * Generate Samples * Fix JsonTypeName annotation handling in Java and JavaSpring * Content mediatype is hardcoded in api.mustache #11511 * Generate Samples * OAS3 incorrect data type when providing a default value #11367 * Generate Samples * Fix JsonTypeName annotation handling in Java and JavaSpring * Generate Samples * getIsClassnameSanitized: use null safe equals * Fix JsonTypeName annotation handling in Java and JavaSpring (merge) * Generate Samples * Generate Samples * Add oneof sample * Generate Samples * Giv example oas spec a meaningful name, demo usage of oneOf in Model * Generate Samples * Remove unnecessary JsonTypeName include, add example for JsonTypeName (Bar_Create) * Generate Samples * Generate Samples Co-authored-by: Alexej <oleksejk@gmail.com> Co-authored-by: JBurgess <joel.burgess@gmail.com> Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
parent
a3fb571a1b
commit
e07c7d1617
1
.github/workflows/samples-spring.yaml
vendored
1
.github/workflows/samples-spring.yaml
vendored
@ -39,6 +39,7 @@ jobs:
|
|||||||
- samples/openapi3/server/petstore/springboot-delegate
|
- samples/openapi3/server/petstore/springboot-delegate
|
||||||
- samples/server/petstore/spring-boot-nullable-set
|
- samples/server/petstore/spring-boot-nullable-set
|
||||||
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
|
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
|
||||||
|
- samples/openapi3/server/petstore/spring-boot-oneof
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-java@v2
|
- uses: actions/setup-java@v2
|
||||||
|
10
bin/configs/spring-boot-oneof.yaml
Normal file
10
bin/configs/spring-boot-oneof.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
generatorName: spring
|
||||||
|
outputDir: samples/openapi3/server/petstore/spring-boot-oneof
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||||
|
additionalProperties:
|
||||||
|
groupId: org.openapitools.openapi3
|
||||||
|
documentationProvider: springdoc
|
||||||
|
artifactId: springboot-oneof
|
||||||
|
snapshotVersion: "true"
|
||||||
|
hideGenerationTimestamp: "true"
|
@ -843,7 +843,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public void preprocessOpenAPI(OpenAPI openAPI) {
|
public void preprocessOpenAPI(OpenAPI openAPI) {
|
||||||
if (useOneOfInterfaces) {
|
if (useOneOfInterfaces && openAPI.getComponents() != null) {
|
||||||
// we process the openapi schema here to find oneOf schemas and create interface models for them
|
// we process the openapi schema here to find oneOf schemas and create interface models for them
|
||||||
Map<String, Schema> schemas = new HashMap<>(openAPI.getComponents().getSchemas());
|
Map<String, Schema> schemas = new HashMap<>(openAPI.getComponents().getSchemas());
|
||||||
if (schemas == null) {
|
if (schemas == null) {
|
||||||
|
@ -1313,7 +1313,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
public Map<String, Object> postProcessModels(Map<String, Object> objs) {
|
||||||
// recursively add import for mapping one type to multiple imports
|
// recursively add import for mapping one type to multiple imports
|
||||||
@ -1333,14 +1332,12 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Object> models = (List<Object>) objs.get("models");
|
// add x-implements for serializable to all models
|
||||||
|
List<Map<String, Object>> models = (List<Map<String, Object>>) objs.get("models");
|
||||||
for (Object _mo : models) {
|
for (Map<String, Object> mo : models) {
|
||||||
Map<String, Object> mo = (Map<String, Object>) _mo;
|
|
||||||
CodegenModel cm = (CodegenModel) mo.get("model");
|
CodegenModel cm = (CodegenModel) mo.get("model");
|
||||||
|
|
||||||
cm.getVendorExtensions().putIfAbsent("x-implements", new ArrayList<String>());
|
|
||||||
if (this.serializableModel) {
|
if (this.serializableModel) {
|
||||||
|
cm.getVendorExtensions().putIfAbsent("x-implements", new ArrayList<String>());
|
||||||
((ArrayList<String>) cm.getVendorExtensions().get("x-implements")).add("Serializable");
|
((ArrayList<String>) cm.getVendorExtensions().get("x-implements")).add("Serializable");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2054,6 +2051,18 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
|||||||
return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex);
|
return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addImportsToOneOfInterface(List<Map<String, String>> imports) {
|
||||||
|
if (additionalProperties.containsKey(JACKSON)) {
|
||||||
|
for (String i : Arrays.asList("JsonSubTypes", "JsonTypeInfo")) {
|
||||||
|
Map<String, String> oneImport = new HashMap<>();
|
||||||
|
oneImport.put("import", importMapping.get(i));
|
||||||
|
if (!imports.contains(oneImport)) {
|
||||||
|
imports.add(oneImport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<VendorExtension> getSupportedVendorExtensions() {
|
public List<VendorExtension> getSupportedVendorExtensions() {
|
||||||
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
|
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
|
||||||
|
@ -281,6 +281,8 @@ public class SpringCodegen extends AbstractJavaCodegen
|
|||||||
}
|
}
|
||||||
|
|
||||||
super.processOpts();
|
super.processOpts();
|
||||||
|
useOneOfInterfaces = true;
|
||||||
|
legacyDiscriminatorBehavior = false;
|
||||||
|
|
||||||
if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) {
|
if (DocumentationProvider.SPRINGFOX.equals(getDocumentationProvider())) {
|
||||||
LOGGER.warn("The springfox documentation provider is deprecated for removal. Use the springdoc provider instead.");
|
LOGGER.warn("The springfox documentation provider is deprecated for removal. Use the springdoc provider instead.");
|
||||||
|
@ -46,7 +46,7 @@ import javax.annotation.Generated;
|
|||||||
{{>enumOuterClass}}
|
{{>enumOuterClass}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{^isEnum}}
|
{{^isEnum}}
|
||||||
{{>pojo}}
|
{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
13
modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache
vendored
Normal file
13
modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{>additionalModelTypeAnnotations}}
|
||||||
|
{{#withXml}}
|
||||||
|
{{>xmlAnnotation}}
|
||||||
|
{{/withXml}}
|
||||||
|
{{#discriminator}}
|
||||||
|
{{>typeInfoAnnotation}}
|
||||||
|
{{/discriminator}}
|
||||||
|
{{>generatedAnnotation}}
|
||||||
|
public interface {{classname}}{{#vendorExtensions.x-implements}}{{#-first}} extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
|
||||||
|
{{#discriminator}}
|
||||||
|
public {{propertyType}} {{propertyGetter}}();
|
||||||
|
{{/discriminator}}
|
||||||
|
}
|
@ -25,7 +25,7 @@
|
|||||||
{{#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}}{{^parent}}{{#hateoas}}extends RepresentationModel<{{classname}}> {{/hateoas}}{{/parent}} {{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} {
|
public class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}{{^parent}}{{#hateoas}} extends RepresentationModel<{{classname}}> {{/hateoas}}{{/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;
|
||||||
|
@ -1,11 +1,21 @@
|
|||||||
{{#jackson}}
|
{{#jackson}}
|
||||||
|
{{#discriminator.mappedModels}}
|
||||||
|
{{#-first}}
|
||||||
@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
|
||||||
)
|
)
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
{{#discriminator.mappedModels}}
|
{{/-first}}
|
||||||
@JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"),
|
{{^vendorExtensions.x-discriminator-value}}
|
||||||
{{/discriminator.mappedModels}}
|
@JsonSubTypes.Type(value = {{modelName}}.class, name = "{{{mappingName}}}"){{^-last}},{{/-last}}
|
||||||
}){{/jackson}}
|
{{/vendorExtensions.x-discriminator-value}}
|
||||||
|
{{#vendorExtensions.x-discriminator-value}}
|
||||||
|
@JsonSubTypes.Type(value = {{modelName}}.class, name = "{{{vendorExtensions.x-discriminator-value}}}"){{^-last}},{{/-last}}
|
||||||
|
{{/vendorExtensions.x-discriminator-value}}
|
||||||
|
{{#-last}}
|
||||||
|
})
|
||||||
|
{{/-last}}
|
||||||
|
{{/discriminator.mappedModels}}
|
||||||
|
{{/jackson}}
|
@ -947,6 +947,44 @@ public class SpringCodegenTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void oneOf_5381() throws IOException {
|
||||||
|
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||||
|
output.deleteOnExit();
|
||||||
|
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||||
|
OpenAPI openAPI = new OpenAPIParser()
|
||||||
|
.readLocation("src/test/resources/3_0/issue_5381.yaml", null, new ParseOptions()).getOpenAPI();
|
||||||
|
|
||||||
|
SpringCodegen codegen = new SpringCodegen();
|
||||||
|
codegen.setOutputDir(output.getAbsolutePath());
|
||||||
|
codegen.additionalProperties().put(CXFServerFeatures.LOAD_TEST_DATA_FROM_FILE, "true");
|
||||||
|
codegen.setUseOneOfInterfaces(true);
|
||||||
|
|
||||||
|
ClientOptInput input = new ClientOptInput();
|
||||||
|
input.openAPI(openAPI);
|
||||||
|
input.config(codegen);
|
||||||
|
|
||||||
|
DefaultGenerator generator = new DefaultGenerator();
|
||||||
|
codegen.setHateoas(true);
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true");
|
||||||
|
//generator.setGeneratorPropertyDefault(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, "true");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false");
|
||||||
|
|
||||||
|
codegen.setUseOneOfInterfaces(true);
|
||||||
|
codegen.setLegacyDiscriminatorBehavior(false);
|
||||||
|
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "true");
|
||||||
|
generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false");
|
||||||
|
|
||||||
|
generator.opts(input).generate();
|
||||||
|
|
||||||
|
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/Foo.java"), "public class Foo implements FooRefOrValue");
|
||||||
|
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRef.java"), "public class FooRef implements FooRefOrValue");
|
||||||
|
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/model/FooRefOrValue.java"), "public interface FooRefOrValue");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTypeMappings() {
|
public void testTypeMappings() {
|
||||||
final SpringCodegen codegen = new SpringCodegen();
|
final SpringCodegen codegen = new SpringCodegen();
|
||||||
|
134
modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml
Normal file
134
modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: ByRefOrValue
|
||||||
|
description: >
|
||||||
|
This tests for a oneOf interface representation
|
||||||
|
version: 0.0.1
|
||||||
|
servers:
|
||||||
|
- url: "http://localhost:8080"
|
||||||
|
tags:
|
||||||
|
- name: Foo
|
||||||
|
paths:
|
||||||
|
/foo:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
summary: GET all Foos
|
||||||
|
operationId: getAllFoos
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/200FooArray'
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
summary: Create a Foo
|
||||||
|
operationId: createFoo
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Foo'
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
$ref: '#/components/responses/201Foo'
|
||||||
|
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
Entity:
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- "$ref": "#/components/schemas/Addressable"
|
||||||
|
- "$ref": "#/components/schemas/Extensible"
|
||||||
|
|
||||||
|
EntityRef:
|
||||||
|
description: Entity reference schema to be use for all entityRef class.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: Name of the related entity.
|
||||||
|
'@referredType':
|
||||||
|
type: string
|
||||||
|
description: The actual type of the target instance when needed for disambiguation.
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Addressable'
|
||||||
|
- "$ref": "#/components/schemas/Extensible"
|
||||||
|
|
||||||
|
|
||||||
|
Addressable:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
description: Hyperlink reference
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: unique identifier
|
||||||
|
description: Base schema for adressable entities
|
||||||
|
Extensible:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
"@schemaLocation":
|
||||||
|
type: string
|
||||||
|
description: A URI to a JSON-Schema file that defines additional attributes
|
||||||
|
and relationships
|
||||||
|
"@baseType":
|
||||||
|
type: string
|
||||||
|
description: When sub-classing, this defines the super-class
|
||||||
|
"@type":
|
||||||
|
type: string
|
||||||
|
description: When sub-classing, this defines the sub-class Extensible name
|
||||||
|
required:
|
||||||
|
- '@type'
|
||||||
|
|
||||||
|
FooRefOrValue:
|
||||||
|
type: object
|
||||||
|
oneOf:
|
||||||
|
- $ref: "#/components/schemas/Foo"
|
||||||
|
- $ref: "#/components/schemas/FooRef"
|
||||||
|
discriminator:
|
||||||
|
propertyName: "@type"
|
||||||
|
mapping:
|
||||||
|
Foo: "#/components/schemas/Foo"
|
||||||
|
FooRef: "#/components/schemas/FooRef"
|
||||||
|
|
||||||
|
Foo:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
fooPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
|
||||||
|
FooRef:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
foorefPropA:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/EntityRef'
|
||||||
|
|
||||||
|
requestBodies:
|
||||||
|
Foo:
|
||||||
|
description: The Foo to be created
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Foo'
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: Deleted
|
||||||
|
content: { }
|
||||||
|
201Foo:
|
||||||
|
description: Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
200FooArray:
|
||||||
|
description: Success
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
@ -0,0 +1,178 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: ByRefOrValue
|
||||||
|
description: >
|
||||||
|
This tests for a oneOf interface representation
|
||||||
|
version: 0.0.1
|
||||||
|
servers:
|
||||||
|
- url: "http://localhost:8080"
|
||||||
|
tags:
|
||||||
|
- name: Foo
|
||||||
|
- name: Bar
|
||||||
|
paths:
|
||||||
|
/foo:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
summary: GET all Foos
|
||||||
|
operationId: getAllFoos
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
$ref: '#/components/responses/200FooArray'
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
summary: Create a Foo
|
||||||
|
operationId: createFoo
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Foo'
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
$ref: '#/components/responses/201Foo'
|
||||||
|
/bar:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Bar
|
||||||
|
summary: Create a Bar
|
||||||
|
operationId: createBar
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
'application/json':
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Bar_Create'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Bar created
|
||||||
|
content:
|
||||||
|
'application/json':
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Bar'
|
||||||
|
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
Addressable:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
description: Hyperlink reference
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: unique identifier
|
||||||
|
description: Base schema for adressable entities
|
||||||
|
Extensible:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
"@schemaLocation":
|
||||||
|
type: string
|
||||||
|
description: A URI to a JSON-Schema file that defines additional attributes
|
||||||
|
and relationships
|
||||||
|
"@baseType":
|
||||||
|
type: string
|
||||||
|
description: When sub-classing, this defines the super-class
|
||||||
|
"@type":
|
||||||
|
type: string
|
||||||
|
description: When sub-classing, this defines the sub-class Extensible name
|
||||||
|
required:
|
||||||
|
- '@type'
|
||||||
|
Entity:
|
||||||
|
type: object
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
allOf:
|
||||||
|
- "$ref": "#/components/schemas/Addressable"
|
||||||
|
- "$ref": "#/components/schemas/Extensible"
|
||||||
|
EntityRef:
|
||||||
|
type: object
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
description: Entity reference schema to be use for all entityRef class.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: Name of the related entity.
|
||||||
|
'@referredType':
|
||||||
|
type: string
|
||||||
|
description: The actual type of the target instance when needed for disambiguation.
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Addressable'
|
||||||
|
- "$ref": "#/components/schemas/Extensible"
|
||||||
|
FooRefOrValue:
|
||||||
|
type: object
|
||||||
|
oneOf:
|
||||||
|
- $ref: "#/components/schemas/Foo"
|
||||||
|
- $ref: "#/components/schemas/FooRef"
|
||||||
|
discriminator:
|
||||||
|
propertyName: "@type"
|
||||||
|
Foo:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
fooPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
FooRef:
|
||||||
|
type: object
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
properties:
|
||||||
|
foorefPropA:
|
||||||
|
type: string
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/EntityRef'
|
||||||
|
Bar_Create:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
barPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
foo:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
Bar:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
barPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
foo:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
|
||||||
|
requestBodies:
|
||||||
|
Foo:
|
||||||
|
description: The Foo to be created
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Foo'
|
||||||
|
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: Deleted
|
||||||
|
content: { }
|
||||||
|
201Foo:
|
||||||
|
description: Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
200FooArray:
|
||||||
|
description: Success
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
@ -0,0 +1,22 @@
|
|||||||
|
README.md
|
||||||
|
pom.xml
|
||||||
|
src/main/java/org/openapitools/OpenApiGeneratorApplication.java
|
||||||
|
src/main/java/org/openapitools/RFC3339DateFormat.java
|
||||||
|
src/main/java/org/openapitools/api/ApiUtil.java
|
||||||
|
src/main/java/org/openapitools/api/BarApi.java
|
||||||
|
src/main/java/org/openapitools/api/BarApiController.java
|
||||||
|
src/main/java/org/openapitools/api/FooApi.java
|
||||||
|
src/main/java/org/openapitools/api/FooApiController.java
|
||||||
|
src/main/java/org/openapitools/configuration/HomeController.java
|
||||||
|
src/main/java/org/openapitools/model/Addressable.java
|
||||||
|
src/main/java/org/openapitools/model/Bar.java
|
||||||
|
src/main/java/org/openapitools/model/BarCreate.java
|
||||||
|
src/main/java/org/openapitools/model/Entity.java
|
||||||
|
src/main/java/org/openapitools/model/EntityRef.java
|
||||||
|
src/main/java/org/openapitools/model/Extensible.java
|
||||||
|
src/main/java/org/openapitools/model/Foo.java
|
||||||
|
src/main/java/org/openapitools/model/FooRef.java
|
||||||
|
src/main/java/org/openapitools/model/FooRefOrValue.java
|
||||||
|
src/main/resources/application.properties
|
||||||
|
src/main/resources/openapi.yaml
|
||||||
|
src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java
|
@ -0,0 +1 @@
|
|||||||
|
6.0.0-SNAPSHOT
|
21
samples/openapi3/server/petstore/spring-boot-oneof/README.md
Normal file
21
samples/openapi3/server/petstore/spring-boot-oneof/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# OpenAPI generated server
|
||||||
|
|
||||||
|
Spring Boot Server
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
|
||||||
|
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
|
||||||
|
This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.
|
||||||
|
|
||||||
|
|
||||||
|
The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org).
|
||||||
|
Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes.
|
||||||
|
The specification is available to download using the following url:
|
||||||
|
http://localhost:8080/v3/api-docs/
|
||||||
|
|
||||||
|
Start your server as a simple java application
|
||||||
|
|
||||||
|
You can view the api documentation in swagger-ui by pointing to
|
||||||
|
http://localhost:8080/swagger-ui.html
|
||||||
|
|
||||||
|
Change default port value in application.properties
|
78
samples/openapi3/server/petstore/spring-boot-oneof/pom.xml
Normal file
78
samples/openapi3/server/petstore/spring-boot-oneof/pom.xml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.openapitools.openapi3</groupId>
|
||||||
|
<artifactId>springboot-oneof</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>springboot-oneof</name>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
<springdoc.version>1.6.4</springdoc.version>
|
||||||
|
<swagger-ui.version>4.4.1-1</swagger-ui.version>
|
||||||
|
</properties>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.6.3</version>
|
||||||
|
</parent>
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.data</groupId>
|
||||||
|
<artifactId>spring-data-commons</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--SpringDoc dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-ui</artifactId>
|
||||||
|
<version>${springdoc.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- @Nullable annotation -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
|
<artifactId>jsr305</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.openapitools</groupId>
|
||||||
|
<artifactId>jackson-databind-nullable</artifactId>
|
||||||
|
<version>0.2.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- Bean Validation API support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,23 @@
|
|||||||
|
package org.openapitools;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.Module;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullableModule;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan(basePackages = {"org.openapitools", "org.openapitools.api" , "org.openapitools.configuration"})
|
||||||
|
public class OpenApiGeneratorApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(OpenApiGeneratorApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Module jsonNullableModule() {
|
||||||
|
return new JsonNullableModule();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package org.openapitools;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.util.StdDateFormat;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.FieldPosition;
|
||||||
|
import java.text.ParsePosition;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
public class RFC3339DateFormat extends DateFormat {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
|
||||||
|
|
||||||
|
private final StdDateFormat fmt = new StdDateFormat()
|
||||||
|
.withTimeZone(TIMEZONE_Z)
|
||||||
|
.withColonInTimeZone(true);
|
||||||
|
|
||||||
|
public RFC3339DateFormat() {
|
||||||
|
this.calendar = new GregorianCalendar();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date parse(String source, ParsePosition pos) {
|
||||||
|
return fmt.parse(source, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
|
||||||
|
return fmt.format(date, toAppendTo, fieldPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object clone() {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.openapitools.api;
|
||||||
|
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class ApiUtil {
|
||||||
|
public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
|
||||||
|
try {
|
||||||
|
HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
|
res.addHeader("Content-Type", contentType);
|
||||||
|
res.getWriter().print(example);
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package org.openapitools.api;
|
||||||
|
|
||||||
|
import org.openapitools.model.Bar;
|
||||||
|
import org.openapitools.model.BarCreate;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
@Validated
|
||||||
|
@Tag(name = "bar", description = "the bar API")
|
||||||
|
public interface BarApi {
|
||||||
|
|
||||||
|
default Optional<NativeWebRequest> getRequest() {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POST /bar : Create a Bar
|
||||||
|
*
|
||||||
|
* @param barCreate (required)
|
||||||
|
* @return Bar created (status code 200)
|
||||||
|
*/
|
||||||
|
@Operation(
|
||||||
|
operationId = "createBar",
|
||||||
|
summary = "Create a Bar",
|
||||||
|
tags = { "Bar" },
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "Bar created", content = {
|
||||||
|
@Content(mediaType = "application/json", schema = @Schema(implementation = Bar.class))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@RequestMapping(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
value = "/bar",
|
||||||
|
produces = { "application/json" },
|
||||||
|
consumes = { "application/json" }
|
||||||
|
)
|
||||||
|
default ResponseEntity<Bar> createBar(
|
||||||
|
@Parameter(name = "BarCreate", description = "", required = true) @Valid @RequestBody BarCreate barCreate
|
||||||
|
) {
|
||||||
|
getRequest().ifPresent(request -> {
|
||||||
|
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||||
|
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||||
|
String exampleString = "{ \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"barPropA\" : \"barPropA\" }";
|
||||||
|
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package org.openapitools.api;
|
||||||
|
|
||||||
|
import org.openapitools.model.Bar;
|
||||||
|
import org.openapitools.model.BarCreate;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.CookieValue;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("${openapi.byRefOrValue.base-path:}")
|
||||||
|
public class BarApiController implements BarApi {
|
||||||
|
|
||||||
|
private final NativeWebRequest request;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public BarApiController(NativeWebRequest request) {
|
||||||
|
this.request = request;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<NativeWebRequest> getRequest() {
|
||||||
|
return Optional.ofNullable(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.0.0-SNAPSHOT).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package org.openapitools.api;
|
||||||
|
|
||||||
|
import org.openapitools.model.Foo;
|
||||||
|
import org.openapitools.model.FooRefOrValue;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
@Validated
|
||||||
|
@Tag(name = "foo", description = "the foo API")
|
||||||
|
public interface FooApi {
|
||||||
|
|
||||||
|
default Optional<NativeWebRequest> getRequest() {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POST /foo : Create a Foo
|
||||||
|
*
|
||||||
|
* @param foo The Foo to be created (optional)
|
||||||
|
* @return Error (status code 201)
|
||||||
|
*/
|
||||||
|
@Operation(
|
||||||
|
operationId = "createFoo",
|
||||||
|
summary = "Create a Foo",
|
||||||
|
tags = { "Foo" },
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "201", description = "Error", content = {
|
||||||
|
@Content(mediaType = "application/json", schema = @Schema(implementation = FooRefOrValue.class))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@RequestMapping(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
value = "/foo",
|
||||||
|
produces = { "application/json" },
|
||||||
|
consumes = { "application/json;charset=utf-8" }
|
||||||
|
)
|
||||||
|
default ResponseEntity<FooRefOrValue> createFoo(
|
||||||
|
@Parameter(name = "Foo", description = "The Foo to be created") @Valid @RequestBody(required = false) Foo foo
|
||||||
|
) {
|
||||||
|
getRequest().ifPresent(request -> {
|
||||||
|
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||||
|
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||||
|
String exampleString = "null";
|
||||||
|
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GET /foo : GET all Foos
|
||||||
|
*
|
||||||
|
* @return Success (status code 200)
|
||||||
|
*/
|
||||||
|
@Operation(
|
||||||
|
operationId = "getAllFoos",
|
||||||
|
summary = "GET all Foos",
|
||||||
|
tags = { "Foo" },
|
||||||
|
responses = {
|
||||||
|
@ApiResponse(responseCode = "200", description = "Success", content = {
|
||||||
|
@Content(mediaType = "application/json;charset=utf-8", schema = @Schema(implementation = FooRefOrValue.class))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@RequestMapping(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
value = "/foo",
|
||||||
|
produces = { "application/json;charset=utf-8" }
|
||||||
|
)
|
||||||
|
default ResponseEntity<List<FooRefOrValue>> getAllFoos(
|
||||||
|
|
||||||
|
) {
|
||||||
|
getRequest().ifPresent(request -> {
|
||||||
|
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||||
|
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json;charset=utf-8"))) {
|
||||||
|
String exampleString = "null";
|
||||||
|
ApiUtil.setExampleResponse(request, "application/json;charset=utf-8", exampleString);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package org.openapitools.api;
|
||||||
|
|
||||||
|
import org.openapitools.model.Foo;
|
||||||
|
import org.openapitools.model.FooRefOrValue;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.CookieValue;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.context.request.NativeWebRequest;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("${openapi.byRefOrValue.base-path:}")
|
||||||
|
public class FooApiController implements FooApi {
|
||||||
|
|
||||||
|
private final NativeWebRequest request;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public FooApiController(NativeWebRequest request) {
|
||||||
|
this.request = request;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<NativeWebRequest> getRequest() {
|
||||||
|
return Optional.ofNullable(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package org.openapitools.configuration;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home redirection to OpenAPI api documentation
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class HomeController {
|
||||||
|
|
||||||
|
@RequestMapping("/")
|
||||||
|
public String index() {
|
||||||
|
return "redirect:swagger-ui.html";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base schema for adressable entities
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "Addressable", description = "Base schema for adressable entities")
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class Addressable {
|
||||||
|
|
||||||
|
@JsonProperty("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
public Addressable href(String href) {
|
||||||
|
this.href = href;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hyperlink reference
|
||||||
|
* @return href
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "href", description = "Hyperlink reference", required = false)
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Addressable id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unique identifier
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "id", description = "unique identifier", required = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Addressable addressable = (Addressable) o;
|
||||||
|
return Objects.equals(this.href, addressable.href) &&
|
||||||
|
Objects.equals(this.id, addressable.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(href, id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Addressable {\n");
|
||||||
|
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,163 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.Entity;
|
||||||
|
import org.openapitools.model.FooRefOrValue;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bar
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class Bar extends Entity {
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@JsonProperty("barPropA")
|
||||||
|
private String barPropA;
|
||||||
|
|
||||||
|
@JsonProperty("fooPropB")
|
||||||
|
private String fooPropB;
|
||||||
|
|
||||||
|
@JsonProperty("foo")
|
||||||
|
private FooRefOrValue foo;
|
||||||
|
|
||||||
|
public Bar id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "id", required = true)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bar barPropA(String barPropA) {
|
||||||
|
this.barPropA = barPropA;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get barPropA
|
||||||
|
* @return barPropA
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "barPropA", required = false)
|
||||||
|
public String getBarPropA() {
|
||||||
|
return barPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBarPropA(String barPropA) {
|
||||||
|
this.barPropA = barPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bar fooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fooPropB
|
||||||
|
* @return fooPropB
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "fooPropB", required = false)
|
||||||
|
public String getFooPropB() {
|
||||||
|
return fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bar foo(FooRefOrValue foo) {
|
||||||
|
this.foo = foo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get foo
|
||||||
|
* @return foo
|
||||||
|
*/
|
||||||
|
@Valid
|
||||||
|
@Schema(name = "foo", required = false)
|
||||||
|
public FooRefOrValue getFoo() {
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFoo(FooRefOrValue foo) {
|
||||||
|
this.foo = foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Bar bar = (Bar) o;
|
||||||
|
return Objects.equals(this.id, bar.id) &&
|
||||||
|
Objects.equals(this.barPropA, bar.barPropA) &&
|
||||||
|
Objects.equals(this.fooPropB, bar.fooPropB) &&
|
||||||
|
Objects.equals(this.foo, bar.foo) &&
|
||||||
|
super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(id, barPropA, fooPropB, foo, super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Bar {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n");
|
||||||
|
sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n");
|
||||||
|
sb.append(" foo: ").append(toIndentedString(foo)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,141 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
|
import org.openapitools.model.Entity;
|
||||||
|
import org.openapitools.model.FooRefOrValue;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BarCreate
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@JsonTypeName("Bar_Create")
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class BarCreate extends Entity {
|
||||||
|
|
||||||
|
@JsonProperty("barPropA")
|
||||||
|
private String barPropA;
|
||||||
|
|
||||||
|
@JsonProperty("fooPropB")
|
||||||
|
private String fooPropB;
|
||||||
|
|
||||||
|
@JsonProperty("foo")
|
||||||
|
private FooRefOrValue foo;
|
||||||
|
|
||||||
|
public BarCreate barPropA(String barPropA) {
|
||||||
|
this.barPropA = barPropA;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get barPropA
|
||||||
|
* @return barPropA
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "barPropA", required = false)
|
||||||
|
public String getBarPropA() {
|
||||||
|
return barPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBarPropA(String barPropA) {
|
||||||
|
this.barPropA = barPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BarCreate fooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fooPropB
|
||||||
|
* @return fooPropB
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "fooPropB", required = false)
|
||||||
|
public String getFooPropB() {
|
||||||
|
return fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BarCreate foo(FooRefOrValue foo) {
|
||||||
|
this.foo = foo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get foo
|
||||||
|
* @return foo
|
||||||
|
*/
|
||||||
|
@Valid
|
||||||
|
@Schema(name = "foo", required = false)
|
||||||
|
public FooRefOrValue getFoo() {
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFoo(FooRefOrValue foo) {
|
||||||
|
this.foo = foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
BarCreate barCreate = (BarCreate) o;
|
||||||
|
return Objects.equals(this.barPropA, barCreate.barPropA) &&
|
||||||
|
Objects.equals(this.fooPropB, barCreate.fooPropB) &&
|
||||||
|
Objects.equals(this.foo, barCreate.foo) &&
|
||||||
|
super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(barPropA, fooPropB, foo, super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class BarCreate {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append(" barPropA: ").append(toIndentedString(barPropA)).append("\n");
|
||||||
|
sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n");
|
||||||
|
sb.append(" foo: ").append(toIndentedString(foo)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,198 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.Addressable;
|
||||||
|
import org.openapitools.model.Bar;
|
||||||
|
import org.openapitools.model.BarCreate;
|
||||||
|
import org.openapitools.model.Extensible;
|
||||||
|
import org.openapitools.model.Foo;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity
|
||||||
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the @type to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = Bar.class, name = "Bar"),
|
||||||
|
@JsonSubTypes.Type(value = BarCreate.class, name = "Bar_Create"),
|
||||||
|
@JsonSubTypes.Type(value = Foo.class, name = "Foo")
|
||||||
|
})
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class Entity {
|
||||||
|
|
||||||
|
@JsonProperty("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@JsonProperty("@schemaLocation")
|
||||||
|
private String atSchemaLocation;
|
||||||
|
|
||||||
|
@JsonProperty("@baseType")
|
||||||
|
private String atBaseType;
|
||||||
|
|
||||||
|
@JsonProperty("@type")
|
||||||
|
private String atType;
|
||||||
|
|
||||||
|
public Entity href(String href) {
|
||||||
|
this.href = href;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hyperlink reference
|
||||||
|
* @return href
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "href", description = "Hyperlink reference", required = false)
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unique identifier
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "id", description = "unique identifier", required = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity atSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||||
|
* @return atSchemaLocation
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false)
|
||||||
|
public String getAtSchemaLocation() {
|
||||||
|
return atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity atBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the super-class
|
||||||
|
* @return atBaseType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false)
|
||||||
|
public String getAtBaseType() {
|
||||||
|
return atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity atType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the sub-class Extensible name
|
||||||
|
* @return atType
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true)
|
||||||
|
public String getAtType() {
|
||||||
|
return atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Entity entity = (Entity) o;
|
||||||
|
return Objects.equals(this.href, entity.href) &&
|
||||||
|
Objects.equals(this.id, entity.id) &&
|
||||||
|
Objects.equals(this.atSchemaLocation, entity.atSchemaLocation) &&
|
||||||
|
Objects.equals(this.atBaseType, entity.atBaseType) &&
|
||||||
|
Objects.equals(this.atType, entity.atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(href, id, atSchemaLocation, atBaseType, atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Entity {\n");
|
||||||
|
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||||
|
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||||
|
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,243 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.Addressable;
|
||||||
|
import org.openapitools.model.Extensible;
|
||||||
|
import org.openapitools.model.FooRef;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Entity reference schema to be use for all entityRef class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "EntityRef", description = "Entity reference schema to be use for all entityRef class.")
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the @type to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = FooRef.class, name = "FooRef")
|
||||||
|
})
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class EntityRef {
|
||||||
|
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@JsonProperty("@referredType")
|
||||||
|
private String atReferredType;
|
||||||
|
|
||||||
|
@JsonProperty("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@JsonProperty("@schemaLocation")
|
||||||
|
private String atSchemaLocation;
|
||||||
|
|
||||||
|
@JsonProperty("@baseType")
|
||||||
|
private String atBaseType;
|
||||||
|
|
||||||
|
@JsonProperty("@type")
|
||||||
|
private String atType;
|
||||||
|
|
||||||
|
public EntityRef name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of the related entity.
|
||||||
|
* @return name
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "name", description = "Name of the related entity.", required = false)
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef atReferredType(String atReferredType) {
|
||||||
|
this.atReferredType = atReferredType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The actual type of the target instance when needed for disambiguation.
|
||||||
|
* @return atReferredType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", required = false)
|
||||||
|
public String getAtReferredType() {
|
||||||
|
return atReferredType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtReferredType(String atReferredType) {
|
||||||
|
this.atReferredType = atReferredType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef href(String href) {
|
||||||
|
this.href = href;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hyperlink reference
|
||||||
|
* @return href
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "href", description = "Hyperlink reference", required = false)
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unique identifier
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "id", description = "unique identifier", required = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef atSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||||
|
* @return atSchemaLocation
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false)
|
||||||
|
public String getAtSchemaLocation() {
|
||||||
|
return atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef atBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the super-class
|
||||||
|
* @return atBaseType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false)
|
||||||
|
public String getAtBaseType() {
|
||||||
|
return atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityRef atType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the sub-class Extensible name
|
||||||
|
* @return atType
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true)
|
||||||
|
public String getAtType() {
|
||||||
|
return atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
EntityRef entityRef = (EntityRef) o;
|
||||||
|
return Objects.equals(this.name, entityRef.name) &&
|
||||||
|
Objects.equals(this.atReferredType, entityRef.atReferredType) &&
|
||||||
|
Objects.equals(this.href, entityRef.href) &&
|
||||||
|
Objects.equals(this.id, entityRef.id) &&
|
||||||
|
Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) &&
|
||||||
|
Objects.equals(this.atBaseType, entityRef.atBaseType) &&
|
||||||
|
Objects.equals(this.atType, entityRef.atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, atReferredType, href, id, atSchemaLocation, atBaseType, atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class EntityRef {\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n");
|
||||||
|
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||||
|
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||||
|
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,131 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extensible
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class Extensible {
|
||||||
|
|
||||||
|
@JsonProperty("@schemaLocation")
|
||||||
|
private String atSchemaLocation;
|
||||||
|
|
||||||
|
@JsonProperty("@baseType")
|
||||||
|
private String atBaseType;
|
||||||
|
|
||||||
|
@JsonProperty("@type")
|
||||||
|
private String atType;
|
||||||
|
|
||||||
|
public Extensible atSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||||
|
* @return atSchemaLocation
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false)
|
||||||
|
public String getAtSchemaLocation() {
|
||||||
|
return atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Extensible atBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the super-class
|
||||||
|
* @return atBaseType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false)
|
||||||
|
public String getAtBaseType() {
|
||||||
|
return atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Extensible atType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the sub-class Extensible name
|
||||||
|
* @return atType
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true)
|
||||||
|
public String getAtType() {
|
||||||
|
return atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Extensible extensible = (Extensible) o;
|
||||||
|
return Objects.equals(this.atSchemaLocation, extensible.atSchemaLocation) &&
|
||||||
|
Objects.equals(this.atBaseType, extensible.atBaseType) &&
|
||||||
|
Objects.equals(this.atType, extensible.atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(atSchemaLocation, atBaseType, atType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Extensible {\n");
|
||||||
|
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||||
|
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||||
|
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,234 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.Entity;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Foo
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class Foo extends Entity implements FooRefOrValue {
|
||||||
|
|
||||||
|
@JsonProperty("fooPropA")
|
||||||
|
private String fooPropA;
|
||||||
|
|
||||||
|
@JsonProperty("fooPropB")
|
||||||
|
private String fooPropB;
|
||||||
|
|
||||||
|
@JsonProperty("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@JsonProperty("@schemaLocation")
|
||||||
|
private String atSchemaLocation;
|
||||||
|
|
||||||
|
@JsonProperty("@baseType")
|
||||||
|
private String atBaseType;
|
||||||
|
|
||||||
|
@JsonProperty("@type")
|
||||||
|
private String atType;
|
||||||
|
|
||||||
|
public Foo fooPropA(String fooPropA) {
|
||||||
|
this.fooPropA = fooPropA;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fooPropA
|
||||||
|
* @return fooPropA
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "fooPropA", required = false)
|
||||||
|
public String getFooPropA() {
|
||||||
|
return fooPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFooPropA(String fooPropA) {
|
||||||
|
this.fooPropA = fooPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo fooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fooPropB
|
||||||
|
* @return fooPropB
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "fooPropB", required = false)
|
||||||
|
public String getFooPropB() {
|
||||||
|
return fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFooPropB(String fooPropB) {
|
||||||
|
this.fooPropB = fooPropB;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo href(String href) {
|
||||||
|
this.href = href;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hyperlink reference
|
||||||
|
* @return href
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "href", description = "Hyperlink reference", required = false)
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unique identifier
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "id", description = "unique identifier", required = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo atSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||||
|
* @return atSchemaLocation
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false)
|
||||||
|
public String getAtSchemaLocation() {
|
||||||
|
return atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo atBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the super-class
|
||||||
|
* @return atBaseType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false)
|
||||||
|
public String getAtBaseType() {
|
||||||
|
return atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Foo atType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the sub-class Extensible name
|
||||||
|
* @return atType
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true)
|
||||||
|
public String getAtType() {
|
||||||
|
return atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Foo foo = (Foo) o;
|
||||||
|
return Objects.equals(this.fooPropA, foo.fooPropA) &&
|
||||||
|
Objects.equals(this.fooPropB, foo.fooPropB) &&
|
||||||
|
Objects.equals(this.href, foo.href) &&
|
||||||
|
Objects.equals(this.id, foo.id) &&
|
||||||
|
Objects.equals(this.atSchemaLocation, foo.atSchemaLocation) &&
|
||||||
|
Objects.equals(this.atBaseType, foo.atBaseType) &&
|
||||||
|
Objects.equals(this.atType, foo.atType) &&
|
||||||
|
super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(fooPropA, fooPropB, href, id, atSchemaLocation, atBaseType, atType, super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Foo {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append(" fooPropA: ").append(toIndentedString(fooPropA)).append("\n");
|
||||||
|
sb.append(" fooPropB: ").append(toIndentedString(fooPropB)).append("\n");
|
||||||
|
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||||
|
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||||
|
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,210 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.EntityRef;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FooRef
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public class FooRef extends EntityRef implements FooRefOrValue {
|
||||||
|
|
||||||
|
@JsonProperty("foorefPropA")
|
||||||
|
private String foorefPropA;
|
||||||
|
|
||||||
|
@JsonProperty("href")
|
||||||
|
private String href;
|
||||||
|
|
||||||
|
@JsonProperty("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@JsonProperty("@schemaLocation")
|
||||||
|
private String atSchemaLocation;
|
||||||
|
|
||||||
|
@JsonProperty("@baseType")
|
||||||
|
private String atBaseType;
|
||||||
|
|
||||||
|
@JsonProperty("@type")
|
||||||
|
private String atType;
|
||||||
|
|
||||||
|
public FooRef foorefPropA(String foorefPropA) {
|
||||||
|
this.foorefPropA = foorefPropA;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get foorefPropA
|
||||||
|
* @return foorefPropA
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "foorefPropA", required = false)
|
||||||
|
public String getFoorefPropA() {
|
||||||
|
return foorefPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFoorefPropA(String foorefPropA) {
|
||||||
|
this.foorefPropA = foorefPropA;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FooRef href(String href) {
|
||||||
|
this.href = href;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hyperlink reference
|
||||||
|
* @return href
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "href", description = "Hyperlink reference", required = false)
|
||||||
|
public String getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHref(String href) {
|
||||||
|
this.href = href;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FooRef id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* unique identifier
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "id", description = "unique identifier", required = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FooRef atSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||||
|
* @return atSchemaLocation
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", required = false)
|
||||||
|
public String getAtSchemaLocation() {
|
||||||
|
return atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtSchemaLocation(String atSchemaLocation) {
|
||||||
|
this.atSchemaLocation = atSchemaLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FooRef atBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the super-class
|
||||||
|
* @return atBaseType
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", required = false)
|
||||||
|
public String getAtBaseType() {
|
||||||
|
return atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtBaseType(String atBaseType) {
|
||||||
|
this.atBaseType = atBaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FooRef atType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When sub-classing, this defines the sub-class Extensible name
|
||||||
|
* @return atType
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", required = true)
|
||||||
|
public String getAtType() {
|
||||||
|
return atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAtType(String atType) {
|
||||||
|
this.atType = atType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FooRef fooRef = (FooRef) o;
|
||||||
|
return Objects.equals(this.foorefPropA, fooRef.foorefPropA) &&
|
||||||
|
Objects.equals(this.href, fooRef.href) &&
|
||||||
|
Objects.equals(this.id, fooRef.id) &&
|
||||||
|
Objects.equals(this.atSchemaLocation, fooRef.atSchemaLocation) &&
|
||||||
|
Objects.equals(this.atBaseType, fooRef.atBaseType) &&
|
||||||
|
Objects.equals(this.atType, fooRef.atType) &&
|
||||||
|
super.equals(o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(foorefPropA, href, id, atSchemaLocation, atBaseType, atType, super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class FooRef {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append(" foorefPropA: ").append(toIndentedString(foorefPropA)).append("\n");
|
||||||
|
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||||
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
|
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||||
|
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||||
|
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.Foo;
|
||||||
|
import org.openapitools.model.FooRef;
|
||||||
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.annotation.Generated;
|
||||||
|
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the @type to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = Foo.class, name = "Foo"),
|
||||||
|
@JsonSubTypes.Type(value = FooRef.class, name = "FooRef")
|
||||||
|
})
|
||||||
|
|
||||||
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
|
public interface FooRefOrValue {
|
||||||
|
public String getAtType();
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
server.port=8080
|
||||||
|
spring.jackson.date-format=org.openapitools.RFC3339DateFormat
|
||||||
|
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
@ -0,0 +1,205 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
description: |
|
||||||
|
This tests for a oneOf interface representation
|
||||||
|
title: ByRefOrValue
|
||||||
|
version: 0.0.1
|
||||||
|
servers:
|
||||||
|
- url: http://localhost:8080
|
||||||
|
tags:
|
||||||
|
- name: Foo
|
||||||
|
- name: Bar
|
||||||
|
paths:
|
||||||
|
/foo:
|
||||||
|
get:
|
||||||
|
operationId: getAllFoos
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
type: array
|
||||||
|
description: Success
|
||||||
|
summary: GET all Foos
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
x-accepts: application/json;charset=utf-8
|
||||||
|
x-tags:
|
||||||
|
- tag: Foo
|
||||||
|
post:
|
||||||
|
operationId: createFoo
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Foo'
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
description: Error
|
||||||
|
summary: Create a Foo
|
||||||
|
tags:
|
||||||
|
- Foo
|
||||||
|
x-contentType: application/json;charset=utf-8
|
||||||
|
x-accepts: application/json
|
||||||
|
x-tags:
|
||||||
|
- tag: Foo
|
||||||
|
/bar:
|
||||||
|
post:
|
||||||
|
operationId: createBar
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Bar_Create'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Bar'
|
||||||
|
description: Bar created
|
||||||
|
summary: Create a Bar
|
||||||
|
tags:
|
||||||
|
- Bar
|
||||||
|
x-contentType: application/json
|
||||||
|
x-accepts: application/json
|
||||||
|
x-tags:
|
||||||
|
- tag: Bar
|
||||||
|
components:
|
||||||
|
requestBodies:
|
||||||
|
Foo:
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Foo'
|
||||||
|
description: The Foo to be created
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
content: {}
|
||||||
|
description: Deleted
|
||||||
|
"201Foo":
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
description: Error
|
||||||
|
"200FooArray":
|
||||||
|
content:
|
||||||
|
application/json;charset=utf-8:
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
type: array
|
||||||
|
description: Success
|
||||||
|
schemas:
|
||||||
|
Addressable:
|
||||||
|
description: Base schema for adressable entities
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
description: Hyperlink reference
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
description: unique identifier
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Extensible:
|
||||||
|
properties:
|
||||||
|
'@schemaLocation':
|
||||||
|
description: A URI to a JSON-Schema file that defines additional attributes
|
||||||
|
and relationships
|
||||||
|
type: string
|
||||||
|
'@baseType':
|
||||||
|
description: "When sub-classing, this defines the super-class"
|
||||||
|
type: string
|
||||||
|
'@type':
|
||||||
|
description: "When sub-classing, this defines the sub-class Extensible name"
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- '@type'
|
||||||
|
type: object
|
||||||
|
Entity:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Addressable'
|
||||||
|
- $ref: '#/components/schemas/Extensible'
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
type: object
|
||||||
|
EntityRef:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Addressable'
|
||||||
|
- $ref: '#/components/schemas/Extensible'
|
||||||
|
description: Entity reference schema to be use for all entityRef class.
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
description: Name of the related entity.
|
||||||
|
type: string
|
||||||
|
'@referredType':
|
||||||
|
description: The actual type of the target instance when needed for disambiguation.
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
FooRefOrValue:
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/Foo'
|
||||||
|
- $ref: '#/components/schemas/FooRef'
|
||||||
|
type: object
|
||||||
|
x-one-of-name: FooRefOrValue
|
||||||
|
Foo:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
example:
|
||||||
|
fooPropA: fooPropA
|
||||||
|
fooPropB: fooPropB
|
||||||
|
properties:
|
||||||
|
fooPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
FooRef:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/EntityRef'
|
||||||
|
discriminator:
|
||||||
|
propertyName: '@type'
|
||||||
|
properties:
|
||||||
|
foorefPropA:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Bar_Create:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
properties:
|
||||||
|
barPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
foo:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
type: object
|
||||||
|
Bar:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Entity'
|
||||||
|
example:
|
||||||
|
foo: null
|
||||||
|
id: id
|
||||||
|
fooPropB: fooPropB
|
||||||
|
barPropA: barPropA
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
barPropA:
|
||||||
|
type: string
|
||||||
|
fooPropB:
|
||||||
|
type: string
|
||||||
|
foo:
|
||||||
|
$ref: '#/components/schemas/FooRefOrValue'
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
type: object
|
@ -0,0 +1,13 @@
|
|||||||
|
package org.openapitools;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
class OpenApiGeneratorApplicationTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -28,8 +31,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -19,6 +23,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -19,6 +22,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import org.openapitools.model.BigCatAllOf;
|
import org.openapitools.model.BigCatAllOf;
|
||||||
import org.openapitools.model.Cat;
|
import org.openapitools.model.Cat;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,9 +2,13 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
import org.openapitools.model.DogAllOf;
|
import org.openapitools.model.DogAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -29,8 +32,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -20,6 +24,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -20,6 +23,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,8 +33,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -22,6 +25,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -21,6 +25,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,8 +33,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -22,6 +25,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -21,6 +25,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,8 +33,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -22,6 +25,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -21,6 +25,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,8 +33,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -22,6 +25,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -21,6 +25,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -30,8 +33,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -22,6 +25,7 @@ import javax.annotation.Generated;
|
|||||||
* BigCat
|
* BigCat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class BigCat extends Cat {
|
public class BigCat extends Cat {
|
||||||
|
|
||||||
|
@ -2,11 +2,15 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
|
import org.openapitools.model.BigCat;
|
||||||
import org.openapitools.model.CatAllOf;
|
import org.openapitools.model.CatAllOf;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -21,6 +25,15 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(
|
||||||
|
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
|
||||||
|
allowSetters = true // allows the className to be set during deserialization
|
||||||
|
)
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat")
|
||||||
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +31,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +31,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +31,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Dog extends Animal {
|
public class Dog extends Animal {
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.openapitools.model.Cat;
|
||||||
|
import org.openapitools.model.Dog;
|
||||||
import org.openapitools.jackson.nullable.JsonNullable;
|
import org.openapitools.jackson.nullable.JsonNullable;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -29,8 +31,9 @@ import javax.annotation.Generated;
|
|||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
|
||||||
@JsonSubTypes({
|
@JsonSubTypes({
|
||||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog")
|
||||||
})
|
})
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Animal {
|
public class Animal {
|
||||||
|
|
||||||
|
@ -2,8 +2,11 @@ package org.openapitools.model;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.openapitools.model.Animal;
|
import org.openapitools.model.Animal;
|
||||||
@ -21,6 +24,7 @@ import javax.annotation.Generated;
|
|||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||||
public class Cat extends Animal {
|
public class Cat extends Animal {
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user