Compare commits

...

6 Commits

Author SHA1 Message Date
William Cheng
cce4139af6 v7.5.0 release (#18411) 2024-04-17 16:24:01 +08:00
William Cheng
7609273a02 fix string compare in haskell generator (#18410) 2024-04-17 15:13:05 +08:00
William Cheng
dd97def5fa update undertow to newer version (#18409) 2024-04-17 11:29:06 +08:00
lizzyTheLizard
213564a5aa #18388: Add Mutiny support to JaxRS (#18389)
* #18388: Add Mutiny support to JaxRS

* Updated samples

* Updated doccs

* Updated example to 3_0

* Updated sample
2024-04-17 11:20:39 +08:00
devhl-labs
7b0f963c74 [csharp][generichost] Delete samples (#18323)
* delete samples

* rebuild samples

* test to see if the pr gate fails

* make the samples generate twice

* pr gate successfully failed

* minor cleanup

* minor cleanup
2024-04-16 15:10:19 +08:00
devhl-labs
c109399f3f fixed property naming convention for composed types (#18312) 2024-04-16 15:09:15 +08:00
146 changed files with 15569 additions and 726 deletions

View File

@@ -140,8 +140,23 @@ jobs:
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
- name: Generate samples
run: bash bin/generate-samples.sh
run: |
bash bin/generate-samples.sh
# when a sample is deleted, you have to generate it twice for all files to get created
bash bin/generate-samples.sh
- name: Verify git status
run: |
if [[ "$(git status --porcelain)" != "" ]]; then

View File

@@ -0,0 +1,15 @@
generatorName: jaxrs-spec
outputDir: samples/server/petstore/jaxrs-spec-quarkus-mutiny
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/spec
additionalProperties:
artifactId: jaxrs-spec-petstore-server
serializableModel: "true"
hideGenerationTimestamp: "true"
implicitHeadersRegex: (api_key|enum_header_string)
generateBuilders: "true"
useMicroProfileOpenAPIAnnotations: "true"
useAsync: "true"
useMutiny: "true"
library: "quarkus"
dateLibrary: "java8-localdatetime"

View File

@@ -78,6 +78,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useMicroProfileOpenAPIAnnotations|Whether to generate Microprofile OpenAPI annotations. Only valid when library is set to quarkus.| |false|
|useMutiny|Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|useTags|use tags for creating interface and controller classnames| |false|

View File

@@ -78,6 +78,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useBeanValidation|Use BeanValidation API annotations| |true|
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
|useMicroProfileOpenAPIAnnotations|Whether to generate Microprofile OpenAPI annotations. Only valid when library is set to quarkus.| |false|
|useMutiny|Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.| |false|
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|useSwaggerAnnotations|Whether to generate Swagger annotations.| |true|
|useTags|use tags for creating interface and controller classnames| |false|

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -6,7 +6,7 @@
<artifactId>openapi-generator-project</artifactId>
<groupId>org.openapitools</groupId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -1,5 +1,5 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.5.0-SNAPSHOT
openApiGeneratorVersion=7.5.0
# /RELEASE_VERSION
# BEGIN placeholders

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -1,3 +1,3 @@
# RELEASE_VERSION
openApiGeneratorVersion=7.5.0-SNAPSHOT
openApiGeneratorVersion=7.5.0
# /RELEASE_VERSION

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -15,7 +15,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -19,7 +19,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<dependencies>
<dependency>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -13,7 +13,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -20,7 +20,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<executions>
<execution>

View File

@@ -5,7 +5,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<relativePath>../..</relativePath>
</parent>

View File

@@ -585,7 +585,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
List<CodegenProperty> allOf = composedSchemas.getAllOf();
if (allOf != null) {
for (CodegenProperty property : allOf) {
property.name = patchPropertyName(model, property.baseType);
property.name = patchPropertyName(model, camelize(property.baseType));
patchPropertyVendorExtensions(property);
}
}
@@ -594,7 +594,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
if (anyOf != null) {
removePropertiesDeclaredInComposedTypes(objs, model, anyOf);
for (CodegenProperty property : anyOf) {
property.name = patchPropertyName(model, property.baseType);
property.name = patchPropertyName(model, camelize(property.baseType));
property.isNullable = true;
patchPropertyVendorExtensions(property);
}
@@ -604,7 +604,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
if (oneOf != null) {
removePropertiesDeclaredInComposedTypes(objs, model, oneOf);
for (CodegenProperty property : oneOf) {
property.name = patchPropertyName(model, property.baseType);
property.name = patchPropertyName(model, camelize(property.baseType));
property.isNullable = true;
patchPropertyVendorExtensions(property);
}

View File

@@ -333,13 +333,14 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
/**
* Internal method to set the generateToSchema parameter.
*
* <p>
* Basically we're generating ToSchema instances (generically) for all schemas.
* However, if any of the contained datatypes doesn't have the ToSchema instance,
* we cannot generate it for its "ancestor" type.
* This is the case with the "Data.Aeson.Value" type: it doesn't (and cannot) have
* a Swagger-compatible ToSchema instance. So we have to detect its presence "downstream"
* the current schema, and if we find it we just don't generate any ToSchema instance.
*
* @param model
*/
private void setGenerateToSchema(CodegenModel model) {
@@ -356,7 +357,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
List<CodegenModel> children = model.getChildren();
if (children != null) {
for(CodegenModel child : children) {
for (CodegenModel child : children) {
setGenerateToSchema(child);
}
}
@@ -512,7 +513,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
// Query parameters appended to routes
for (CodegenParameter param : op.queryParams) {
String paramType = param.dataType;
if (param.contentType == "application/json") {
if ("application/json".equals(param.contentType)) {
if (param.isArray) {
paramType = "[JSONQueryParam " + paramType.substring(1, paramType.length() - 1) + "]";
} else {
@@ -554,7 +555,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
path.add("Header \"" + param.baseName + "\" " + param.dataType);
String paramType = param.dataType;
if (param.contentType == "application/json") {
if ("application/json".equals(param.contentType)) {
if (param.isArray) {
paramType = "(JSONQueryParam " + paramType.substring(1, paramType.length() - 1) + ")";
} else {
@@ -721,5 +722,7 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
}
@Override
public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.HASKELL; }
public GeneratorLanguage generatorLanguage() {
return GeneratorLanguage.HASKELL;
}
}

View File

@@ -38,6 +38,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
public static final String GENERATE_POM = "generatePom";
public static final String USE_SWAGGER_ANNOTATIONS = "useSwaggerAnnotations";
public static final String USE_MICROPROFILE_OPENAPI_ANNOTATIONS = "useMicroProfileOpenAPIAnnotations";
public static final String USE_MUTINY = "useMutiny";
public static final String OPEN_API_SPEC_FILE_LOCATION = "openApiSpecFileLocation";
public static final String GENERATE_BUILDERS = "generateBuilders";
@@ -53,6 +54,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
private boolean generateBuilders = false;
private boolean useSwaggerAnnotations = true;
private boolean useMicroProfileOpenAPIAnnotations = false;
private boolean useMutiny = false;
protected boolean useGzipFeature = false;
private boolean useJackson = false;
@@ -120,6 +122,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
cliOptions.add(CliOption.newBoolean(USE_MICROPROFILE_OPENAPI_ANNOTATIONS, "Whether to generate Microprofile OpenAPI annotations. Only valid when library is set to quarkus.", useMicroProfileOpenAPIAnnotations));
cliOptions.add(CliOption.newString(OPEN_API_SPEC_FILE_LOCATION, "Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string."));
cliOptions.add(CliOption.newBoolean(SUPPORT_ASYNC, "Wrap responses in CompletionStage type, allowing asynchronous computation (requires JAX-RS 2.1).", supportAsync));
cliOptions.add(CliOption.newBoolean(USE_MUTINY, "Whether to use Smallrye Mutiny instead of CompletionStage for asynchronous computation. Only valid when library is set to quarkus.", useMutiny));
}
@Override
@@ -167,6 +170,12 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
writePropertyBack(USE_MICROPROFILE_OPENAPI_ANNOTATIONS, useMicroProfileOpenAPIAnnotations);
}
if (QUARKUS_LIBRARY.equals(library)) {
if (additionalProperties.containsKey(USE_MUTINY)) {
useMutiny = Boolean.parseBoolean(additionalProperties.get(USE_MUTINY).toString());
}
writePropertyBack(USE_MUTINY, useMutiny);
}
if (additionalProperties.containsKey(GENERATE_BUILDERS)) {
generateBuilders = Boolean.parseBoolean(additionalProperties.get(GENERATE_BUILDERS).toString());

View File

@@ -15,8 +15,13 @@ import io.swagger.annotations.*;
{{/useSwaggerAnnotations}}
{{#supportAsync}}
{{#useMutiny}}
import io.smallrye.mutiny.Uni;
{{/useMutiny}}
{{^useMutiny}}
import java.util.concurrent.CompletionStage;
import java.util.concurrent.CompletableFuture;
{{/useMutiny}}
{{/supportAsync}}
import java.io.InputStream;

View File

@@ -40,6 +40,6 @@
{{^vendorExtensions.x-java-is-response-void}}@org.eclipse.microprofile.openapi.annotations.media.Content(schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = {{{baseType}}}.class{{#vendorExtensions.x-microprofile-open-api-return-schema-container}}, type = {{{.}}} {{/vendorExtensions.x-microprofile-open-api-return-schema-container}}{{#vendorExtensions.x-microprofile-open-api-return-unique-items}}, uniqueItems = true {{/vendorExtensions.x-microprofile-open-api-return-unique-items}})){{/vendorExtensions.x-java-is-response-void}}
}){{^-last}},{{/-last}}{{/responses}}
}){{/hasProduces}}{{/useMicroProfileOpenAPIAnnotations}}
public {{#supportAsync}}CompletionStage<{{/supportAsync}}Response{{#supportAsync}}>{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) {
return {{#supportAsync}}CompletableFuture.supplyAsync(() -> {{/supportAsync}}Response.ok().entity("magic!").build(){{#supportAsync}}){{/supportAsync}};
public {{#supportAsync}}{{#useMutiny}}Uni{{/useMutiny}}{{^useMutiny}}CompletionStage{{/useMutiny}}<{{/supportAsync}}Response{{#supportAsync}}>{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) {
return {{#supportAsync}}{{#useMutiny}}Uni.createFrom().item({{/useMutiny}}{{^useMutiny}}CompletableFuture.supplyAsync(() -> {{/useMutiny}}{{/supportAsync}}Response.ok().entity("magic!").build(){{#supportAsync}}){{/supportAsync}};
}

View File

@@ -44,6 +44,9 @@
{{#useSwaggerAnnotations}}
<io.swagger.annotations.version>1.6.10</io.swagger.annotations.version>
{{/useSwaggerAnnotations}}
{{#useMutiny}}
<smallrye.rest.client.version>1.2.1</smallrye.rest.client.version>
{{/useMutiny}}
</properties>
<dependencyManagement>
<dependencies>
@@ -109,6 +112,14 @@
<scope>provided</scope>
</dependency>
{{/useSwaggerAnnotations}}
{{#useMutiny}}
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-rest-client</artifactId>
<version>${smallrye.rest.client.version}</version>
<scope>test</scope>
</dependency>
{{/useMutiny}}
</dependencies>
<build>
<plugins>

View File

@@ -0,0 +1 @@
{{#useMutiny}}Uni{{/useMutiny}}{{^useMutiny}}CompletionStage{{/useMutiny}}<{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{#returnContainer}}{{#isMap}}Map<String, {{{returnBaseType}}}>{{/isMap}}{{#isArray}}{{{returnContainer}}}<{{{returnBaseType}}}>{{/isArray}}{{/returnContainer}}{{^returnContainer}}{{{returnBaseType}}}{{/returnContainer}}{{/returnResponse}}>

View File

@@ -29,7 +29,7 @@
<version.logback>1.4.13</version.logback>
<version.junit>4.13.2</version.junit>
<version.mockito>2.1.0-beta.124</version.mockito>
<version.undertow>2.3.5.Final</version.undertow>
<version.undertow>2.3.12.Final</version.undertow>
<version.jsonpath>2.2.0</version.jsonpath>
<version.httpclient>4.5.13</version.httpclient>
<version.httpasyncclient>4.1.2</version.httpasyncclient>

View File

@@ -808,6 +808,103 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest {
);
}
@Test
public void generateApiForQuarkusWithoutMutiny() throws Exception {
final File output = Files.createTempDirectory("test").toFile();
output.deleteOnExit();
final OpenAPI openAPI = new OpenAPIParser()
.readLocation("src/test/resources/3_0/issue_4832.yaml", null, new ParseOptions()).getOpenAPI();
codegen.setOutputDir(output.getAbsolutePath());
codegen.setLibrary(QUARKUS_LIBRARY);
codegen.additionalProperties().put(SUPPORT_ASYNC, true);
codegen.additionalProperties().put(USE_TAGS, true); //And use tags to generate everything in PingApi.java
final ClientOptInput input = new ClientOptInput()
.openAPI(openAPI)
.config(codegen); //Using JavaJAXRSSpecServerCodegen
final DefaultGenerator generator = new DefaultGenerator();
final List<File> files = generator.opts(input).generate(); //When generating files
//Then the java files are compilable
validateJavaSourceFiles(files);
//And the generated class contains CompletionStage<Response>
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
"CompletionStage<Response> pingGetBoolean", //Support primitive types response
"CompletionStage<Response> pingGetInteger" //Support primitive types response
);
}
@Test
public void generateApiForQuarkusWithMutinyApi() throws Exception {
final File output = Files.createTempDirectory("test").toFile();
output.deleteOnExit();
final OpenAPI openAPI = new OpenAPIParser()
.readLocation("src/test/resources/3_0/issue_4832.yaml", null, new ParseOptions()).getOpenAPI();
codegen.setOutputDir(output.getAbsolutePath());
codegen.setLibrary(QUARKUS_LIBRARY);
codegen.additionalProperties().put(USE_TAGS, true); //And use tags to generate everything in PingApi.java
codegen.additionalProperties().put(SUPPORT_ASYNC, true);
codegen.additionalProperties().put(INTERFACE_ONLY, true);
codegen.additionalProperties().put(USE_MUTINY, true);
final ClientOptInput input = new ClientOptInput()
.openAPI(openAPI)
.config(codegen); //Using JavaJAXRSSpecServerCodegen
final DefaultGenerator generator = new DefaultGenerator();
final List<File> files = generator.opts(input).generate(); //When generating files
//Then the java files are compilable
validateJavaSourceFiles(files);
//And the generated class contains CompletionStage<Response>
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
"Uni<Boolean> pingGetBoolean", //Support primitive types response
"Uni<Integer> pingGetInteger" //Support primitive types response
);
}
@Test
public void generateApiForQuarkusWithMutinyImpl() throws Exception {
final File output = Files.createTempDirectory("test").toFile();
output.deleteOnExit();
final OpenAPI openAPI = new OpenAPIParser()
.readLocation("src/test/resources/3_0/issue_4832.yaml", null, new ParseOptions()).getOpenAPI();
codegen.setOutputDir(output.getAbsolutePath());
codegen.setLibrary(QUARKUS_LIBRARY);
codegen.additionalProperties().put(USE_TAGS, true); //And use tags to generate everything in PingApi.java
codegen.additionalProperties().put(SUPPORT_ASYNC, true);
codegen.additionalProperties().put(USE_MUTINY, true);
final ClientOptInput input = new ClientOptInput()
.openAPI(openAPI)
.config(codegen); //Using JavaJAXRSSpecServerCodegen
final DefaultGenerator generator = new DefaultGenerator();
final List<File> files = generator.opts(input).generate(); //When generating files
//Then the java files are compilable
validateJavaSourceFiles(files);
//And the generated class contains CompletionStage<Response>
TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java");
TestUtils.assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"),
"Uni<Response> pingGetBoolean", //Support primitive types response
"Uni<Response> pingGetInteger" //Support primitive types response
);
}
@Test
public void testHandleRequiredAndReadOnlyPropertiesCorrectly() throws Exception {
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();

View File

@@ -13,7 +13,7 @@
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<!-- RELEASE_VERSION -->
<version>7.5.0-SNAPSHOT</version>
<version>7.5.0</version>
<!-- /RELEASE_VERSION -->
<url>https://github.com/openapitools/openapi-generator</url>
<scm>

View File

@@ -32,19 +32,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="OneOfString" /> class.
/// </summary>
/// <param name="varString"></param>
internal OneOfString(string varString)
/// <param name="string"></param>
internal OneOfString(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets additional properties

View File

@@ -32,20 +32,20 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varBool"></param>
internal PolymorphicProperty(bool varBool)
/// <param name="bool"></param>
internal PolymorphicProperty(bool @bool)
{
VarBool = varBool;
Bool = @bool;
OnCreated();
}
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varString"></param>
internal PolymorphicProperty(string varString)
/// <param name="string"></param>
internal PolymorphicProperty(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
@@ -72,14 +72,14 @@ namespace Org.OpenAPITools.Model
partial void OnCreated();
/// <summary>
/// Gets or Sets VarBool
/// Gets or Sets Bool
/// </summary>
public bool? VarBool { get; set; }
public bool? Bool { get; set; }
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets Object
@@ -159,11 +159,11 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1)
{
Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
ClientUtils.TryDeserialize<Object>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);

View File

@@ -121,6 +121,16 @@ namespace Org.OpenAPITools.Test.Api
Assert.IsType<List<OuterEnum>>(model);
}
/// <summary>
/// Test TestAdditionalPropertiesReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestAdditionalPropertiesReferenceAsyncTest()
{
Dictionary<string, Object> requestBody = default!;
await _instance.TestAdditionalPropertiesReferenceAsync(requestBody);
}
/// <summary>
/// Test TestBodyWithFileSchema
/// </summary>
@@ -257,5 +267,15 @@ namespace Org.OpenAPITools.Test.Api
Client.Option<string?> notRequiredNullable = default!;
await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
}
/// <summary>
/// Test TestStringMapReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestStringMapReferenceAsyncTest()
{
Dictionary<string, string> requestBody = default!;
await _instance.TestStringMapReferenceAsync(requestBody);
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarByte'
/// Test the property 'Byte'
/// </summary>
[Fact]
public void VarByteTest()
public void ByteTest()
{
// TODO unit test for the property 'VarByte'
// TODO unit test for the property 'Byte'
}
/// <summary>
@@ -108,30 +108,30 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarDecimal'
/// Test the property 'Decimal'
/// </summary>
[Fact]
public void VarDecimalTest()
public void DecimalTest()
{
// TODO unit test for the property 'VarDecimal'
// TODO unit test for the property 'Decimal'
}
/// <summary>
/// Test the property 'VarDouble'
/// Test the property 'Double'
/// </summary>
[Fact]
public void VarDoubleTest()
public void DoubleTest()
{
// TODO unit test for the property 'VarDouble'
// TODO unit test for the property 'Double'
}
/// <summary>
/// Test the property 'VarFloat'
/// Test the property 'Float'
/// </summary>
[Fact]
public void VarFloatTest()
public void FloatTest()
{
// TODO unit test for the property 'VarFloat'
// TODO unit test for the property 'Float'
}
/// <summary>
@@ -189,12 +189,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
/// <summary>

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedEnumType
//private MixedEnumType instance;
public MixedEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedEnumType
//instance = new MixedEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedEnumType
/// </summary>
[Fact]
public void MixedEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedEnumType
//Assert.IsType<MixedEnumType>(instance);
}
}
}

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedNullableEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedNullableEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedNullableEnumType
//private MixedNullableEnumType instance;
public MixedNullableEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedNullableEnumType
//instance = new MixedNullableEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedNullableEnumType
/// </summary>
[Fact]
public void MixedNullableEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedNullableEnumType
//Assert.IsType<MixedNullableEnumType>(instance);
}
}
}

View File

@@ -1,65 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedSubId
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedSubIdTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedSubId
//private MixedSubId instance;
public MixedSubIdTests()
{
// TODO uncomment below to create an instance of MixedSubId
//instance = new MixedSubId();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedSubId
/// </summary>
[Fact]
public void MixedSubIdInstanceTest()
{
// TODO uncomment below to test "IsType" MixedSubId
//Assert.IsType<MixedSubId>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
/// <summary>

View File

@@ -53,6 +53,24 @@ namespace Org.OpenAPITools.Test.Model
//Assert.IsType<Return>(instance);
}
/// <summary>
/// Test the property 'Lock'
/// </summary>
[Fact]
public void LockTest()
{
// TODO unit test for the property 'Lock'
}
/// <summary>
/// Test the property 'Abstract'
/// </summary>
[Fact]
public void AbstractTest()
{
// TODO unit test for the property 'Abstract'
}
/// <summary>
/// Test the property 'VarReturn'
/// </summary>
@@ -61,5 +79,14 @@ namespace Org.OpenAPITools.Test.Model
{
// TODO unit test for the property 'VarReturn'
}
/// <summary>
/// Test the property 'Unsafe'
/// </summary>
[Fact]
public void UnsafeTest()
{
// TODO unit test for the property 'Unsafe'
}
}
}

View File

@@ -34,19 +34,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="OneOfString" /> class.
/// </summary>
/// <param name="varString"></param>
internal OneOfString(string varString)
/// <param name="string"></param>
internal OneOfString(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string? VarString { get; set; }
public string? String { get; set; }
/// <summary>
/// Gets or Sets additional properties

View File

@@ -34,20 +34,20 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varBool"></param>
internal PolymorphicProperty(bool varBool)
/// <param name="bool"></param>
internal PolymorphicProperty(bool @bool)
{
VarBool = varBool;
Bool = @bool;
OnCreated();
}
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varString"></param>
internal PolymorphicProperty(string varString)
/// <param name="string"></param>
internal PolymorphicProperty(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
@@ -74,14 +74,14 @@ namespace Org.OpenAPITools.Model
partial void OnCreated();
/// <summary>
/// Gets or Sets VarBool
/// Gets or Sets Bool
/// </summary>
public bool? VarBool { get; set; }
public bool? Bool { get; set; }
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string? VarString { get; set; }
public string? String { get; set; }
/// <summary>
/// Gets or Sets Object
@@ -161,11 +161,11 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1)
{
Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
ClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderString = utf8JsonReader;
ClientUtils.TryDeserialize<string?>(ref utf8JsonReaderString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
ClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);

View File

@@ -121,6 +121,16 @@ namespace Org.OpenAPITools.Test.Api
Assert.IsType<List<OuterEnum>>(model);
}
/// <summary>
/// Test TestAdditionalPropertiesReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestAdditionalPropertiesReferenceAsyncTest()
{
Dictionary<string, Object> requestBody = default;
await _instance.TestAdditionalPropertiesReferenceAsync(requestBody);
}
/// <summary>
/// Test TestBodyWithFileSchema
/// </summary>
@@ -257,5 +267,15 @@ namespace Org.OpenAPITools.Test.Api
Client.Option<string> notRequiredNullable = default;
await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
}
/// <summary>
/// Test TestStringMapReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestStringMapReferenceAsyncTest()
{
Dictionary<string, string> requestBody = default;
await _instance.TestStringMapReferenceAsync(requestBody);
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarByte'
/// Test the property 'Byte'
/// </summary>
[Fact]
public void VarByteTest()
public void ByteTest()
{
// TODO unit test for the property 'VarByte'
// TODO unit test for the property 'Byte'
}
/// <summary>
@@ -108,30 +108,30 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarDecimal'
/// Test the property 'Decimal'
/// </summary>
[Fact]
public void VarDecimalTest()
public void DecimalTest()
{
// TODO unit test for the property 'VarDecimal'
// TODO unit test for the property 'Decimal'
}
/// <summary>
/// Test the property 'VarDouble'
/// Test the property 'Double'
/// </summary>
[Fact]
public void VarDoubleTest()
public void DoubleTest()
{
// TODO unit test for the property 'VarDouble'
// TODO unit test for the property 'Double'
}
/// <summary>
/// Test the property 'VarFloat'
/// Test the property 'Float'
/// </summary>
[Fact]
public void VarFloatTest()
public void FloatTest()
{
// TODO unit test for the property 'VarFloat'
// TODO unit test for the property 'Float'
}
/// <summary>
@@ -189,12 +189,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
/// <summary>

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedEnumType
//private MixedEnumType instance;
public MixedEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedEnumType
//instance = new MixedEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedEnumType
/// </summary>
[Fact]
public void MixedEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedEnumType
//Assert.IsType<MixedEnumType>(instance);
}
}
}

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedNullableEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedNullableEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedNullableEnumType
//private MixedNullableEnumType instance;
public MixedNullableEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedNullableEnumType
//instance = new MixedNullableEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedNullableEnumType
/// </summary>
[Fact]
public void MixedNullableEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedNullableEnumType
//Assert.IsType<MixedNullableEnumType>(instance);
}
}
}

View File

@@ -1,65 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedSubId
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedSubIdTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedSubId
//private MixedSubId instance;
public MixedSubIdTests()
{
// TODO uncomment below to create an instance of MixedSubId
//instance = new MixedSubId();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedSubId
/// </summary>
[Fact]
public void MixedSubIdInstanceTest()
{
// TODO uncomment below to test "IsType" MixedSubId
//Assert.IsType<MixedSubId>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
/// <summary>

View File

@@ -53,6 +53,24 @@ namespace Org.OpenAPITools.Test.Model
//Assert.IsType<Return>(instance);
}
/// <summary>
/// Test the property 'Lock'
/// </summary>
[Fact]
public void LockTest()
{
// TODO unit test for the property 'Lock'
}
/// <summary>
/// Test the property 'Abstract'
/// </summary>
[Fact]
public void AbstractTest()
{
// TODO unit test for the property 'Abstract'
}
/// <summary>
/// Test the property 'VarReturn'
/// </summary>
@@ -61,5 +79,14 @@ namespace Org.OpenAPITools.Test.Model
{
// TODO unit test for the property 'VarReturn'
}
/// <summary>
/// Test the property 'Unsafe'
/// </summary>
[Fact]
public void UnsafeTest()
{
// TODO unit test for the property 'Unsafe'
}
}
}

View File

@@ -32,19 +32,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="OneOfString" /> class.
/// </summary>
/// <param name="varString"></param>
internal OneOfString(string varString)
/// <param name="string"></param>
internal OneOfString(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets additional properties

View File

@@ -32,20 +32,20 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varBool"></param>
internal PolymorphicProperty(bool varBool)
/// <param name="bool"></param>
internal PolymorphicProperty(bool @bool)
{
VarBool = varBool;
Bool = @bool;
OnCreated();
}
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varString"></param>
internal PolymorphicProperty(string varString)
/// <param name="string"></param>
internal PolymorphicProperty(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
@@ -72,14 +72,14 @@ namespace Org.OpenAPITools.Model
partial void OnCreated();
/// <summary>
/// Gets or Sets VarBool
/// Gets or Sets Bool
/// </summary>
public bool? VarBool { get; set; }
public bool? Bool { get; set; }
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets Object
@@ -159,11 +159,11 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1)
{
Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
ClientUtils.TryDeserialize<Object>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);

View File

@@ -35,19 +35,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="OneOfString" /> class.
/// </summary>
/// <param name="varString"></param>
internal OneOfString(string varString)
/// <param name="string"></param>
internal OneOfString(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string? VarString { get; set; }
public string? String { get; set; }
/// <summary>
/// Gets or Sets additional properties

View File

@@ -35,20 +35,20 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varBool"></param>
internal PolymorphicProperty(bool varBool)
/// <param name="bool"></param>
internal PolymorphicProperty(bool @bool)
{
VarBool = varBool;
Bool = @bool;
OnCreated();
}
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varString"></param>
internal PolymorphicProperty(string varString)
/// <param name="string"></param>
internal PolymorphicProperty(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
@@ -75,14 +75,14 @@ namespace Org.OpenAPITools.Model
partial void OnCreated();
/// <summary>
/// Gets or Sets VarBool
/// Gets or Sets Bool
/// </summary>
public bool? VarBool { get; set; }
public bool? Bool { get; set; }
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string? VarString { get; set; }
public string? String { get; set; }
/// <summary>
/// Gets or Sets Object
@@ -162,11 +162,11 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1)
{
Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
ClientUtils.TryDeserialize<string?>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderString = utf8JsonReader;
ClientUtils.TryDeserialize<string?>(ref utf8JsonReaderString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
ClientUtils.TryDeserialize<Object?>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);

View File

@@ -121,6 +121,16 @@ namespace Org.OpenAPITools.Test.Api
Assert.IsType<List<OuterEnum>>(model);
}
/// <summary>
/// Test TestAdditionalPropertiesReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestAdditionalPropertiesReferenceAsyncTest()
{
Dictionary<string, Object> requestBody = default;
await _instance.TestAdditionalPropertiesReferenceAsync(requestBody);
}
/// <summary>
/// Test TestBodyWithFileSchema
/// </summary>
@@ -257,5 +267,15 @@ namespace Org.OpenAPITools.Test.Api
Client.Option<string> notRequiredNullable = default;
await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
}
/// <summary>
/// Test TestStringMapReference
/// </summary>
[Fact (Skip = "not implemented")]
public async Task TestStringMapReferenceAsyncTest()
{
Dictionary<string, string> requestBody = default;
await _instance.TestStringMapReferenceAsync(requestBody);
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarByte'
/// Test the property 'Byte'
/// </summary>
[Fact]
public void VarByteTest()
public void ByteTest()
{
// TODO unit test for the property 'VarByte'
// TODO unit test for the property 'Byte'
}
/// <summary>
@@ -108,30 +108,30 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarDecimal'
/// Test the property 'Decimal'
/// </summary>
[Fact]
public void VarDecimalTest()
public void DecimalTest()
{
// TODO unit test for the property 'VarDecimal'
// TODO unit test for the property 'Decimal'
}
/// <summary>
/// Test the property 'VarDouble'
/// Test the property 'Double'
/// </summary>
[Fact]
public void VarDoubleTest()
public void DoubleTest()
{
// TODO unit test for the property 'VarDouble'
// TODO unit test for the property 'Double'
}
/// <summary>
/// Test the property 'VarFloat'
/// Test the property 'Float'
/// </summary>
[Fact]
public void VarFloatTest()
public void FloatTest()
{
// TODO unit test for the property 'VarFloat'
// TODO unit test for the property 'Float'
}
/// <summary>
@@ -189,12 +189,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarString'
/// Test the property 'String'
/// </summary>
[Fact]
public void VarStringTest()
public void StringTest()
{
// TODO unit test for the property 'VarString'
// TODO unit test for the property 'String'
}
/// <summary>

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedEnumType
//private MixedEnumType instance;
public MixedEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedEnumType
//instance = new MixedEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedEnumType
/// </summary>
[Fact]
public void MixedEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedEnumType
//Assert.IsType<MixedEnumType>(instance);
}
}
}

View File

@@ -1,56 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedNullableEnumType
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedNullableEnumTypeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedNullableEnumType
//private MixedNullableEnumType instance;
public MixedNullableEnumTypeTests()
{
// TODO uncomment below to create an instance of MixedNullableEnumType
//instance = new MixedNullableEnumType();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedNullableEnumType
/// </summary>
[Fact]
public void MixedNullableEnumTypeInstanceTest()
{
// TODO uncomment below to test "IsType" MixedNullableEnumType
//Assert.IsType<MixedNullableEnumType>(instance);
}
}
}

View File

@@ -1,65 +0,0 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using Xunit;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;
namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing MixedSubId
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class MixedSubIdTests : IDisposable
{
// TODO uncomment below to declare an instance variable for MixedSubId
//private MixedSubId instance;
public MixedSubIdTests()
{
// TODO uncomment below to create an instance of MixedSubId
//instance = new MixedSubId();
}
public void Dispose()
{
// Cleanup when everything is done.
}
/// <summary>
/// Test an instance of MixedSubId
/// </summary>
[Fact]
public void MixedSubIdInstanceTest()
{
// TODO uncomment below to test "IsType" MixedSubId
//Assert.IsType<MixedSubId>(instance);
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Fact]
public void IdTest()
{
// TODO unit test for the property 'Id'
}
}
}

View File

@@ -54,12 +54,12 @@ namespace Org.OpenAPITools.Test.Model
}
/// <summary>
/// Test the property 'VarClass'
/// Test the property 'Class'
/// </summary>
[Fact]
public void VarClassTest()
public void ClassTest()
{
// TODO unit test for the property 'VarClass'
// TODO unit test for the property 'Class'
}
/// <summary>

View File

@@ -53,6 +53,24 @@ namespace Org.OpenAPITools.Test.Model
//Assert.IsType<Return>(instance);
}
/// <summary>
/// Test the property 'Lock'
/// </summary>
[Fact]
public void LockTest()
{
// TODO unit test for the property 'Lock'
}
/// <summary>
/// Test the property 'Abstract'
/// </summary>
[Fact]
public void AbstractTest()
{
// TODO unit test for the property 'Abstract'
}
/// <summary>
/// Test the property 'VarReturn'
/// </summary>
@@ -61,5 +79,14 @@ namespace Org.OpenAPITools.Test.Model
{
// TODO unit test for the property 'VarReturn'
}
/// <summary>
/// Test the property 'Unsafe'
/// </summary>
[Fact]
public void UnsafeTest()
{
// TODO unit test for the property 'Unsafe'
}
}
}

View File

@@ -32,19 +32,19 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="OneOfString" /> class.
/// </summary>
/// <param name="varString"></param>
internal OneOfString(string varString)
/// <param name="string"></param>
internal OneOfString(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
partial void OnCreated();
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets additional properties

View File

@@ -32,20 +32,20 @@ namespace Org.OpenAPITools.Model
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varBool"></param>
internal PolymorphicProperty(bool varBool)
/// <param name="bool"></param>
internal PolymorphicProperty(bool @bool)
{
VarBool = varBool;
Bool = @bool;
OnCreated();
}
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicProperty" /> class.
/// </summary>
/// <param name="varString"></param>
internal PolymorphicProperty(string varString)
/// <param name="string"></param>
internal PolymorphicProperty(string @string)
{
VarString = varString;
String = @string;
OnCreated();
}
@@ -72,14 +72,14 @@ namespace Org.OpenAPITools.Model
partial void OnCreated();
/// <summary>
/// Gets or Sets VarBool
/// Gets or Sets Bool
/// </summary>
public bool? VarBool { get; set; }
public bool? Bool { get; set; }
/// <summary>
/// Gets or Sets VarString
/// Gets or Sets String
/// </summary>
public string VarString { get; set; }
public string String { get; set; }
/// <summary>
/// Gets or Sets Object
@@ -159,11 +159,11 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1)
{
Utf8JsonReader utf8JsonReaderVarBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderVarBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderBool = utf8JsonReader;
ClientUtils.TryDeserialize<bool?>(ref utf8JsonReaderBool, jsonSerializerOptions, out varBool);
Utf8JsonReader utf8JsonReaderVarString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderVarString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderString = utf8JsonReader;
ClientUtils.TryDeserialize<string>(ref utf8JsonReaderString, jsonSerializerOptions, out varString);
Utf8JsonReader utf8JsonReaderObject = utf8JsonReader;
ClientUtils.TryDeserialize<Object>(ref utf8JsonReaderObject, jsonSerializerOptions, out varObject);

View File

@@ -29,7 +29,7 @@
<version.logback>1.4.13</version.logback>
<version.junit>4.13.2</version.junit>
<version.mockito>2.1.0-beta.124</version.mockito>
<version.undertow>2.3.5.Final</version.undertow>
<version.undertow>2.3.12.Final</version.undertow>
<version.jsonpath>2.2.0</version.jsonpath>
<version.httpclient>4.5.13</version.httpclient>
<version.httpasyncclient>4.1.2</version.httpasyncclient>

View File

@@ -0,0 +1,4 @@
*
!target/*-runner
!target/*-runner.jar
!target/lib/*

View File

@@ -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

View File

@@ -0,0 +1,66 @@
.dockerignore
README.md
pom.xml
src/gen/java/org/openapitools/api/AnotherFakeApi.java
src/gen/java/org/openapitools/api/FakeApi.java
src/gen/java/org/openapitools/api/FakeClassnameTestApi.java
src/gen/java/org/openapitools/api/FooApi.java
src/gen/java/org/openapitools/api/PetApi.java
src/gen/java/org/openapitools/api/RestApplication.java
src/gen/java/org/openapitools/api/RestResourceRoot.java
src/gen/java/org/openapitools/api/StoreApi.java
src/gen/java/org/openapitools/api/UserApi.java
src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java
src/gen/java/org/openapitools/model/AllOfWithSingleRef.java
src/gen/java/org/openapitools/model/Animal.java
src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java
src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java
src/gen/java/org/openapitools/model/ArrayTest.java
src/gen/java/org/openapitools/model/Capitalization.java
src/gen/java/org/openapitools/model/Cat.java
src/gen/java/org/openapitools/model/Category.java
src/gen/java/org/openapitools/model/ChildWithNullable.java
src/gen/java/org/openapitools/model/ClassModel.java
src/gen/java/org/openapitools/model/Client.java
src/gen/java/org/openapitools/model/DeprecatedObject.java
src/gen/java/org/openapitools/model/Dog.java
src/gen/java/org/openapitools/model/EnumArrays.java
src/gen/java/org/openapitools/model/EnumClass.java
src/gen/java/org/openapitools/model/EnumTest.java
src/gen/java/org/openapitools/model/FakeBigDecimalMap200Response.java
src/gen/java/org/openapitools/model/FileSchemaTestClass.java
src/gen/java/org/openapitools/model/Foo.java
src/gen/java/org/openapitools/model/FooGetDefaultResponse.java
src/gen/java/org/openapitools/model/FormatTest.java
src/gen/java/org/openapitools/model/HasOnlyReadOnly.java
src/gen/java/org/openapitools/model/HealthCheckResult.java
src/gen/java/org/openapitools/model/MapTest.java
src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/gen/java/org/openapitools/model/Model200Response.java
src/gen/java/org/openapitools/model/ModelApiResponse.java
src/gen/java/org/openapitools/model/ModelFile.java
src/gen/java/org/openapitools/model/ModelList.java
src/gen/java/org/openapitools/model/ModelReturn.java
src/gen/java/org/openapitools/model/Name.java
src/gen/java/org/openapitools/model/NullableClass.java
src/gen/java/org/openapitools/model/NumberOnly.java
src/gen/java/org/openapitools/model/ObjectWithDeprecatedFields.java
src/gen/java/org/openapitools/model/Order.java
src/gen/java/org/openapitools/model/OuterComposite.java
src/gen/java/org/openapitools/model/OuterEnum.java
src/gen/java/org/openapitools/model/OuterEnumDefaultValue.java
src/gen/java/org/openapitools/model/OuterEnumInteger.java
src/gen/java/org/openapitools/model/OuterEnumIntegerDefaultValue.java
src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java
src/gen/java/org/openapitools/model/ParentWithNullable.java
src/gen/java/org/openapitools/model/Pet.java
src/gen/java/org/openapitools/model/ReadOnlyFirst.java
src/gen/java/org/openapitools/model/SingleRefType.java
src/gen/java/org/openapitools/model/SpecialModelName.java
src/gen/java/org/openapitools/model/Tag.java
src/gen/java/org/openapitools/model/TestInlineFreeformAdditionalPropertiesRequest.java
src/gen/java/org/openapitools/model/User.java
src/main/docker/Dockerfile.jvm
src/main/docker/Dockerfile.native
src/main/resources/META-INF/openapi.yaml
src/main/resources/application.properties

View File

@@ -0,0 +1 @@
7.5.0-SNAPSHOT

View File

@@ -0,0 +1,33 @@
# JAX-RS server with OpenAPI using Quarkus
## Overview
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using an
[OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
This is an example of building a OpenAPI-enabled JAX-RS server.
This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework and
the [Eclipse-MicroProfile-OpenAPI](https://github.com/eclipse/microprofile-open-api) addition.
The pom file is configured to use [Quarkus](https://quarkus.io/) as application server.
To start the server in dev mode, run this maven command:
```bash
mvn compile quarkus:dev
```
You can then call your server endpoints under:
```
http://localhost:8080/
```
In dev-mode, you can open Swagger-UI at:
```
http://localhost:8080/swagger-ui/
```
Read more in the [Quarkus OpenAPI guide](https://quarkus.io/guides/openapi-swaggerui-guide).

View File

@@ -0,0 +1,157 @@
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>jaxrs-spec-petstore-server</artifactId>
<name>jaxrs-spec-petstore-server</name>
<version>1.0.0</version>
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus-plugin.version>1.13.7.Final</quarkus-plugin.version>
<quarkus.platform.version>1.13.7.Final</quarkus.platform.version>
<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<surefire-plugin.version>2.22.1</surefire-plugin.version>
<javax.ws.rs-version>2.1.1</javax.ws.rs-version>
<javax.annotation-api-version>1.3.2</javax.annotation-api-version>
<smallrye.rest.client.version>1.2.1</smallrye.rest.client.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs-version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation-api-version}</version>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-rest-client</artifactId>
<version>${smallrye.rest.client.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
</profile>
</profiles>
</project>

View File

@@ -0,0 +1,80 @@
package org.openapitools.api;
import org.openapitools.model.Client;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "", version="1.0.0", description="",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/another-fake/dummy")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AnotherFakeApi {
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "call123testSpecialTags", summary = "To test special tags", description = "To test special tags and operation ID starting with number")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="$another-fake?")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class))
})
})
public Response call123testSpecialTags(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,441 @@
package org.openapitools.api;
import java.math.BigDecimal;
import org.openapitools.model.ChildWithNullable;
import org.openapitools.model.Client;
import org.openapitools.model.EnumClass;
import org.openapitools.model.FakeBigDecimalMap200Response;
import java.io.File;
import org.openapitools.model.FileSchemaTestClass;
import org.openapitools.model.HealthCheckResult;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Map;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.OuterObjectWithEnumProperty;
import org.openapitools.model.Pet;
import org.openapitools.model.TestInlineFreeformAdditionalPropertiesRequest;
import org.openapitools.model.User;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "", version="1.0.0", description="",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/fake")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class FakeApi {
@GET
@Path("/BigDecimalMap")
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeBigDecimalMap", summary = "", description = "for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = FakeBigDecimalMap200Response.class))
})
})
public Response fakeBigDecimalMap() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/health")
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeHealthGet", summary = "Health check endpoint", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "The instance started successfully", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = HealthCheckResult.class))
})
})
public Response fakeHealthGet() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/http-signature-test")
@Consumes({ "application/json", "application/xml" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "http_signature_test")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeHttpSignatureTest", summary = "test http signature authentication", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "The instance started successfully", content = {
})
})
public Response fakeHttpSignatureTest(@Valid @NotNull Pet pet,@QueryParam("query_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="query parameter") String query1,@HeaderParam("header_1") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="header parameter") String header1) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/boolean")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterBooleanSerialize", summary = "", description = "Test serialization of outer boolean types")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output boolean", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Boolean.class))
})
})
public Response fakeOuterBooleanSerialize(@Valid Boolean body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/composite")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterCompositeSerialize", summary = "", description = "Test serialization of object with outer number type")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output composite", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterComposite.class))
})
})
public Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/number")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterNumberSerialize", summary = "", description = "Test serialization of outer number types")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output number", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = BigDecimal.class))
})
})
public Response fakeOuterNumberSerialize(@Valid BigDecimal body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/outer/string")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakeOuterStringSerialize", summary = "", description = "Test serialization of outer string types")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output string", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class))
})
})
public Response fakeOuterStringSerialize(@Valid String body) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/property/enum-int")
@Consumes({ "application/json" })
@Produces({ "*/*" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fakePropertyEnumIntegerSerialize", summary = "", description = "Test serialization of enum (int) properties with examples")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Output enum (int)", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="*/*", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = OuterObjectWithEnumProperty.class))
})
})
public Response fakePropertyEnumIntegerSerialize(@Valid @NotNull OuterObjectWithEnumProperty outerObjectWithEnumProperty) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/additionalProperties-reference")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testAdditionalPropertiesReference", summary = "test referenced additionalProperties", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testAdditionalPropertiesReference(@Valid @NotNull Map<String, Object> requestBody) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-binary")
@Consumes({ "image/png" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testBodyWithBinary", summary = "", description = "For this test, the body has to be a binary file.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = {
})
})
public Response testBodyWithBinary(@Valid File body) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-file-schema")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testBodyWithFileSchema", summary = "", description = "For this test, the body for this request must reference a schema named `File`.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = {
})
})
public Response testBodyWithFileSchema(@Valid @NotNull FileSchemaTestClass fileSchemaTestClass) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/body-with-query-params")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testBodyWithQueryParams", summary = "", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = {
})
})
public Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testClientModel", summary = "To test \"client\" model", description = "To test \"client\" model")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class))
})
})
public Response testClientModel(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
@POST
@Consumes({ "application/x-www-form-urlencoded" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "http_basic_test")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid username supplied", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "User not found", content = {
})
})
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") LocalDateTime dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) {
return Response.ok().entity("magic!").build();
}
@GET
@Consumes({ "application/x-www-form-urlencoded" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testEnumParameters", summary = "To test enum parameters", description = "To test enum parameters")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid request", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Not found", content = {
})
})
public Response testEnumParameters(@HeaderParam("enum_header_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Header parameter enum test (string array)") List<String> enumHeaderStringArray,@QueryParam("enum_query_string_array") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Query parameter enum test (double)") Double enumQueryDouble,@QueryParam("enum_query_model_array") List<EnumClass> enumQueryModelArray,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
return Response.ok().entity("magic!").build();
}
@DELETE
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "bearer_test")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", description = "Fake endpoint to test group parameters (optional)")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Something wrong", content = {
})
})
public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Integer in group parameters") Long int64Group) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/inline-additionalProperties")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testInlineAdditionalProperties", summary = "test inline additionalProperties", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testInlineAdditionalProperties(@Valid @NotNull Map<String, String> requestBody) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/inline-freeform-additionalProperties")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testInlineFreeformAdditionalProperties", summary = "test inline free-form additionalProperties", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testInlineFreeformAdditionalProperties(@Valid @NotNull TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testJsonFormData", summary = "test json serialization of form data", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/nullable")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testNullable", summary = "test nullable parent property", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testNullable(@Valid @NotNull ChildWithNullable childWithNullable) {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/test-query-parameters")
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testQueryParameterCollectionFormat", summary = "", description = "To test the collection format in query parameters")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Success", content = {
})
})
public Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context,@QueryParam("allowEmpty") @NotNull String allowEmpty,@QueryParam("language") Map<String, String> language) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/stringMap-reference")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testStringMapReference", summary = "test referenced string map", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response testStringMapReference(@Valid @NotNull Map<String, String> requestBody) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "uploadFileWithRequiredFile", summary = "uploads an image (required)", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class))
})
})
public Response uploadFileWithRequiredFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,82 @@
package org.openapitools.api;
import org.openapitools.model.Client;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "", version="1.0.0", description="",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/fake_classname_test")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class FakeClassnameTestApi {
@PATCH
@Consumes({ "application/json" })
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key_query")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "testClassname", summary = "To test class name in snake case", description = "To test class name in snake case")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="fake_classname_tags 123#$%^")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class))
})
})
public Response testClassname(@Valid @NotNull Client client) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,79 @@
package org.openapitools.api;
import org.openapitools.model.FooGetDefaultResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "", version="1.0.0", description="",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="", description="")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/foo")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class FooApi {
@GET
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "fooGet", summary = "", description = "")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "response", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = FooGetDefaultResponse.class))
})
})
public Response fooGet() {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,239 @@
package org.openapitools.api;
import java.io.File;
import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.Pet;
import java.util.Set;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "pet", version="1.0.0", description="Everything about your Pets",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet", description="Everything about your Pets")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet", description="Everything about your Pets")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/pet")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class PetApi {
@POST
@Consumes({ "application/json", "application/xml" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "addPet", summary = "Add a new pet to the store", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Successful operation", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Invalid input", content = {
})
})
public Response addPet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
}
@DELETE
@Path("/{petId}")
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deletePet", summary = "Deletes a pet", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Successful operation", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid pet value", content = {
})
})
public Response deletePet(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Pet id to delete") Long petId) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/findByStatus")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "findPetsByStatus", summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY )),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY ))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid status value", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response findPetsByStatus(@QueryParam("status") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Status values that need to be considered for filter") List<String> status) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/findByTags")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "findPetsByTags", summary = "Finds Pets by tags", description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY , uniqueItems = true )),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class, type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.ARRAY , uniqueItems = true ))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid tag value", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response findPetsByTags(@QueryParam("tags") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="Tags to filter by") Set<String> tags) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/{petId}")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "getPetById", summary = "Find pet by ID", description = "Returns a single pet")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class)),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Pet.class))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Pet not found", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response getPetById(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to return") Long petId) {
return Response.ok().entity("magic!").build();
}
@PUT
@Consumes({ "application/json", "application/xml" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "updatePet", summary = "Update an existing pet", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Successful operation", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Pet not found", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Validation exception", content = {
})
})
public Response updatePet(@Valid @NotNull Pet pet) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/{petId}")
@Consumes({ "application/x-www-form-urlencoded" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "Successful operation", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "405", description = "Invalid input", content = {
})
})
public Response updatePetWithForm(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/{petId}/uploadImage")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" })
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "uploadFile", summary = "uploads an image", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="pet")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = ModelApiResponse.class))
})
})
public Response uploadFile(@PathParam("petId") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream _fileInputStream) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,17 @@
package org.openapitools.api;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
version="1.0.0"
,title = "OpenAPI Petstore"
,description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\"
,license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
))
@ApplicationPath(RestResourceRoot.APPLICATION_PATH)
public class RestApplication extends Application {
}

View File

@@ -0,0 +1,5 @@
package org.openapitools.api;
public class RestResourceRoot {
public static final String APPLICATION_PATH = "/v2";
}

View File

@@ -0,0 +1,145 @@
package org.openapitools.api;
import java.util.Map;
import org.openapitools.model.Order;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "store", version="1.0.0", description="Access to Petstore orders",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store", description="Access to Petstore orders")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store", description="Access to Petstore orders")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/store")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class StoreApi {
@DELETE
@Path("/order/{order_id}")
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deleteOrder", summary = "Delete purchase order by ID", description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Order not found", content = {
})
})
public Response deleteOrder(@PathParam("order_id") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of the order that needs to be deleted") String orderId) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/inventory")
@Produces({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirements(value={
@org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement(name = "api_key")
})
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "getInventory", summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Map.class))
})
})
public Response getInventory() {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/order/{order_id}")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "getOrderById", summary = "Find purchase order by ID", description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Order.class)),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Order.class))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid ID supplied", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "Order not found", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="ID of pet that needs to be fetched") Long orderId) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/order")
@Consumes({ "application/json" })
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "placeOrder", summary = "Place an order for a pet", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="store")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Order.class)),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Order.class))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid Order", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response placeOrder(@Valid @NotNull Order order) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,206 @@
package org.openapitools.api;
import java.time.LocalDateTime;
import org.openapitools.model.User;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
import java.util.Map;
import java.util.List;
import javax.validation.constraints.*;
import javax.validation.Valid;
@org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition(
info = @org.eclipse.microprofile.openapi.annotations.info.Info(
title = "user", version="1.0.0", description="Operations about user",
license = @org.eclipse.microprofile.openapi.annotations.info.License(name = "Apache-2.0", url = "https://www.apache.org/licenses/LICENSE-2.0.html")
),
tags = @org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user", description="Operations about user")
)
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user", description="Operations about user")
@org.eclipse.microprofile.openapi.annotations.security.SecuritySchemes(value = {
@org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "petstore_auth",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.OAUTH2,
description = "",
flows = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlows(
implicit = @org.eclipse.microprofile.openapi.annotations.security.OAuthFlow(authorizationUrl = "http://petstore.swagger.io/api/oauth/dialog",
tokenUrl = "",
refreshUrl = "",
scopes = {
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "write:pets", description = "modify pets in your account"),
@org.eclipse.microprofile.openapi.annotations.security.OAuthScope(name = "read:pets", description = "read your pets")
}))
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.HEADER
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "api_key_query",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.APIKEY,
description = "",
apiKeyName = "api_key_query",
in = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeIn.QUERY
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "http_basic_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "basic"
), @org.eclipse.microprofile.openapi.annotations.security.SecurityScheme(
securitySchemeName = "bearer_test",
type = org.eclipse.microprofile.openapi.annotations.enums.SecuritySchemeType.HTTP,
description = "",
scheme = "bearer", bearerFormat = "JWT"
),
})
@Path("/user")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class UserApi {
@POST
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUser", summary = "Create user", description = "This can only be done by the logged in user.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response createUser(@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithArray")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response createUsersWithArrayInput(@Valid @NotNull List<@Valid User> user) {
return Response.ok().entity("magic!").build();
}
@POST
@Path("/createWithList")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response createUsersWithListInput(@Valid @NotNull List<@Valid User> user) {
return Response.ok().entity("magic!").build();
}
@DELETE
@Path("/{username}")
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "deleteUser", summary = "Delete user", description = "This can only be done by the logged in user.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid username supplied", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "User not found", content = {
})
})
public Response deleteUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be deleted") String username) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/{username}")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "getUserByName", summary = "Get user by user name", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = User.class)),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = User.class))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid username supplied", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "User not found", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response getUserByName(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The name that needs to be fetched. Use user1 for testing.") String username) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/login")
@Produces({ "application/xml", "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "loginUser", summary = "Logs user into the system", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", headers = {
@org.eclipse.microprofile.openapi.annotations.headers.Header(name = "X-Rate-Limit", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.INTEGER), description = "calls per hour allowed by the user"),
@org.eclipse.microprofile.openapi.annotations.headers.Header(name = "X-Expires-After", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(type = org.eclipse.microprofile.openapi.annotations.enums.SchemaType.STRING), description = "date in UTC when token expires")
}, content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class)),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = String.class))
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid username/password supplied", content = {
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/xml"),
@org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json")
})
})
public Response loginUser(@QueryParam("username") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The user name for login") String username,@QueryParam("password") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="The password for login in clear text") String password) {
return Response.ok().entity("magic!").build();
}
@GET
@Path("/logout")
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "logoutUser", summary = "Logs out current logged in user session", description = "")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "200", description = "successful operation", content = {
})
})
public Response logoutUser() {
return Response.ok().entity("magic!").build();
}
@PUT
@Path("/{username}")
@Consumes({ "application/json" })
@org.eclipse.microprofile.openapi.annotations.Operation(operationId = "updateUser", summary = "Updated user", description = "This can only be done by the logged in user.")
@org.eclipse.microprofile.openapi.annotations.tags.Tag(name="user")
@org.eclipse.microprofile.openapi.annotations.responses.APIResponses(value = {
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "400", description = "Invalid user supplied", content = {
}),
@org.eclipse.microprofile.openapi.annotations.responses.APIResponse(responseCode = "404", description = "User not found", content = {
})
})
public Response updateUser(@PathParam("username") @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="name that need to be deleted") String username,@Valid @NotNull User user) {
return Response.ok().entity("magic!").build();
}
}

View File

@@ -0,0 +1,84 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesAnyType")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesAnyType extends HashMap<String, Object> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesAnyType name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesAnyType {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,85 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesArray")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesArray extends HashMap<String, List> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesArray name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
return Objects.equals(this.name, additionalPropertiesArray.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesArray {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,84 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesBoolean")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesBoolean name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesBoolean {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,178 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesClass")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesClass implements Serializable {
private @Valid Map<String, String> mapProperty = new HashMap<>();
private @Valid Map<String, Map<String, String>> mapOfMapProperty = new HashMap<>();
protected AdditionalPropertiesClass(AdditionalPropertiesClassBuilder<?, ?> b) {
this.mapProperty = b.mapProperty;
this.mapOfMapProperty = b.mapOfMapProperty;
}
public AdditionalPropertiesClass() {
}
/**
**/
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("map_property")
public Map<String, String> getMapProperty() {
return mapProperty;
}
@JsonProperty("map_property")
public void setMapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
public AdditionalPropertiesClass removeMapPropertyItem(String mapPropertyItem) {
if (mapPropertyItem != null && this.mapProperty != null) {
this.mapProperty.remove(mapPropertyItem);
}
return this;
}
/**
**/
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("map_of_map_property")
@Valid public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
@JsonProperty("map_of_map_property")
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
public AdditionalPropertiesClass removeMapOfMapPropertyItem(Map<String, String> mapOfMapPropertyItem) {
if (mapOfMapPropertyItem != null && this.mapOfMapProperty != null) {
this.mapOfMapProperty.remove(mapOfMapPropertyItem);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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 ");
}
public static AdditionalPropertiesClassBuilder<?, ?> builder() {
return new AdditionalPropertiesClassBuilderImpl();
}
private static final class AdditionalPropertiesClassBuilderImpl extends AdditionalPropertiesClassBuilder<AdditionalPropertiesClass, AdditionalPropertiesClassBuilderImpl> {
@Override
protected AdditionalPropertiesClassBuilderImpl self() {
return this;
}
@Override
public AdditionalPropertiesClass build() {
return new AdditionalPropertiesClass(this);
}
}
public static abstract class AdditionalPropertiesClassBuilder<C extends AdditionalPropertiesClass, B extends AdditionalPropertiesClassBuilder<C, B>> {
private Map<String, String> mapProperty = new HashMap<>();
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<>();
protected abstract B self();
public abstract C build();
public B mapProperty(Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return self();
}
public B mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return self();
}
}
}

View File

@@ -0,0 +1,84 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesInteger")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesInteger extends HashMap<String, Integer> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesInteger name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesInteger {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,85 @@
package org.openapitools.model;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesNumber")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesNumber name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesNumber {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,84 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesObject")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesObject extends HashMap<String, Map> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesObject name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
return Objects.equals(this.name, additionalPropertiesObject.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesObject {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,84 @@
package org.openapitools.model;
import java.util.HashMap;
import java.util.Map;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AdditionalPropertiesString")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AdditionalPropertiesString extends HashMap<String, String> implements Serializable {
private String name;
/**
**/
public AdditionalPropertiesString name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("name")
public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
return Objects.equals(this.name, additionalPropertiesString.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesString {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,145 @@
package org.openapitools.model;
import org.openapitools.model.SingleRefType;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("AllOfWithSingleRef")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class AllOfWithSingleRef implements Serializable {
private String username;
private SingleRefType singleRefType;
protected AllOfWithSingleRef(AllOfWithSingleRefBuilder<?, ?> b) {
this.username = b.username;
this.singleRefType = b.singleRefType;
}
public AllOfWithSingleRef() {
}
/**
**/
public AllOfWithSingleRef username(String username) {
this.username = username;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("username")
public String getUsername() {
return username;
}
@JsonProperty("username")
public void setUsername(String username) {
this.username = username;
}
/**
**/
public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("SingleRefType")
@Valid public SingleRefType getSingleRefType() {
return singleRefType;
}
@JsonProperty("SingleRefType")
public void setSingleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o;
return Objects.equals(this.username, allOfWithSingleRef.username) &&
Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType);
}
@Override
public int hashCode() {
return Objects.hash(username, singleRefType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AllOfWithSingleRef {\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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 ");
}
public static AllOfWithSingleRefBuilder<?, ?> builder() {
return new AllOfWithSingleRefBuilderImpl();
}
private static final class AllOfWithSingleRefBuilderImpl extends AllOfWithSingleRefBuilder<AllOfWithSingleRef, AllOfWithSingleRefBuilderImpl> {
@Override
protected AllOfWithSingleRefBuilderImpl self() {
return this;
}
@Override
public AllOfWithSingleRef build() {
return new AllOfWithSingleRef(this);
}
}
public static abstract class AllOfWithSingleRefBuilder<C extends AllOfWithSingleRef, B extends AllOfWithSingleRefBuilder<C, B>> {
private String username;
private SingleRefType singleRefType;
protected abstract B self();
public abstract C build();
public B username(String username) {
this.username = username;
return self();
}
public B singleRefType(SingleRefType singleRefType) {
this.singleRefType = singleRefType;
return self();
}
}
}

View File

@@ -0,0 +1,152 @@
package org.openapitools.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Cat.class, name = "CAT"),
@JsonSubTypes.Type(value = Dog.class, name = "DOG"),
})
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("Animal")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class Animal implements Serializable {
private String className;
private String color = "red";
protected Animal(AnimalBuilder<?, ?> b) {
this.className = b.className;
this.color = b.color;
}
public Animal() {
}
/**
**/
public Animal className(String className) {
this.className = className;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "")
@JsonProperty("className")
@NotNull public String getClassName() {
return className;
}
@JsonProperty("className")
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Animal color(String color) {
this.color = color;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("color")
public String getColor() {
return color;
}
@JsonProperty("color")
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
}
@Override
public int hashCode() {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).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 ");
}
public static AnimalBuilder<?, ?> builder() {
return new AnimalBuilderImpl();
}
private static final class AnimalBuilderImpl extends AnimalBuilder<Animal, AnimalBuilderImpl> {
@Override
protected AnimalBuilderImpl self() {
return this;
}
@Override
public Animal build() {
return new Animal(this);
}
}
public static abstract class AnimalBuilder<C extends Animal, B extends AnimalBuilder<C, B>> {
private String className;
private String color = "red";
protected abstract B self();
public abstract C build();
public B className(String className) {
this.className = className;
return self();
}
public B color(String color) {
this.color = color;
return self();
}
}
}

View File

@@ -0,0 +1,136 @@
package org.openapitools.model;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("ArrayOfArrayOfNumberOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class ArrayOfArrayOfNumberOnly implements Serializable {
private @Valid List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
protected ArrayOfArrayOfNumberOnly(ArrayOfArrayOfNumberOnlyBuilder<?, ?> b) {
this.arrayArrayNumber = b.arrayArrayNumber;
}
public ArrayOfArrayOfNumberOnly() {
}
/**
**/
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("ArrayArrayNumber")
@Valid public List<@Valid List<@Valid BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
@JsonProperty("ArrayArrayNumber")
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
public ArrayOfArrayOfNumberOnly removeArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (arrayArrayNumberItem != null && this.arrayArrayNumber != null) {
this.arrayArrayNumber.remove(arrayArrayNumberItem);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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 ");
}
public static ArrayOfArrayOfNumberOnlyBuilder<?, ?> builder() {
return new ArrayOfArrayOfNumberOnlyBuilderImpl();
}
private static final class ArrayOfArrayOfNumberOnlyBuilderImpl extends ArrayOfArrayOfNumberOnlyBuilder<ArrayOfArrayOfNumberOnly, ArrayOfArrayOfNumberOnlyBuilderImpl> {
@Override
protected ArrayOfArrayOfNumberOnlyBuilderImpl self() {
return this;
}
@Override
public ArrayOfArrayOfNumberOnly build() {
return new ArrayOfArrayOfNumberOnly(this);
}
}
public static abstract class ArrayOfArrayOfNumberOnlyBuilder<C extends ArrayOfArrayOfNumberOnly, B extends ArrayOfArrayOfNumberOnlyBuilder<C, B>> {
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return self();
}
}
}

View File

@@ -0,0 +1,136 @@
package org.openapitools.model;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("ArrayOfNumberOnly")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class ArrayOfNumberOnly implements Serializable {
private @Valid List<BigDecimal> arrayNumber = new ArrayList<>();
protected ArrayOfNumberOnly(ArrayOfNumberOnlyBuilder<?, ?> b) {
this.arrayNumber = b.arrayNumber;
}
public ArrayOfNumberOnly() {
}
/**
**/
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("ArrayNumber")
@Valid public List<@Valid BigDecimal> getArrayNumber() {
return arrayNumber;
}
@JsonProperty("ArrayNumber")
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}
public ArrayOfNumberOnly removeArrayNumberItem(BigDecimal arrayNumberItem) {
if (arrayNumberItem != null && this.arrayNumber != null) {
this.arrayNumber.remove(arrayNumberItem);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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 ");
}
public static ArrayOfNumberOnlyBuilder<?, ?> builder() {
return new ArrayOfNumberOnlyBuilderImpl();
}
private static final class ArrayOfNumberOnlyBuilderImpl extends ArrayOfNumberOnlyBuilder<ArrayOfNumberOnly, ArrayOfNumberOnlyBuilderImpl> {
@Override
protected ArrayOfNumberOnlyBuilderImpl self() {
return this;
}
@Override
public ArrayOfNumberOnly build() {
return new ArrayOfNumberOnly(this);
}
}
public static abstract class ArrayOfNumberOnlyBuilder<C extends ArrayOfNumberOnly, B extends ArrayOfNumberOnlyBuilder<C, B>> {
private List<BigDecimal> arrayNumber = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return self();
}
}
}

View File

@@ -0,0 +1,224 @@
package org.openapitools.model;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.model.ReadOnlyFirst;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("ArrayTest")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class ArrayTest implements Serializable {
private @Valid List<String> arrayOfString = new ArrayList<>();
private @Valid List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
private @Valid List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
protected ArrayTest(ArrayTestBuilder<?, ?> b) {
this.arrayOfString = b.arrayOfString;
this.arrayArrayOfInteger = b.arrayArrayOfInteger;
this.arrayArrayOfModel = b.arrayArrayOfModel;
}
public ArrayTest() {
}
/**
**/
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("array_of_string")
@Size(min=0,max=3)public List<String> getArrayOfString() {
return arrayOfString;
}
@JsonProperty("array_of_string")
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
public ArrayTest removeArrayOfStringItem(String arrayOfStringItem) {
if (arrayOfStringItem != null && this.arrayOfString != null) {
this.arrayOfString.remove(arrayOfStringItem);
}
return this;
}
/**
**/
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("array_array_of_integer")
@Valid public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
@JsonProperty("array_array_of_integer")
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
public ArrayTest removeArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (arrayArrayOfIntegerItem != null && this.arrayArrayOfInteger != null) {
this.arrayArrayOfInteger.remove(arrayArrayOfIntegerItem);
}
return this;
}
/**
**/
public ArrayTest arrayArrayOfModel(List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("array_array_of_model")
@Valid public List<@Valid List<@Valid ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
@JsonProperty("array_array_of_model")
public void setArrayArrayOfModel(List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
public ArrayTest addArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
public ArrayTest removeArrayArrayOfModelItem(List<@Valid ReadOnlyFirst> arrayArrayOfModelItem) {
if (arrayArrayOfModelItem != null && this.arrayArrayOfModel != null) {
this.arrayArrayOfModel.remove(arrayArrayOfModelItem);
}
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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 ");
}
public static ArrayTestBuilder<?, ?> builder() {
return new ArrayTestBuilderImpl();
}
private static final class ArrayTestBuilderImpl extends ArrayTestBuilder<ArrayTest, ArrayTestBuilderImpl> {
@Override
protected ArrayTestBuilderImpl self() {
return this;
}
@Override
public ArrayTest build() {
return new ArrayTest(this);
}
}
public static abstract class ArrayTestBuilder<C extends ArrayTest, B extends ArrayTestBuilder<C, B>> {
private List<String> arrayOfString = new ArrayList<>();
private List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
private List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
protected abstract B self();
public abstract C build();
public B arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return self();
}
public B arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return self();
}
public B arrayArrayOfModel(List<List<@Valid ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return self();
}
}
}

View File

@@ -0,0 +1,163 @@
package org.openapitools.model;
import org.openapitools.model.Cat;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("BigCat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class BigCat extends Cat implements Serializable {
public enum KindEnum {
LIONS(String.valueOf("lions")), TIGERS(String.valueOf("tigers")), LEOPARDS(String.valueOf("leopards")), JAGUARS(String.valueOf("jaguars"));
private String value;
KindEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
/**
* Convert a String into String, as specified in the
* <a href="https://download.oracle.com/otndocs/jcp/jaxrs-2_0-fr-eval-spec/index.html">See JAX RS 2.0 Specification, section 3.2, p. 12</a>
*/
public static KindEnum fromString(String s) {
for (KindEnum b : KindEnum.values()) {
// using Objects.toString() to be safe if value type non-object type
// because types like 'int' etc. will be auto-boxed
if (java.util.Objects.toString(b.value).equals(s)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected string value '" + s + "'");
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
private KindEnum kind;
protected BigCat(BigCatBuilder<?, ?> b) {
super(b);
this.kind = b.kind;
}
public BigCat() {
}
/**
**/
public BigCat kind(KindEnum kind) {
this.kind = kind;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("kind")
public KindEnum getKind() {
return kind;
}
@JsonProperty("kind")
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCat bigCat = (BigCat) o;
return Objects.equals(this.kind, bigCat.kind) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(kind, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).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 ");
}
public static BigCatBuilder<?, ?> builder() {
return new BigCatBuilderImpl();
}
private static final class BigCatBuilderImpl extends BigCatBuilder<BigCat, BigCatBuilderImpl> {
@Override
protected BigCatBuilderImpl self() {
return this;
}
@Override
public BigCat build() {
return new BigCat(this);
}
}
public static abstract class BigCatBuilder<C extends BigCat, B extends BigCatBuilder<C, B>> extends CatBuilder<C, B> {
private KindEnum kind;
public B kind(KindEnum kind) {
this.kind = kind;
return self();
}
}
}

View File

@@ -0,0 +1,257 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("Capitalization")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class Capitalization implements Serializable {
private String smallCamel;
private String capitalCamel;
private String smallSnake;
private String capitalSnake;
private String scAETHFlowPoints;
private String ATT_NAME;
protected Capitalization(CapitalizationBuilder<?, ?> b) {
this.smallCamel = b.smallCamel;
this.capitalCamel = b.capitalCamel;
this.smallSnake = b.smallSnake;
this.capitalSnake = b.capitalSnake;
this.scAETHFlowPoints = b.scAETHFlowPoints;
this.ATT_NAME = b.ATT_NAME;
}
public Capitalization() {
}
/**
**/
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("smallCamel")
public String getSmallCamel() {
return smallCamel;
}
@JsonProperty("smallCamel")
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
/**
**/
public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("CapitalCamel")
public String getCapitalCamel() {
return capitalCamel;
}
@JsonProperty("CapitalCamel")
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
/**
**/
public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("small_Snake")
public String getSmallSnake() {
return smallSnake;
}
@JsonProperty("small_Snake")
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
/**
**/
public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("Capital_Snake")
public String getCapitalSnake() {
return capitalSnake;
}
@JsonProperty("Capital_Snake")
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
/**
**/
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("SCA_ETH_Flow_Points")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
@JsonProperty("SCA_ETH_Flow_Points")
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
/**
* Name of the pet
**/
public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "Name of the pet ")
@JsonProperty("ATT_NAME")
public String getATTNAME() {
return ATT_NAME;
}
@JsonProperty("ATT_NAME")
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
}
@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Capitalization {\n");
sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static CapitalizationBuilder<?, ?> builder() {
return new CapitalizationBuilderImpl();
}
private static final class CapitalizationBuilderImpl extends CapitalizationBuilder<Capitalization, CapitalizationBuilderImpl> {
@Override
protected CapitalizationBuilderImpl self() {
return this;
}
@Override
public Capitalization build() {
return new Capitalization(this);
}
}
public static abstract class CapitalizationBuilder<C extends Capitalization, B extends CapitalizationBuilder<C, B>> {
private String smallCamel;
private String capitalCamel;
private String smallSnake;
private String capitalSnake;
private String scAETHFlowPoints;
private String ATT_NAME;
protected abstract B self();
public abstract C build();
public B smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return self();
}
public B capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return self();
}
public B smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return self();
}
public B capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return self();
}
public B scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return self();
}
public B ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return self();
}
}
}

View File

@@ -0,0 +1,116 @@
package org.openapitools.model;
import org.openapitools.model.Animal;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("Cat")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class Cat extends Animal implements Serializable {
private Boolean declawed;
protected Cat(CatBuilder<?, ?> b) {
super(b);
this.declawed = b.declawed;
}
public Cat() {
}
/**
**/
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("declawed")
public Boolean getDeclawed() {
return declawed;
}
@JsonProperty("declawed")
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).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 ");
}
public static CatBuilder<?, ?> builder() {
return new CatBuilderImpl();
}
private static final class CatBuilderImpl extends CatBuilder<Cat, CatBuilderImpl> {
@Override
protected CatBuilderImpl self() {
return this;
}
@Override
public Cat build() {
return new Cat(this);
}
}
public static abstract class CatBuilder<C extends Cat, B extends CatBuilder<C, B>> extends AnimalBuilder<C, B> {
private Boolean declawed;
public B declawed(Boolean declawed) {
this.declawed = declawed;
return self();
}
}
}

View File

@@ -0,0 +1,144 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("Category")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class Category implements Serializable {
private Long id;
private String name = "default-name";
protected Category(CategoryBuilder<?, ?> b) {
this.id = b.id;
this.name = b.name;
}
public Category() {
}
/**
**/
public Category id(Long id) {
this.id = id;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("id")
public Long getId() {
return id;
}
@JsonProperty("id")
public void setId(Long id) {
this.id = id;
}
/**
**/
public Category name(String name) {
this.name = name;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(required = true, description = "")
@JsonProperty("name")
@NotNull public String getName() {
return name;
}
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Category category = (Category) o;
return Objects.equals(this.id, category.id) &&
Objects.equals(this.name, category.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static CategoryBuilder<?, ?> builder() {
return new CategoryBuilderImpl();
}
private static final class CategoryBuilderImpl extends CategoryBuilder<Category, CategoryBuilderImpl> {
@Override
protected CategoryBuilderImpl self() {
return this;
}
@Override
public Category build() {
return new Category(this);
}
}
public static abstract class CategoryBuilder<C extends Category, B extends CategoryBuilder<C, B>> {
private Long id;
private String name = "default-name";
protected abstract B self();
public abstract C build();
public B id(Long id) {
this.id = id;
return self();
}
public B name(String name) {
this.name = name;
return self();
}
}
}

View File

@@ -0,0 +1,117 @@
package org.openapitools.model;
import org.openapitools.jackson.nullable.JsonNullable;
import org.openapitools.model.ParentWithNullable;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="")
@JsonTypeName("ChildWithNullable")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class ChildWithNullable extends ParentWithNullable implements Serializable {
private String otherProperty;
protected ChildWithNullable(ChildWithNullableBuilder<?, ?> b) {
super(b);
this.otherProperty = b.otherProperty;
}
public ChildWithNullable() {
}
/**
**/
public ChildWithNullable otherProperty(String otherProperty) {
this.otherProperty = otherProperty;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("otherProperty")
public String getOtherProperty() {
return otherProperty;
}
@JsonProperty("otherProperty")
public void setOtherProperty(String otherProperty) {
this.otherProperty = otherProperty;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChildWithNullable childWithNullable = (ChildWithNullable) o;
return Objects.equals(this.otherProperty, childWithNullable.otherProperty) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(otherProperty, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChildWithNullable {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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 ");
}
public static ChildWithNullableBuilder<?, ?> builder() {
return new ChildWithNullableBuilderImpl();
}
private static final class ChildWithNullableBuilderImpl extends ChildWithNullableBuilder<ChildWithNullable, ChildWithNullableBuilderImpl> {
@Override
protected ChildWithNullableBuilderImpl self() {
return this;
}
@Override
public ChildWithNullable build() {
return new ChildWithNullable(this);
}
}
public static abstract class ChildWithNullableBuilder<C extends ChildWithNullable, B extends ChildWithNullableBuilder<C, B>> extends ParentWithNullableBuilder<C, B> {
private String otherProperty;
public B otherProperty(String otherProperty) {
this.otherProperty = otherProperty;
return self();
}
}
}

View File

@@ -0,0 +1,118 @@
package org.openapitools.model;
import java.io.Serializable;
import javax.validation.constraints.*;
import javax.validation.Valid;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Model for testing model with \&quot;_class\&quot; property
**/
@org.eclipse.microprofile.openapi.annotations.media.Schema(description="Model for testing model with \"_class\" property")
@JsonTypeName("ClassModel")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen", comments = "Generator version: 7.5.0-SNAPSHOT")
public class ClassModel implements Serializable {
private String propertyClass;
protected ClassModel(ClassModelBuilder<?, ?> b) {
this.propertyClass = b.propertyClass;
}
public ClassModel() {
}
/**
**/
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "")
@JsonProperty("_class")
public String getPropertyClass() {
return propertyClass;
}
@JsonProperty("_class")
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClassModel classModel = (ClassModel) o;
return Objects.equals(this.propertyClass, classModel.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClassModel {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 ");
}
public static ClassModelBuilder<?, ?> builder() {
return new ClassModelBuilderImpl();
}
private static final class ClassModelBuilderImpl extends ClassModelBuilder<ClassModel, ClassModelBuilderImpl> {
@Override
protected ClassModelBuilderImpl self() {
return this;
}
@Override
public ClassModel build() {
return new ClassModel(this);
}
}
public static abstract class ClassModelBuilder<C extends ClassModel, B extends ClassModelBuilder<C, B>> {
private String propertyClass;
protected abstract B self();
public abstract C build();
public B propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return self();
}
}
}

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