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.
<?xml version="1.0" encoding="UTF-8"?>
<Config xmlns="http://pypi.org/project/xsdata" version="22.12">
<Output maxLineLength="79">
<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" forceDefaultName="false">false</CompoundFields>
<PostponedAnnotations>false</PostponedAnnotations>
<UnnestClasses>false</UnnestClasses>
<IgnorePatterns>false</IgnorePatterns>
</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="Type"/>
</Substitutions>
</Config>
Generator configuration binding model. |
|
Main generator output options. |
|
Output format options. |
|
Generator global naming conventions. |
|
Generator search and replace substitutions for classes, fields, packages and modules names. |
|
Code writer output structure strategies. |
|
Code writer docstring styles. |
|
Class filter strategy. |
|
Compound fields options. |
|
Object type enumeration. |
|
Search and replace substitution for a specific target type based on |
|
Name convention model. |
|
Code writer naming schemes. |