mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
[Java] implicit headers regex (#11819)
This commit is contained in:
parent
cbdcf8cdad
commit
fb2c41c720
@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
implicitHeadersRegex: api_key
|
||||
|
@ -5,3 +5,4 @@ templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
serverPort: "8082"
|
||||
implicitHeadersRegex: (api_key|enum_header_string)
|
||||
|
@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
implicitHeadersRegex: api_key
|
||||
|
@ -6,3 +6,4 @@ additionalProperties:
|
||||
artifactId: jaxrs-resteasy-eap-java8-server
|
||||
hideGenerationTimestamp: "true"
|
||||
dateLibrary: java8
|
||||
implicitHeadersRegex: api_key
|
||||
|
@ -7,3 +7,4 @@ additionalProperties:
|
||||
interfaceOnly: "true"
|
||||
serializableModel: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
implicitHeadersRegex: (api_key|enum_header_string)
|
||||
|
@ -6,3 +6,4 @@ additionalProperties:
|
||||
artifactId: jaxrs-spec-petstore-server
|
||||
serializableModel: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
implicitHeadersRegex: (api_key|enum_header_string)
|
||||
|
@ -6,4 +6,4 @@ additionalProperties:
|
||||
artifactId: springboot-implicitHeaders
|
||||
documentationProvider: springfox
|
||||
hideGenerationTimestamp: "true"
|
||||
implicitHeaders: true
|
||||
implicitHeadersRegex: .*
|
||||
|
@ -40,6 +40,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -58,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|
@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.controllers|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -43,6 +43,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -43,6 +43,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2|
|
||||
|
@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |com.prokarma|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -46,6 +46,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.handler|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -48,6 +48,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.client|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libraries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: JSON-B</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 4.x</dd></dl>|okhttp-gson|
|
||||
|
@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|
@ -42,6 +42,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -49,6 +49,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -48,6 +48,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -43,6 +43,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2|
|
||||
|
@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -44,6 +44,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|licenseName|The name of the license| |Unlicense|
|
||||
|
@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implFolder|folder for generated implementation code| |src/main/java|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|
@ -51,6 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|ignoreAnyOfInEnum|Ignore anyOf keyword in enum| |false|
|
||||
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|
||||
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
|
||||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|
||||
|invokerPackage|root package for generated code| |org.openapitools.api|
|
||||
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|
||||
|
@ -42,6 +42,7 @@ public class CodegenOperation {
|
||||
public List<CodegenParameter> pathParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> queryParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> headerParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> implicitHeadersParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> formParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> cookieParams = new ArrayList<CodegenParameter>();
|
||||
public List<CodegenParameter> requiredParams = new ArrayList<CodegenParameter>();
|
||||
|
@ -70,6 +70,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
public static final String OPENAPI_NULLABLE = "openApiNullable";
|
||||
public static final String JACKSON = "jackson";
|
||||
public static final String TEST_OUTPUT = "testOutput";
|
||||
public static final String IMPLICIT_HEADERS = "implicitHeaders";
|
||||
public static final String IMPLICIT_HEADERS_REGEX = "implicitHeadersRegex";
|
||||
|
||||
public static final String DEFAULT_TEST_FOLDER = "${project.build.directory}/generated-test-sources/openapi";
|
||||
|
||||
@ -117,6 +119,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
protected String outputTestFolder = "";
|
||||
protected DocumentationProvider documentationProvider;
|
||||
protected AnnotationLibrary annotationLibrary;
|
||||
protected boolean implicitHeaders = false;
|
||||
protected String implicitHeadersRegex = null;
|
||||
|
||||
public AbstractJavaCodegen() {
|
||||
super();
|
||||
@ -246,6 +250,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations)"));
|
||||
cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)"));
|
||||
cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable));
|
||||
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders));
|
||||
cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true"));
|
||||
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC));
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC));
|
||||
@ -525,6 +531,14 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.setParentVersion((String) additionalProperties.get(CodegenConstants.PARENT_VERSION));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(IMPLICIT_HEADERS)) {
|
||||
this.setImplicitHeaders(Boolean.parseBoolean(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(IMPLICIT_HEADERS_REGEX)) {
|
||||
this.setImplicitHeadersRegex(additionalProperties.get(IMPLICIT_HEADERS_REGEX).toString());
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(parentGroupId) && !StringUtils.isEmpty(parentArtifactId) && !StringUtils.isEmpty(parentVersion)) {
|
||||
additionalProperties.put("parentOverridden", true);
|
||||
}
|
||||
@ -1357,6 +1371,8 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
}
|
||||
op.vendorExtensions.put("x-java-import", operationImports);
|
||||
|
||||
handleImplicitHeaders(op);
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
@ -1384,7 +1400,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
String accepts = getAccept(openAPI, operation);
|
||||
operation.addExtension("x-accepts", accepts);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1823,6 +1838,14 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.annotationLibrary = annotationLibrary;
|
||||
}
|
||||
|
||||
public void setImplicitHeaders(boolean implicitHeaders) {
|
||||
this.implicitHeaders = implicitHeaders;
|
||||
}
|
||||
|
||||
public void setImplicitHeadersRegex(String implicitHeadersRegex) {
|
||||
this.implicitHeadersRegex = implicitHeadersRegex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
@ -2004,6 +2027,33 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method removes all implicit header parameters from the list of parameters
|
||||
*
|
||||
* @param operation - operation to be processed
|
||||
*/
|
||||
protected void handleImplicitHeaders(CodegenOperation operation) {
|
||||
if (operation.allParams.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final ArrayList<CodegenParameter> copy = new ArrayList<>(operation.allParams);
|
||||
operation.allParams.clear();
|
||||
|
||||
for (CodegenParameter p : copy) {
|
||||
if (p.isHeaderParam && (implicitHeaders || shouldBeImplicitHeader(p))) {
|
||||
operation.implicitHeadersParams.add(p);
|
||||
operation.headerParams.removeIf(header -> header.baseName.equals(p.baseName));
|
||||
LOGGER.info("Update operation [{}]. Remove header [{}] because it's marked to be implicit", operation.operationId, p.baseName);
|
||||
} else {
|
||||
operation.allParams.add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldBeImplicitHeader(CodegenParameter parameter) {
|
||||
return StringUtils.isNotBlank(implicitHeadersRegex) && parameter.baseName.matches(implicitHeadersRegex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VendorExtension> getSupportedVendorExtensions() {
|
||||
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
|
||||
|
@ -167,8 +167,17 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
|
||||
return jaxrsPostProcessOperations(objs);
|
||||
Map<String, Object> updatedObjs = jaxrsPostProcessOperations(objs);
|
||||
Map<String, Object> operations = (Map<String, Object>) updatedObjs.get("operations");
|
||||
if (operations != null) {
|
||||
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
|
||||
for (CodegenOperation co : ops) {
|
||||
handleImplicitHeaders(co);
|
||||
}
|
||||
}
|
||||
return updatedObjs;
|
||||
}
|
||||
|
||||
static Map<String, Object> jaxrsPostProcessOperations(Map<String, Object> objs) {
|
||||
|
@ -45,7 +45,6 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
protected String basePackage = "com.prokarma.pkmst";
|
||||
protected String serviceName = "Pkmst";
|
||||
protected String configPackage = "com.prokarma.pkmst.config";
|
||||
protected boolean implicitHeaders = false;
|
||||
protected String title;
|
||||
protected String eurekaUri;
|
||||
protected String zipkinUri;
|
||||
@ -347,34 +346,13 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
|
||||
}
|
||||
});
|
||||
|
||||
if (implicitHeaders) {
|
||||
removeHeadersFromAllParams(operation.allParams);
|
||||
}
|
||||
handleImplicitHeaders(operation);
|
||||
}
|
||||
}
|
||||
|
||||
return objs;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method removes header parameters from the list of parameters
|
||||
*
|
||||
* @param allParams list of all parameters
|
||||
*/
|
||||
private void removeHeadersFromAllParams(List<CodegenParameter> allParams) {
|
||||
if (allParams.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final ArrayList<CodegenParameter> copy = new ArrayList<>(allParams);
|
||||
allParams.clear();
|
||||
|
||||
for (CodegenParameter p : copy) {
|
||||
if (!p.isHeaderParam) {
|
||||
allParams.add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param returnType The return type that needs to be converted
|
||||
* @param dataTypeAssigner An object that will assign the data to the respective fields
|
||||
|
@ -117,11 +117,6 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
|
||||
return super.postProcessOperationsWithModels(objs, allModels);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||
super.postProcessModelProperty(model, property);
|
||||
|
@ -128,11 +128,6 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
|
||||
return super.postProcessOperationsWithModels(objs, allModels);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postProcessModelProperty(CodegenModel model, CodegenProperty property) {
|
||||
super.postProcessModelProperty(model, property);
|
||||
|
@ -86,7 +86,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
public static final String USE_TAGS = "useTags";
|
||||
public static final String SPRING_BOOT = "spring-boot";
|
||||
public static final String SPRING_CLOUD_LIBRARY = "spring-cloud";
|
||||
public static final String IMPLICIT_HEADERS = "implicitHeaders";
|
||||
public static final String API_FIRST = "apiFirst";
|
||||
public static final String SPRING_CONTROLLER = "useSpringController";
|
||||
public static final String HATEOAS = "hateoas";
|
||||
@ -110,7 +109,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
protected boolean useTags = false;
|
||||
protected boolean useBeanValidation = true;
|
||||
protected boolean performBeanValidation = false;
|
||||
protected boolean implicitHeaders = false;
|
||||
protected boolean apiFirst = false;
|
||||
protected boolean useOptional = false;
|
||||
protected boolean virtualService = false;
|
||||
@ -180,9 +178,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations", useBeanValidation));
|
||||
cliOptions.add(CliOption.newBoolean(PERFORM_BEANVALIDATION,
|
||||
"Use Bean Validation Impl. to perform BeanValidation", performBeanValidation));
|
||||
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS,
|
||||
"Skip header parameters in the generated API methods using @ApiImplicitParams annotation.",
|
||||
implicitHeaders));
|
||||
cliOptions.add(CliOption.newBoolean(API_FIRST,
|
||||
"Generate the API from the OAI spec at server compile time (API first approach)", apiFirst));
|
||||
cliOptions
|
||||
@ -369,10 +364,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
this.setUseOptional(convertPropertyToBoolean(USE_OPTIONAL));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(IMPLICIT_HEADERS)) {
|
||||
this.setImplicitHeaders(Boolean.parseBoolean(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(API_FIRST)) {
|
||||
this.setApiFirst(Boolean.parseBoolean(additionalProperties.get(API_FIRST).toString()));
|
||||
}
|
||||
@ -665,9 +656,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
});
|
||||
|
||||
if (implicitHeaders) {
|
||||
removeHeadersFromAllParams(operation.allParams);
|
||||
}
|
||||
handleImplicitHeaders(operation);
|
||||
}
|
||||
}
|
||||
|
||||
@ -710,25 +699,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method removes header parameters from the list of parameters
|
||||
*
|
||||
* @param allParams list of all parameters
|
||||
*/
|
||||
private void removeHeadersFromAllParams(List<CodegenParameter> allParams) {
|
||||
if (allParams.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final ArrayList<CodegenParameter> copy = new ArrayList<>(allParams);
|
||||
allParams.clear();
|
||||
|
||||
for (final CodegenParameter p : copy) {
|
||||
if (!p.isHeaderParam) {
|
||||
allParams.add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> postProcessSupportingFileData(Map<String, Object> objs) {
|
||||
generateYAMLSpecFile(objs);
|
||||
@ -839,10 +809,6 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
this.useTags = useTags;
|
||||
}
|
||||
|
||||
public void setImplicitHeaders(boolean implicitHeaders) {
|
||||
this.implicitHeaders = implicitHeaders;
|
||||
}
|
||||
|
||||
public void setApiFirst(boolean apiFirst) {
|
||||
this.apiFirst = apiFirst;
|
||||
}
|
||||
|
@ -76,6 +76,13 @@ public class {{classname}} {
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}
|
||||
{{/responses}}
|
||||
})
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}}@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.{{nickname}}({{#allParams}}{{#isFormParam}}{{#isFile}}{{paramName}}Bodypart{{/isFile}}{{/isFormParam}}{{^isFile}}{{paramName}}{{/isFile}}{{^isFormParam}}{{#isFile}}{{paramName}}{{/isFile}}{{/isFormParam}}, {{/allParams}}securityContext);
|
||||
|
@ -51,6 +51,13 @@ public class {{classname}} {
|
||||
{{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}}
|
||||
{{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}}
|
||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
public Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) {
|
||||
|
@ -61,6 +61,13 @@ public interface {{classname}} {
|
||||
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
|
||||
{{/hasProduces}}
|
||||
@ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
public {{>returnTypes}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
|
@ -61,6 +61,13 @@ public interface {{classname}} {
|
||||
@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
|
||||
{{/hasProduces}}
|
||||
@ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}});
|
||||
|
@ -49,6 +49,13 @@ public class {{classname}} {
|
||||
}{{/isOAuth}}){{^-last}},
|
||||
{{/-last}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiResponses(value = { {{#responses}}
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
public Response {{nickname}}(
|
||||
|
@ -49,6 +49,13 @@ public class {{classname}} {
|
||||
}{{/isOAuth}}){{^-last}},
|
||||
{{/-last}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiResponses(value = { {{#responses}}
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},
|
||||
{{/-last}}{{/responses}} })
|
||||
|
@ -43,6 +43,13 @@ public interface {{classname}} {
|
||||
}{{/isOAuth}}){{^-last}},
|
||||
{{/-last}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiResponses(value = { {{#responses}}
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},
|
||||
{{/-last}}{{/responses}} })
|
||||
|
@ -8,6 +8,13 @@
|
||||
{{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}}
|
||||
{{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}}
|
||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}}
|
||||
{{#supportAsync}}{{>returnAsyncTypeInterface}}{{/supportAsync}}{{^supportAsync}}{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}}{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}});
|
@ -8,6 +8,13 @@
|
||||
{{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}}
|
||||
{{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}}
|
||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
|
||||
{{#implicitHeadersParams.0}}
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
{{#implicitHeadersParams}}
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
|
||||
{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeadersParams.0}}
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}}
|
||||
}){{/useSwaggerAnnotations}}
|
||||
|
@ -184,21 +184,21 @@ public interface {{classname}} {
|
||||
{{/responses}}
|
||||
})
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
{{#implicitHeaders}}
|
||||
{{#implicitHeadersParams.0}}
|
||||
{{#swagger2AnnotationLibrary}}
|
||||
@Parameters({
|
||||
{{#headerParams}}
|
||||
{{#implicitHeadersParams}}
|
||||
{{>paramDoc}}{{^-last}},{{/-last}}
|
||||
{{/headerParams}}
|
||||
{{/implicitHeadersParams}}
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
@ApiImplicitParams({
|
||||
{{#headerParams}}
|
||||
{{#implicitHeadersParams}}
|
||||
{{>implicitHeader}}{{^-last}},{{/-last}}
|
||||
{{/headerParams}}
|
||||
{{/implicitHeadersParams}}
|
||||
{{/swagger1AnnotationLibrary}}
|
||||
})
|
||||
{{/implicitHeaders}}
|
||||
{{/implicitHeadersParams.0}}
|
||||
@RequestMapping(
|
||||
method = RequestMethod.{{httpMethod}},
|
||||
value = "{{{path}}}"{{#singleContentTypes}}{{#hasProduces}},
|
||||
|
@ -1 +1 @@
|
||||
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}}
|
||||
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{/isHeaderParam}}
|
@ -50,11 +50,11 @@ public interface {{classname}} {
|
||||
{{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{.}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} })
|
||||
{{#implicitHeaders}}
|
||||
{{#implicitHeadersParams.0}}
|
||||
@ApiImplicitParams({
|
||||
{{#headerParams}}{{>implicitHeader}}{{/headerParams}}
|
||||
{{#implicitHeadersParams}}{{>implicitHeader}}{{/implicitHeadersParams}}
|
||||
})
|
||||
{{/implicitHeaders}}
|
||||
{{/implicitHeadersParams.0}}
|
||||
@RequestMapping(
|
||||
method = RequestMethod.{{httpMethod}},
|
||||
value = "{{{path}}}"{{#singleContentTypes}},
|
||||
|
@ -1 +1 @@
|
||||
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{paramName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}}
|
||||
{{#isHeaderParam}}@ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required=true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}{{/isHeaderParam}}
|
@ -131,7 +131,7 @@ public class JavaClientCodegenTest {
|
||||
CodegenParameter pathParam1 = createPathParam("pathParam1");
|
||||
CodegenParameter pathParam2 = createPathParam("pathParam2");
|
||||
|
||||
codegenOperation.allParams = Arrays.asList(queryParamRequired, pathParam1, pathParam2, queryParamOptional);
|
||||
codegenOperation.allParams.addAll(Arrays.asList(queryParamRequired, pathParam1, pathParam2, queryParamOptional));
|
||||
Map<String, Object> operations = ImmutableMap.of("operation", Arrays.asList(codegenOperation));
|
||||
|
||||
Map<String, Object> objs = ImmutableMap.of("operations", operations, "imports", new ArrayList<Map<String, String>>());
|
||||
|
@ -55,8 +55,6 @@ public interface AnotherFakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/another-fake/dummy",
|
||||
|
@ -63,8 +63,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/create_xml_item",
|
||||
@ -94,8 +92,6 @@ public interface FakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/boolean",
|
||||
@ -125,8 +121,6 @@ public interface FakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/composite",
|
||||
@ -165,8 +159,6 @@ public interface FakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/number",
|
||||
@ -196,8 +188,6 @@ public interface FakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/string",
|
||||
@ -225,8 +215,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "Success")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/body-with-file-schema",
|
||||
@ -254,8 +242,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "Success")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/body-with-query-params",
|
||||
@ -287,8 +273,6 @@ public interface FakeApi {
|
||||
})
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/fake",
|
||||
@ -345,8 +329,6 @@ public interface FakeApi {
|
||||
@SecurityRequirement(name = "http_basic_test")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake",
|
||||
@ -468,8 +450,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/inline-additionalProperties",
|
||||
@ -498,8 +478,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/fake/jsonFormData",
|
||||
@ -532,8 +510,6 @@ public interface FakeApi {
|
||||
@ApiResponse(responseCode = "200", description = "Success")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/test-query-parameters"
|
||||
@ -571,8 +547,6 @@ public interface FakeApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/{petId}/uploadImageWithRequiredFile",
|
||||
|
@ -58,8 +58,6 @@ public interface FakeClassnameTestApi {
|
||||
@SecurityRequirement(name = "api_key_query")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/fake_classname_test",
|
||||
|
@ -59,8 +59,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet",
|
||||
@ -131,8 +129,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/findByStatus",
|
||||
@ -184,8 +180,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/findByTags",
|
||||
@ -238,8 +232,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "api_key")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/{petId}",
|
||||
@ -290,8 +282,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/pet",
|
||||
@ -324,8 +314,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet/{petId}",
|
||||
@ -362,8 +350,6 @@ public interface PetApi {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet/{petId}/uploadImage",
|
||||
|
@ -56,8 +56,6 @@ public interface StoreApi {
|
||||
@ApiResponse(responseCode = "404", description = "Order not found")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/store/order/{order_id}"
|
||||
@ -89,8 +87,6 @@ public interface StoreApi {
|
||||
@SecurityRequirement(name = "api_key")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/store/inventory",
|
||||
@ -126,8 +122,6 @@ public interface StoreApi {
|
||||
@ApiResponse(responseCode = "404", description = "Order not found")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/store/order/{order_id}",
|
||||
@ -174,8 +168,6 @@ public interface StoreApi {
|
||||
@ApiResponse(responseCode = "400", description = "Invalid Order")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/store/order",
|
||||
|
@ -55,8 +55,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user"
|
||||
@ -83,8 +81,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithArray"
|
||||
@ -111,8 +107,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithList"
|
||||
@ -142,8 +136,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "404", description = "User not found")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/user/{username}"
|
||||
@ -177,8 +169,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "404", description = "User not found")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/{username}",
|
||||
@ -226,8 +216,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "400", description = "Invalid username/password supplied")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/login",
|
||||
@ -255,8 +243,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/logout"
|
||||
@ -287,8 +273,6 @@ public interface UserApi {
|
||||
@ApiResponse(responseCode = "404", description = "User not found")
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/user/{username}"
|
||||
|
@ -1,84 +0,0 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Must be named `File` for test.
|
||||
*/
|
||||
@Schema(name = "File",description = "Must be named `File` for test.")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ModelFile {
|
||||
@JsonProperty("sourceURI")
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile sourceURI(String sourceURI) {
|
||||
this.sourceURI = sourceURI;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @return sourceURI
|
||||
*/
|
||||
@Schema(name = "sourceURI", defaultValue = "Test capitalization")
|
||||
|
||||
|
||||
public String getSourceURI() {
|
||||
return sourceURI;
|
||||
}
|
||||
|
||||
public void setSourceURI(String sourceURI) {
|
||||
this.sourceURI = sourceURI;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ModelFile _file = (ModelFile) o;
|
||||
return Objects.equals(this.sourceURI, _file.sourceURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sourceURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelFile {\n");
|
||||
|
||||
sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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 ");
|
||||
}
|
||||
}
|
||||
|
@ -61,10 +61,13 @@ public class PetApi {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId, @ApiParam(value = "" )@HeaderParam("api_key") String apiKey) {
|
||||
return delegate.deletePet(petId, apiKey, securityContext);
|
||||
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId) {
|
||||
return delegate.deletePet(petId, securityContext);
|
||||
}
|
||||
|
||||
@GET
|
||||
|
@ -20,7 +20,7 @@ import javax.ws.rs.core.SecurityContext;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJAXRSCXFCDIServerCodegen")
|
||||
public interface PetApiService {
|
||||
public Response addPet(Pet body, SecurityContext securityContext);
|
||||
public Response deletePet(Long petId, String apiKey, SecurityContext securityContext);
|
||||
public Response deletePet(Long petId, SecurityContext securityContext);
|
||||
public Response findPetsByStatus(List<String> status, SecurityContext securityContext);
|
||||
@Deprecated public Response findPetsByTags(List<String> tags, SecurityContext securityContext);
|
||||
public Response getPetById(Long petId, SecurityContext securityContext);
|
||||
|
@ -26,7 +26,7 @@ public class PetApiServiceImpl implements PetApiService {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
@Override
|
||||
public Response deletePet(Long petId, String apiKey, SecurityContext securityContext) {
|
||||
public Response deletePet(Long petId, SecurityContext securityContext) {
|
||||
// do some magic!
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
@ -140,10 +140,13 @@ public interface FakeApi {
|
||||
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@ApiOperation(value = "To test enum parameters", tags={ "fake" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid request"),
|
||||
@ApiResponse(code = 404, message = "Not found") })
|
||||
public void testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString);
|
||||
public void testEnumParameters(@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @QueryParam("enum_query_string") @DefaultValue("-efg")String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @QueryParam("enum_query_double") Double enumQueryDouble, @Multipart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray, @Multipart(value = "enum_form_string", required = false) String enumFormString);
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
|
@ -52,10 +52,13 @@ public interface PetApi {
|
||||
@DELETE
|
||||
@Path("/pet/{petId}")
|
||||
@ApiOperation(value = "Deletes a pet", tags={ "pet" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||
public void deletePet(@PathParam("petId") Long petId, @HeaderParam("api_key") String apiKey);
|
||||
public void deletePet(@PathParam("petId") Long petId);
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
|
@ -31,9 +31,8 @@ public class AnotherFakeApiServiceImpl implements AnotherFakeApi {
|
||||
*/
|
||||
public Client call123testSpecialTags(Client body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -40,46 +40,46 @@ public class FakeApiServiceImpl implements FakeApi {
|
||||
*/
|
||||
public void createXmlItem(XmlItem xmlItem) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public Boolean fakeOuterBooleanSerialize(Boolean body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public String fakeOuterStringSerialize(String body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void testBodyWithFileSchema(FileSchemaTestClass body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void testBodyWithQueryParams(String query, User body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
*
|
||||
@ -88,10 +88,10 @@ public class FakeApiServiceImpl implements FakeApi {
|
||||
*/
|
||||
public Client testClientModel(Client body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*
|
||||
@ -100,22 +100,22 @@ public class FakeApiServiceImpl implements FakeApi {
|
||||
*/
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Attachment binaryDetail, LocalDate date, Date dateTime, String password, String paramCallback) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
*
|
||||
* To test enum parameters
|
||||
*
|
||||
*/
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) {
|
||||
public void testEnumParameters(List<String> enumHeaderStringArray, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
@ -124,35 +124,34 @@ public class FakeApiServiceImpl implements FakeApi {
|
||||
*/
|
||||
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Map<String, String> param) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
*/
|
||||
public void testJsonFormData(String param, String param2) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -31,9 +31,8 @@ public class FakeClassnameTags123ApiServiceImpl implements FakeClassnameTags123A
|
||||
*/
|
||||
public Client testClassname(Client body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,20 +32,20 @@ public class PetApiServiceImpl implements PetApi {
|
||||
*/
|
||||
public void addPet(Pet body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
*/
|
||||
public void deletePet(Long petId, String apiKey) {
|
||||
public void deletePet(Long petId) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
*
|
||||
@ -54,10 +54,10 @@ public class PetApiServiceImpl implements PetApi {
|
||||
*/
|
||||
public List<Pet> findPetsByStatus(List<String> status) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
*
|
||||
@ -66,10 +66,10 @@ public class PetApiServiceImpl implements PetApi {
|
||||
*/
|
||||
public Set<Pet> findPetsByTags(Set<String> tags) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
*
|
||||
@ -78,49 +78,48 @@ public class PetApiServiceImpl implements PetApi {
|
||||
*/
|
||||
public Pet getPetById(Long petId) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
*/
|
||||
public void updatePet(Pet body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
*/
|
||||
public void updatePetWithForm(Long petId, String name, String status) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
*/
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment fileDetail) {
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, Attachment _fileDetail) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment requiredFileDetail, String additionalMetadata) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ public class StoreApiServiceImpl implements StoreApi {
|
||||
*/
|
||||
public void deleteOrder(String orderId) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
@ -44,10 +44,10 @@ public class StoreApiServiceImpl implements StoreApi {
|
||||
*/
|
||||
public Map<String, Integer> getInventory() {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
*
|
||||
@ -56,19 +56,18 @@ public class StoreApiServiceImpl implements StoreApi {
|
||||
*/
|
||||
public Order getOrderById(Long orderId) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
*/
|
||||
public Order placeOrder(Order body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.openapitools.api.impl;
|
||||
|
||||
import org.openapitools.api.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
@ -32,30 +33,30 @@ public class UserApiServiceImpl implements UserApi {
|
||||
*/
|
||||
public void createUser(User body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*/
|
||||
public void createUsersWithArrayInput(List<User> body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
*/
|
||||
public void createUsersWithListInput(List<User> body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
*
|
||||
@ -64,40 +65,40 @@ public class UserApiServiceImpl implements UserApi {
|
||||
*/
|
||||
public void deleteUser(String username) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
*/
|
||||
public User getUserByName(String username) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
*/
|
||||
public String loginUser(String username, String password) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*/
|
||||
public void logoutUser() {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
*
|
||||
@ -106,9 +107,8 @@ public class UserApiServiceImpl implements UserApi {
|
||||
*/
|
||||
public void updateUser(String username, User body) {
|
||||
// TODO: Implement...
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,18 +8,6 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
@ -51,23 +39,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for AnotherFakeApi
|
||||
* API tests for AnotherFakeApi
|
||||
*/
|
||||
public class AnotherFakeApiTest {
|
||||
|
||||
|
||||
private AnotherFakeApi api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", AnotherFakeApi.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -85,8 +73,8 @@ public class AnotherFakeApiTest {
|
||||
//Client response = api.call123testSpecialTags(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,18 +8,6 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
@ -60,23 +48,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for FakeApi
|
||||
* API tests for FakeApi
|
||||
*/
|
||||
public class FakeApiTest {
|
||||
|
||||
|
||||
private FakeApi api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeApi.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -94,8 +82,8 @@ public class FakeApiTest {
|
||||
//api.createXmlItem(xmlItem);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,8 +96,8 @@ public class FakeApiTest {
|
||||
//Boolean response = api.fakeOuterBooleanSerialize(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -122,8 +110,8 @@ public class FakeApiTest {
|
||||
//OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,8 +124,8 @@ public class FakeApiTest {
|
||||
//BigDecimal response = api.fakeOuterNumberSerialize(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -150,8 +138,8 @@ public class FakeApiTest {
|
||||
//String response = api.fakeOuterStringSerialize(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -164,8 +152,8 @@ public class FakeApiTest {
|
||||
//api.testBodyWithFileSchema(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -179,8 +167,8 @@ public class FakeApiTest {
|
||||
//api.testBodyWithQueryParams(query, body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -197,8 +185,8 @@ public class FakeApiTest {
|
||||
//Client response = api.testClientModel(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -228,8 +216,8 @@ public class FakeApiTest {
|
||||
//api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -243,18 +231,17 @@ public class FakeApiTest {
|
||||
@Test
|
||||
public void testEnumParametersTest() {
|
||||
List<String> enumHeaderStringArray = null;
|
||||
String enumHeaderString = null;
|
||||
List<String> enumQueryStringArray = null;
|
||||
String enumQueryString = null;
|
||||
Integer enumQueryInteger = null;
|
||||
Double enumQueryDouble = null;
|
||||
List<String> enumFormStringArray = null;
|
||||
String enumFormString = null;
|
||||
//api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
//api.testEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -276,8 +263,8 @@ public class FakeApiTest {
|
||||
//api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -292,8 +279,8 @@ public class FakeApiTest {
|
||||
//api.testInlineAdditionalProperties(param);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -309,8 +296,8 @@ public class FakeApiTest {
|
||||
//api.testJsonFormData(param, param2);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -327,8 +314,8 @@ public class FakeApiTest {
|
||||
//api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,18 +8,6 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
@ -51,23 +39,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for FakeClassnameTags123Api
|
||||
* API tests for FakeClassnameTags123Api
|
||||
*/
|
||||
public class FakeClassnameTags123ApiTest {
|
||||
|
||||
|
||||
private FakeClassnameTags123Api api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeClassnameTags123Api.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -85,8 +73,8 @@ public class FakeClassnameTags123ApiTest {
|
||||
//Client response = api.testClassname(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,18 +8,6 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
@ -54,23 +42,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for PetApi
|
||||
* API tests for PetApi
|
||||
*/
|
||||
public class PetApiTest {
|
||||
|
||||
|
||||
private PetApi api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", PetApi.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -86,8 +74,8 @@ public class PetApiTest {
|
||||
//api.addPet(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,12 +87,11 @@ public class PetApiTest {
|
||||
@Test
|
||||
public void deletePetTest() {
|
||||
Long petId = null;
|
||||
String apiKey = null;
|
||||
//api.deletePet(petId, apiKey);
|
||||
//api.deletePet(petId);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,8 +108,8 @@ public class PetApiTest {
|
||||
//List<Pet> response = api.findPetsByStatus(status);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -139,8 +126,8 @@ public class PetApiTest {
|
||||
//Set<Pet> response = api.findPetsByTags(tags);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -157,8 +144,8 @@ public class PetApiTest {
|
||||
//Pet response = api.getPetById(petId);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -173,8 +160,8 @@ public class PetApiTest {
|
||||
//api.updatePet(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -191,8 +178,8 @@ public class PetApiTest {
|
||||
//api.updatePetWithForm(petId, name, status);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -205,12 +192,12 @@ public class PetApiTest {
|
||||
public void uploadFileTest() {
|
||||
Long petId = null;
|
||||
String additionalMetadata = null;
|
||||
org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
|
||||
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
|
||||
org.apache.cxf.jaxrs.ext.multipart.Attachment _file = null;
|
||||
//ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -227,8 +214,8 @@ public class PetApiTest {
|
||||
//ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,18 +8,6 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
@ -52,23 +40,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for StoreApi
|
||||
* API tests for StoreApi
|
||||
*/
|
||||
public class StoreApiTest {
|
||||
|
||||
|
||||
private StoreApi api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", StoreApi.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -86,8 +74,8 @@ public class StoreApiTest {
|
||||
//api.deleteOrder(orderId);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -103,8 +91,8 @@ public class StoreApiTest {
|
||||
//Map<String, Integer> response = api.getInventory();
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,8 +109,8 @@ public class StoreApiTest {
|
||||
//Order response = api.getOrderById(orderId);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,8 +125,8 @@ public class StoreApiTest {
|
||||
//Order response = api.placeOrder(body);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,23 +8,12 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.api;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.User;
|
||||
import org.junit.Test;
|
||||
@ -52,23 +41,23 @@ import java.util.Map;
|
||||
*
|
||||
* <p>This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API tests for UserApi
|
||||
* API tests for UserApi
|
||||
*/
|
||||
public class UserApiTest {
|
||||
|
||||
|
||||
private UserApi api;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
JacksonJsonProvider provider = new JacksonJsonProvider();
|
||||
List providers = new ArrayList();
|
||||
providers.add(provider);
|
||||
|
||||
|
||||
api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", UserApi.class, providers);
|
||||
org.apache.cxf.jaxrs.client.Client client = WebClient.client(api);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
|
||||
ClientConfiguration config = WebClient.getConfig(client);
|
||||
}
|
||||
|
||||
|
||||
@ -86,8 +75,8 @@ public class UserApiTest {
|
||||
//api.createUser(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,8 +91,8 @@ public class UserApiTest {
|
||||
//api.createUsersWithArrayInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -118,8 +107,8 @@ public class UserApiTest {
|
||||
//api.createUsersWithListInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,8 +125,8 @@ public class UserApiTest {
|
||||
//api.deleteUser(username);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -152,8 +141,8 @@ public class UserApiTest {
|
||||
//User response = api.getUserByName(username);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -169,8 +158,8 @@ public class UserApiTest {
|
||||
//String response = api.loginUser(username, password);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,8 +173,8 @@ public class UserApiTest {
|
||||
//api.logoutUser();
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -203,8 +192,8 @@ public class UserApiTest {
|
||||
//api.updateUser(username, body);
|
||||
|
||||
// TODO: test validations
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -61,11 +61,14 @@ public class PetApi {
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext)
|
||||
public Response deletePet( @PathParam("petId") Long petId,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return service.deletePet(petId,apiKey,securityContext);
|
||||
return service.deletePet(petId,securityContext);
|
||||
}
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
|
@ -21,7 +21,7 @@ import javax.ws.rs.core.SecurityContext;
|
||||
public interface PetApiService {
|
||||
Response addPet(Pet body,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
|
||||
Response deletePet(Long petId,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
Response findPetsByStatus(List<String> status,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
|
@ -26,7 +26,7 @@ public class PetApiServiceImpl implements PetApiService {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
public Response deletePet(Long petId,String apiKey,SecurityContext securityContext)
|
||||
public Response deletePet(Long petId,SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
|
@ -52,9 +52,12 @@ public interface PetApi {
|
||||
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
public Response deletePet( @PathParam("petId") Long petId, @ApiParam(value = "" ) @HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext);
|
||||
public Response deletePet( @PathParam("petId") Long petId,@Context SecurityContext securityContext);
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
|
||||
|
@ -22,7 +22,7 @@ public class PetApiServiceImpl implements PetApi {
|
||||
// do some magic!
|
||||
return Response.ok().build();
|
||||
}
|
||||
public Response deletePet(Long petId,String apiKey,SecurityContext securityContext) {
|
||||
public Response deletePet(Long petId,SecurityContext securityContext) {
|
||||
// do some magic!
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
@ -105,10 +105,13 @@ import javax.validation.Valid;
|
||||
@GET
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", tags={ "fake" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
|
||||
void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString);
|
||||
void testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString);
|
||||
|
||||
@DELETE
|
||||
@ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" })
|
||||
|
@ -1,29 +0,0 @@
|
||||
package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@Path("/FakeClassnameTags123")
|
||||
@Api(description = "the FakeClassnameTags123 API")
|
||||
public interface FakeClassnameTags123Api {
|
||||
|
||||
@PATCH
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@ApiOperation(value = "To test class name in snake case", notes = "To test class name in snake case", authorizations = {
|
||||
@Authorization(value = "api_key_query")
|
||||
}, tags={ "fake_classname_tags 123#$%^" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||
Client testClassname(@Valid Client body);
|
||||
}
|
@ -39,10 +39,13 @@ import javax.validation.Valid;
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey);
|
||||
void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId);
|
||||
|
||||
@GET
|
||||
@Path("/findByStatus")
|
||||
|
@ -1,59 +0,0 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.Animal;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
|
||||
|
||||
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AnimalFarm animalFarm = (AnimalFarm) o;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AnimalFarm {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).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(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -1,58 +0,0 @@
|
||||
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 io.swagger.annotations.*;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
|
||||
|
||||
public class StringBooleanMap extends HashMap<String, Boolean> implements Serializable {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
StringBooleanMap stringBooleanMap = (StringBooleanMap) o;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class StringBooleanMap {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).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(java.lang.Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
@ -132,11 +132,14 @@ import javax.validation.Valid;
|
||||
@GET
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
||||
@ApiResponse(code = 404, message = "Not found", response = Void.class)
|
||||
})
|
||||
public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
|
||||
public Response testEnumParameters(@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
||||
|
@ -42,11 +42,14 @@ import javax.validation.Valid;
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets") })
|
||||
}, tags={ "pet" })
|
||||
@io.swagger.annotations.ApiImplicitParams({
|
||||
@io.swagger.annotations.ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class),
|
||||
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class)
|
||||
})
|
||||
public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) {
|
||||
public Response deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
|
||||
|
@ -48,8 +48,6 @@ public interface AnotherFakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/another-fake/dummy",
|
||||
|
@ -57,8 +57,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/create_xml_item",
|
||||
@ -89,8 +87,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/boolean",
|
||||
@ -121,8 +117,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/composite",
|
||||
@ -162,8 +156,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/number",
|
||||
@ -194,8 +186,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Output string", response = String.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/string",
|
||||
@ -225,8 +215,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Success")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/body-with-file-schema",
|
||||
@ -256,8 +244,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Success")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/body-with-query-params",
|
||||
@ -289,8 +275,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/fake",
|
||||
@ -348,8 +332,6 @@ public interface FakeApi {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake",
|
||||
@ -400,8 +382,8 @@ public interface FakeApi {
|
||||
@ApiResponse(code = 404, message = "Not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "enumHeaderStringArray", value = "Header parameter enum test (string array)", dataType = "List<String>", paramType = "header"),
|
||||
@ApiImplicitParam(name = "enumHeaderString", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
|
||||
@ApiImplicitParam(name = "enum_header_string_array", value = "Header parameter enum test (string array)", dataType = "List<String>", paramType = "header"),
|
||||
@ApiImplicitParam(name = "enum_header_string", value = "Header parameter enum test (string)", dataType = "String", paramType = "header")
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
@ -441,8 +423,8 @@ public interface FakeApi {
|
||||
@ApiResponse(code = 400, message = "Someting wrong")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "requiredBooleanGroup", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"),
|
||||
@ApiImplicitParam(name = "booleanGroup", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header")
|
||||
@ApiImplicitParam(name = "required_boolean_group", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"),
|
||||
@ApiImplicitParam(name = "boolean_group", value = "Boolean in group parameters", dataType = "Boolean", paramType = "header")
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
@ -474,8 +456,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/inline-additionalProperties",
|
||||
@ -505,8 +485,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/fake/jsonFormData",
|
||||
@ -541,8 +519,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "Success")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/test-query-parameters"
|
||||
@ -583,8 +559,6 @@ public interface FakeApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/{petId}/uploadImageWithRequiredFile",
|
||||
|
@ -51,8 +51,6 @@ public interface FakeClassnameTestApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PATCH,
|
||||
value = "/fake_classname_test",
|
||||
|
@ -56,8 +56,6 @@ public interface PetApi {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 405, message = "Invalid input")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet",
|
||||
@ -95,7 +93,7 @@ public interface PetApi {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "apiKey", value = "", dataType = "String", paramType = "header")
|
||||
@ApiImplicitParam(name = "api_key", value = "", dataType = "String", paramType = "header")
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
@ -135,8 +133,6 @@ public interface PetApi {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 400, message = "Invalid status value")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/findByStatus",
|
||||
@ -191,8 +187,6 @@ public interface PetApi {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/findByTags",
|
||||
@ -244,8 +238,6 @@ public interface PetApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Pet not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/pet/{petId}",
|
||||
@ -300,8 +292,6 @@ public interface PetApi {
|
||||
@ApiResponse(code = 404, message = "Pet not found"),
|
||||
@ApiResponse(code = 405, message = "Validation exception")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/pet",
|
||||
@ -338,8 +328,6 @@ public interface PetApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 405, message = "Invalid input")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet/{petId}",
|
||||
@ -379,8 +367,6 @@ public interface PetApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/pet/{petId}/uploadImage",
|
||||
|
@ -50,8 +50,6 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Order not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/store/order/{order_id}"
|
||||
@ -84,8 +82,6 @@ public interface StoreApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/store/inventory",
|
||||
@ -120,8 +116,6 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Order not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/store/order/{order_id}",
|
||||
@ -167,8 +161,6 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||
@ApiResponse(code = 400, message = "Invalid Order")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/store/order",
|
||||
|
@ -49,8 +49,6 @@ public interface UserApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user"
|
||||
@ -78,8 +76,6 @@ public interface UserApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithArray"
|
||||
@ -107,8 +103,6 @@ public interface UserApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithList"
|
||||
@ -139,8 +133,6 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/user/{username}"
|
||||
@ -173,8 +165,6 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/{username}",
|
||||
@ -221,8 +211,6 @@ public interface UserApi {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||
@ApiResponse(code = 400, message = "Invalid username/password supplied")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/login",
|
||||
@ -251,8 +239,6 @@ public interface UserApi {
|
||||
@ApiResponses({
|
||||
@ApiResponse(code = 200, message = "successful operation")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/logout"
|
||||
@ -284,8 +270,6 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found")
|
||||
})
|
||||
@ApiImplicitParams({
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/user/{username}"
|
||||
|
@ -1,85 +0,0 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Must be named `File` for test.
|
||||
*/
|
||||
@ApiModel(description = "Must be named `File` for test.")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ModelFile {
|
||||
@JsonProperty("sourceURI")
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile sourceURI(String sourceURI) {
|
||||
this.sourceURI = sourceURI;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @return sourceURI
|
||||
*/
|
||||
@ApiModelProperty(value = "Test capitalization")
|
||||
|
||||
|
||||
public String getSourceURI() {
|
||||
return sourceURI;
|
||||
}
|
||||
|
||||
public void setSourceURI(String sourceURI) {
|
||||
this.sourceURI = sourceURI;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ModelFile _file = (ModelFile) o;
|
||||
return Objects.equals(this.sourceURI, _file.sourceURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(sourceURI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelFile {\n");
|
||||
|
||||
sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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 ");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user