Generator Config#
The configuration offers more advance options to further tail the output to your needs, like naming conventions and substitutions.
Warning
Since v21.12 the aliases were replaced by the substitutions config which is a more flexible search and replace process with support for regular expressions.
During initialization aliases will be migrated to substitutions and the config will be automatically updated, but you should also verify you still get the desired output.
Initializing configuration file .xsdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns="http://pypi.org/project/xsdata" version="24.1">
<Output maxLineLength="79" subscriptableTypes="false" unionType="false">
<Package>generated</Package>
<Format repr="true" eq="true" order="false" unsafeHash="false" frozen="false" slots="false" kwOnly="false">dataclasses</Format>
<Structure>filenames</Structure>
<DocstringStyle>reStructuredText</DocstringStyle>
<FilterStrategy>allGlobals</FilterStrategy>
<RelativeImports>false</RelativeImports>
<CompoundFields defaultName="choice" useSubstitutionGroups="false" forceDefaultName="false" maxNameParts="3">false</CompoundFields>
<PostponedAnnotations>false</PostponedAnnotations>
<UnnestClasses>false</UnnestClasses>
<IgnorePatterns>false</IgnorePatterns>
<IncludeHeader>false</IncludeHeader>
</Output>
<Conventions>
<ClassName case="pascalCase" safePrefix="type"/>
<FieldName case="snakeCase" safePrefix="value"/>
<ConstantName case="screamingSnakeCase" safePrefix="value"/>
<ModuleName case="snakeCase" safePrefix="mod"/>
<PackageName case="snakeCase" safePrefix="pkg"/>
</Conventions>
<Substitutions>
<Substitution type="package" search="http://www.w3.org/2001/XMLSchema" replace="xs"/>
<Substitution type="package" search="http://www.w3.org/XML/1998/namespace" replace="xml"/>
<Substitution type="package" search="http://www.w3.org/2001/XMLSchema-instance" replace="xsi"/>
<Substitution type="package" search="http://www.w3.org/1998/Math/MathML" replace="mathml3"/>
<Substitution type="package" search="http://www.w3.org/1999/xlink" replace="xlink"/>
<Substitution type="package" search="http://www.w3.org/1999/xhtml" replace="xhtml"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/wsdl/soap/" replace="soap"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/wsdl/soap12/" replace="soap12"/>
<Substitution type="package" search="http://schemas.xmlsoap.org/soap/envelope/" replace="soapenv"/>
<Substitution type="class" search="(.*)Class$" replace="\1Type"/>
</Substitutions>
<Extensions/>
</Config>
Generator configuration model representation. |
|
Generator output model representation. |
|
Output format model representation. |
|
Generator naming conventions model representation. |
|
Generator substitutions model representation. |
|
Generator extensions model representation. |
|
Output structure style enumeration. |
|
Docstring style enumeration. |
|
Class filter strategy enumeration. |
|
Compound fields model representation. |
|
Object type enumeration. |
|
Extension type enumeration. |
|
Generator substitution model representation. |
|
Generator extension model representation. |
|
Name convention model representation. |
|
Naming case convention enumeration. |