Gerated names should match XSD names
See original GitHub issueWhen processing my XSD, which contains types like
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns="http://deuta.de/config/DeutaMsgDatabase"
xmlns:d="http://deuta.de/config/DeutaMsgDatabase"
targetNamespace="http://deuta.de/config/DeutaMsgDatabase">
<xs:element name="MessageDB" type="TMessageDB">
...
</xs:element>
<xs:complexType name="TMessageDB">
...
</xs:complexType>
i would have expected to have the xsdata class to be named TMessageDB
, but it actually is TmessageDB
.
Since i am trying to migrate away from another mapping tool which did not do this (pyxb), this would require a lot of API breakage on the client code, since that depends on the generated types a lot.
Is there an option to prevent that mapping to occur?
Regards
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Classes Generated with XSD.exe Custom Class Names
As far as I'm aware I don't think this is possible, the class names match almost exactly to whats in the schema. Personally...
Read more >W3C XML Schema Definition Language (XSD) 1.1 Part 2
[Definition:] match. (Of strings or names:) Two strings or names being compared must be identical. Characters with multiple possible ...
Read more >Defining common standard elements and types in generated ...
xmlElementName, Specifies the value of the element name from the common schema that should be referred to from the enclosing WSDL or XSD....
Read more >XML Schema Definition (XSD) Structure - Support
In order for GenRocket to import, parse an XSD and convert its ... The value of the element.name parameter does not have to...
Read more >Chapter 17 Binding between XML Schema and Java Classes
JAXB supports the grouping of generated classes in Java packages. A package consists of the following: A Java class name that is derived...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks good! Mixed case is the one i will be using most probably… 8.>
Maybe you should extend the name mapping table a bit to make more clear what happens with names like
I will go with
mixedSnakeCase
instead ofmixedUnderscoreCase