Skip to content

Invalid enum and variable names #21

@markok314

Description

@markok314

When generating Kotlin classes from the following schema:
https://edavki.durs.si/Documents/Schemas/Doh_KDVP_9.xsd

I encountered the following issues:

  1. TypeInventoryEnum.Unknown is used but not generated, which causes syntax error.
  2. This seems to be Jackson related, but can also be 'fixed' here: If variable has name with inverse case, for example kDVP, it is serialized to lowercase XML tag 'kdvp' regardless of property localname='KDVP'. Solution: rename var in generated code to lower case ('kdvp'). Note: It seems that XML tag is serialized as lowercase by Jackson if the first letter of var name is lower case, and the second is upper case. The rest is not important.
  3. @JsonPropertyOrder annotation is missing for sequences of XML elements to preserve element order on

serialization.
4. Property @JacksonXmlProperty(namespace=...) is not generated for elements with namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions