Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Unable to parse integers found in enums in unqork open api spec #2277

Closed
upgradingdave opened this issue Mar 29, 2024 · 0 comments · Fixed by #2278
Closed

Unable to parse integers found in enums in unqork open api spec #2277

upgradingdave opened this issue Mar 29, 2024 · 0 comments · Fixed by #2278
Assignees
Labels
kind:bug Something isn't working

Comments

@upgradingdave
Copy link
Contributor

Describe the Bug

When trying to parse Unqork's open api spec, the following error is thrown:

Generation failed: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')

Steps to Reproduce

  1. Run this:
congen -e ServiceTask -e IntermediateThrowEvent generate openapi-outbound https://developers.unqork.io/api/1.0/openapi.yml
  1. An exception is thrown because the choice variables refrenced on this line here are expected to be Strings. However, in Unqork open api spec, line 5709 has a definition like this:
    SubmissionSortOrder:
      name: sortOrder
      in: query
      description: Order of sort, if `sortBy` is specified.  One of [`1` (ascending),`-1` (descending)]
      required: false
      schema:
        type: integer
        enum:
          - 1
          - -1
        default: 1

The 1 and -1 are Integers and that's what causes the type cast exception

Expected Behavior

No error should be thrown and a valid json element template to be output.

Environment

  • OS: MacOS Monterey (12.6.3)
  • Library version: 8.5.0-SNAPSHOT
  • Camunda version: N/A
@upgradingdave upgradingdave added the kind:bug Something isn't working label Mar 29, 2024
@upgradingdave upgradingdave mentioned this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants