Chrimle / openapi-to-java-records-mustache-templates

Generate Java Records from OpenAPI Specifications
https://chrimle.github.io/openapi-to-java-records-mustache-templates/
Apache License 2.0
3 stars 0 forks source link

Generated inner `enum` classes cannot be annotated with `@Deprecated` #186

Open Chrimle opened 1 month ago

Chrimle commented 1 month ago

Describe the bug Inner enum classes are not annotated as deprecated. This is due to openapi-generator-maven-plugin. This problem was discovered as part of #185

To Reproduce Given an OpenAPI Spec:

    RecordWithInnerEnums:
      type: object
      description: Example of a Record with inner enum classes
      properties:
        exampleInner:
          type: string
          description: Example of an inner enum class
          enum:
            - ENUM1
            - ENUM2
            - ENUM3
        exampleInnerTwo:
          type: string
          deprecated: true
          description: Example of another inner enum class
          enum:
            - ENUM1
            - ENUM2
            - ENUM3

The exampleInnerTwo enum class will not be annotated deprecated.

Expected behavior Inner enum classes should be annotated correctly...

Chrimle commented 3 weeks ago

Now I wonder, with #204 , is it possible to comment @deprecated?