Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/samples-java-server-jdk8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ on:
- 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**'
# test in circleci instead
- 'samples/server/petstore/java-undertow/**'
pull_request:
paths:
#- 'samples/server/petstore/java-camel/**'
- 'samples/server/petstore/java-vertx-web/**'
- 'samples/server/petstore/java-inflector/**'
- 'samples/server/petstore/java-pkmst/**'
- 'samples/server/petstore/java-undertow/**'
#- 'samples/server/petstore/java-undertow/**'
jobs:
build:
name: Build Java Server
Expand All @@ -29,7 +30,7 @@ jobs:
- samples/server/petstore/java-vertx-web/
- samples/server/petstore/java-inflector/
- samples/server/petstore/java-pkmst/
- samples/server/petstore/java-undertow/
#- samples/server/petstore/java-undertow/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: java-undertow-server
outputDir: samples/server/petstore/java-undertow
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/java-undertow-server
additionalProperties:
hideGenerationTimestamp: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<version.logback>1.2.0</version.logback>
<version.junit>4.13.2</version.junit>
<version.mockito>2.1.0-beta.124</version.mockito>
<version.undertow>2.2.24.Final</version.undertow>
<version.undertow>2.3.5.Final</version.undertow>
<version.jsonpath>2.2.0</version.jsonpath>
<version.httpclient>4.5.13</version.httpclient>
<version.httpasyncclient>4.1.2</version.httpasyncclient>
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,8 @@
<module>samples/client/petstore/java/resteasy</module>
<module>samples/client/petstore/java-micronaut-client</module>
<module>samples/client/petstore/java/apache-httpclient</module>
<!-- server -->
<module>samples/server/petstore/java-undertow</module>
</modules>
</profile>
<!-- test with Haskell -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<version.framework>0.1.1</version.framework>
<version.jackson>2.14.1</version.jackson>
<version.httpasyncclient>4.1.2</version.httpasyncclient>
<version.undertow>2.2.24.Final</version.undertow>
<version.undertow>2.3.5.Final</version.undertow>
<version.slf4j>1.7.21</version.slf4j>
<version.jackson.databind>2.14.1</version.jackson.databind>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/java-undertow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<version.logback>1.2.0</version.logback>
<version.junit>4.13.2</version.junit>
<version.mockito>2.1.0-beta.124</version.mockito>
<version.undertow>2.2.24.Final</version.undertow>
<version.undertow>2.3.5.Final</version.undertow>
<version.jsonpath>2.2.0</version.jsonpath>
<version.httpclient>4.5.13</version.httpclient>
<version.httpasyncclient>4.1.2</version.httpasyncclient>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public interface PathHandlerInterface {
/**
* <p>Add a new pet to the store</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/pet" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand All @@ -30,9 +32,12 @@ public interface PathHandlerInterface {
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}, {isXml=true, mediaType=application/xml}]</p>
* <p><b>Payload</b>: {@link Pet} (<i>required: true</i>)</p>
*
* <p><b>Produces</b>: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]</p>
* <p><b>Returns</b>: {@link Pet}</p>
*
* <p><b>Responses</b>:</p>
* <ul>
* <li><b>200 (success)</b>: successful operation</li>
* <li><b>405 (client error)</b>: Invalid input</li>
* </ul>
*/
Expand All @@ -42,6 +47,8 @@ public interface PathHandlerInterface {
/**
* <p>Deletes a pet</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#DELETE DELETE} "/v2/pet/{petId}" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand Down Expand Up @@ -175,6 +182,8 @@ public interface PathHandlerInterface {
/**
* <p>Update an existing pet</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#PUT PUT} "/v2/pet" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand All @@ -184,9 +193,12 @@ public interface PathHandlerInterface {
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}, {isXml=true, mediaType=application/xml}]</p>
* <p><b>Payload</b>: {@link Pet} (<i>required: true</i>)</p>
*
* <p><b>Produces</b>: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]</p>
* <p><b>Returns</b>: {@link Pet}</p>
*
* <p><b>Responses</b>:</p>
* <ul>
* <li><b>200 (success)</b>: successful operation</li>
* <li><b>400 (client error)</b>: Invalid ID supplied</li>
* <li><b>404 (client error)</b>: Pet not found</li>
* <li><b>405 (client error)</b>: Validation exception</li>
Expand All @@ -198,6 +210,8 @@ public interface PathHandlerInterface {
/**
* <p>Updates a pet in the store with form data</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/pet/{petId}" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand Down Expand Up @@ -245,6 +259,8 @@ public interface PathHandlerInterface {
/**
* <p>uploads an image</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/pet/{petId}/uploadImage" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand Down Expand Up @@ -375,12 +391,17 @@ public interface PathHandlerInterface {
/**
* <p>Place an order for a pet</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/store/order" (<i>privileged: false</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
* </ul>
*
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}]</p>
* <p><b>Payload</b>: {@link Order} (<i>required: true</i>)</p>
*
* <p><b>Produces</b>: [{isXml=true, mediaType=application/xml}, {isJson=true, mediaType=application/json}]</p>
* <p><b>Returns</b>: {@link Order}</p>
*
Expand All @@ -398,12 +419,15 @@ public interface PathHandlerInterface {
*
* <p>This can only be done by the logged in user.</p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user" (<i>privileged: false</i>)</p>
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
* </ul>
*
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}]</p>
* <p><b>Payload</b>: {@link User} (<i>required: true</i>)</p>
*
*
* <p><b>Responses</b>:</p>
* <ul>
Expand All @@ -416,12 +440,17 @@ public interface PathHandlerInterface {
/**
* <p>Creates list of users with given input array</p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user/createWithArray" (<i>privileged: false</i>)</p>
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user/createWithArray" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
* </ul>
*
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}]</p>
* <p><b>Payload</b>: {@link java.util.List List} of {@link User} (<i>required: true</i>)</p>
*
*
* <p><b>Responses</b>:</p>
* <ul>
Expand All @@ -434,12 +463,17 @@ public interface PathHandlerInterface {
/**
* <p>Creates list of users with given input array</p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user/createWithList" (<i>privileged: false</i>)</p>
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#POST POST} "/v2/user/createWithList" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
* </ul>
*
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}]</p>
* <p><b>Payload</b>: {@link java.util.List List} of {@link User} (<i>required: true</i>)</p>
*
*
* <p><b>Responses</b>:</p>
* <ul>
Expand All @@ -454,7 +488,7 @@ public interface PathHandlerInterface {
*
* <p>This can only be done by the logged in user.</p>
*
* <p><b>Endpoint</b>: {@link Methods#DELETE DELETE} "/v2/user/{username}" (<i>privileged: false</i>)</p>
* <p><b>Endpoint</b>: {@link Methods#DELETE DELETE} "/v2/user/{username}" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
Expand Down Expand Up @@ -482,6 +516,8 @@ public interface PathHandlerInterface {
/**
* <p>Get user by user name</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#GET GET} "/v2/user/{username}" (<i>privileged: false</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand Down Expand Up @@ -513,6 +549,8 @@ public interface PathHandlerInterface {
/**
* <p>Logs user into the system</p>
*
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#GET GET} "/v2/user/login" (<i>privileged: false</i>)</p>
*
* <p><b>Request parameters</b>:</p>
Expand All @@ -536,7 +574,10 @@ public interface PathHandlerInterface {
* </p>
* </li>
* </ul>
* <p><b>Response headers</b>: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
* <p><b>Response headers</b>: [CodegenProperty{openApiType='string', baseName='Set-Cookie', complexType='null', getter='getSetCookie', setter='setSetCookie', description='Cookie authentication key for use with the `api_key` apiKey authentication.', dataType='String', datatypeWithEnum='String', dataFormat='null', name='setCookie', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.Set-Cookie;', baseType='String', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='Cookie authentication key for use with the `api_key` apiKey authentication.', maxLength=null, minLength=null, pattern='null', example='AUTH_KEY=abcde12345; Path=/; HttpOnly', jsonSchema='{
"type" : "string",
"example" : "AUTH_KEY=abcde12345; Path=/; HttpOnly"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='SetCookie', nameInSnakeCase='SET_COOKIE', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"type" : "integer",
"format" : "int32"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', containerTypeMapped='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
Expand All @@ -559,7 +600,9 @@ public interface PathHandlerInterface {
/**
* <p>Logs out current logged in user session</p>
*
* <p><b>Endpoint</b>: {@link Methods#GET GET} "/v2/user/logout" (<i>privileged: false</i>)</p>
* <p></p>
*
* <p><b>Endpoint</b>: {@link Methods#GET GET} "/v2/user/logout" (<i>privileged: true</i>)</p>
*
*
* <p><b>Responses</b>:</p>
Expand All @@ -575,7 +618,7 @@ public interface PathHandlerInterface {
*
* <p>This can only be done by the logged in user.</p>
*
* <p><b>Endpoint</b>: {@link Methods#PUT PUT} "/v2/user/{username}" (<i>privileged: false</i>)</p>
* <p><b>Endpoint</b>: {@link Methods#PUT PUT} "/v2/user/{username}" (<i>privileged: true</i>)</p>
*
* <p><b>Request parameters</b>:</p>
* <ul>
Expand All @@ -590,6 +633,9 @@ public interface PathHandlerInterface {
* </li>
* </ul>
*
* <p><b>Consumes</b>: [{isJson=true, mediaType=application/json}]</p>
* <p><b>Payload</b>: {@link User} (<i>required: true</i>)</p>
*
*
* <p><b>Responses</b>:</p>
* <ul>
Expand Down
Loading