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

ignoreAnyOfInEnum flag is not working properly. #11565

Open
janankit20 opened this issue Feb 10, 2022 · 0 comments
Open

ignoreAnyOfInEnum flag is not working properly. #11565

janankit20 opened this issue Feb 10, 2022 · 0 comments

Comments

@janankit20
Copy link

3GPP R15 has defined a set of standards in the form of OpenAPI Yamls.
This yamls contains enum along with AnyOf.

Currently open api generator is not generating models correctly for ENUM along with AnyOF

RequestTrigger:
  anyOf:
  - type: string
    enum:
      - LOC_CH
      - PRA_CH
      - SERV_AREA_CH
      - RFSP_CH
      - ALLOWED_NSSAI_CH
      - UE_AMBR_CH

I checked it on internet and found out two solution :

  1. [https://github.com/Java enums are not generated correctly with anyOf #798]
    Where we can delete anyof and run the maven build again.
    But we cannot change the YAML , as its of standard.

  2. [https://github.com/[REQ][Java] support anyOf Enum #4491]
    Here I see, Jason submitted some code where he added new configuration ignoreAnyOfInEnum ( and making its use in AbstractJavaCodeGen Class ) to ignore the AnyOf Tag.

    But This flag is also not working.
    Seems reasons for that is , ignoreAnyOfInEnum config is not getting set in GeneratorSettings.java like other config properties we do.

Please help , stuck.

@wing328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant