Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

jaxrs-cxf-cdi: fix outer enum #131

Merged
merged 3 commits into from
May 22, 2018

Conversation

jmini
Copy link
Member

@jmini jmini commented May 22, 2018

With the jaxrs-cxf-cdi generator, this PR fixes the outer-class enum case.
This is similar to other JaxRS generators.

Example OAS3:

openapi: 3.0.1
info:
  title: ping test
  version: '1.0'
servers:
  - url: 'http://localhost:8000/'
paths:
  /ping:
    get:
      operationId: pingGet
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjWithEnums'

components:
  schemas:
    ObjWithEnums:
      type: object
      properties:
        SProp:
            $ref: "#/components/schemas/StringEnum"

    StringEnum:
      type: string
      enum:
        - "c"
        - "b"
        - "a"

@jmini jmini force-pushed the fix_enum_jaxrs-cxf-cdi branch from 461bd78 to aaca3b2 Compare May 22, 2018 20:53
Copy link
Member

@jimschubert jimschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@@ -27,6 +27,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@"
ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this bug. I should have used a regex back to ags. At least it exposed the Langs exit code issue.

@jimschubert
Copy link
Member

Merging, as CircleCI failure appears to be a flaky download.

@jimschubert jimschubert merged commit b73ab02 into OpenAPITools:master May 22, 2018
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request May 23, 2018
* master: (36 commits)
  jaxrs-cxf-cdi: fix outer enum (OpenAPITools#131)
  Move bash argv opt to end of ags line in scripts (OpenAPITools#124)
  Reduce CI logging (OpenAPITools#119)
  Download elm dependencies without prompting user. (OpenAPITools#118)
  [aspnetcore] Make the use of Swashbuckle optional (OpenAPITools#110)
  DefaultGenerator: fix NullPointerException (OpenAPITools#109)
  [Java] use html entities in javadoc of generated code (OpenAPITools#106)
  Update PULL_REQUEST_TEMPLATE.md
  [java] Enum in array of array (OpenAPITools#66)
  Rename datatype to dataType in CodegenProperty (OpenAPITools#69)
  update elm test to compile all elm files (OpenAPITools#95)
  Fix Petstore example for Elm (OpenAPITools#96)
  Update Docker documentation (OpenAPITools#97)
  CaseFormatLambda has been added, params for Rest-assured client has been refactored (OpenAPITools#91)
  Update integration.md
  [Clojure] Add util method to set the api-context globally (OpenAPITools#93)
  [JaxRS-Java] issue with implFolder on windows, and required fields generation for containers (OpenAPITools#88)
  Set parameters allowableValues dynamically (OpenAPITools#65)
  Meta: set version for "build-helper-maven-plugin" (OpenAPITools#89)
  Fix javadoc issues in "openapi-generator" module (OpenAPITools#84)
  ...
@jmini jmini deleted the fix_enum_jaxrs-cxf-cdi branch May 23, 2018 03:38
@wing328 wing328 added this to the 3.0.1 milestone Jun 17, 2018
nilskuhn pushed a commit to nilskuhn/openapi-generator that referenced this pull request Apr 6, 2023
…mantic-release-vulnerability

chore(deps): update dependency semantic-release to v17.2.3 [security]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants