raml-java-client-generator icon indicating copy to clipboard operation
raml-java-client-generator copied to clipboard

Support for Enums

Open mschink opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. It looks like my RAML 1.0 spec is getting ignored on declarations like:

#%RAML 1.0 DataType
displayName: Citizenship Type
description: Applicant's citizenship information.
type: object
additionalProperties: false
properties:
  type:
    type: string
    enum: [CADN, DIPL, INTD, LIMM, MIPE, PERM, REFG, STUV, UNKN, VIST, WRKP]
    description: Visa type code
    example: "STUV"

The generated class Visa has no enums.

Describe the solution you'd like The generated class Visa should have a public class called TypeEnum with the enumerated values of the types declared in the RAML.

Describe alternatives you've considered For now, I'm able to work around it, but the Enum support would be fantastic, since the RAML specs defines that the values MUST match with one of the enum values to be valid.

mschink avatar Feb 21 '23 23:02 mschink