Note: I'm only interested in TypeScript, so I didn't test any other languages.
When generating code for TS and there's an enum type (enumeration) it could have illegal characters, such as ".". Those should be replaced by underscore. It doesn't matter because the type uses the exact string as the value of each constant. So the name doesn't really matter as long as it's always generated the same way.
Here's an example of how it would be done using JAX:
@XmlType(name = "exampleEnumType")
@XmlEnum
public enum ExampleEnumType{
@XmlEnumValue("FOO.BAR")
FOO_BAR("FOO.BAR"),
...
Steps to reproduce the issue:
Use XSD that has enumeration with characters that are illegal in TS (i.e. EcmaScript)
Description
Note: I'm only interested in TypeScript, so I didn't test any other languages.
When generating code for TS and there's an enum type (enumeration) it could have illegal characters, such as ".". Those should be replaced by underscore. It doesn't matter because the type uses the exact string as the value of each constant. So the name doesn't really matter as long as it's always generated the same way. Here's an example of how it would be done using JAX:
Steps to reproduce the issue:
xgen -l TypeScript -i ".\foo.xsd" -o "foo"
You can use this as an example: https://share.ech.ch/xmlns/eCH-0196/2/eCH-0196-2-0.xsd The enum
SecurityTypeType
is the problem.Describe the results you received:
Constant names with ".".
Describe the results you expected:
Constant names with "_" instead of ".".
Output of
go version
:xgen version or commit ID:
Environment details (OS, physical, etc.):
Doesn't matter.