Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tefra committed Jun 3, 2021
1 parent b5d74ec commit 284e682
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions docs/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ by the schema location they are defined. This works well for schemas that avoid
imports. If you get import errors you should try one of the alternative structure
styles.

**clusters**

This style will identify the strongly connected classes and will group them together,
creating as many modules as possible. The modules are named after the the main class
of the group.

.. code-block:: console
$ xsdata schema.xsd --package models --structure-style clusters
.. versionadded:: 20.7


**namespaces**

Expand Down
2 changes: 2 additions & 0 deletions xsdata/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ def download(source: str, output: str):
"\n\n"
"namespaces: group classes by the target namespace"
"\n\n"
"clusters: group by strong connected dependencies"
"\n\n"
"single-package: group all classes together"
),
default="filenames",
Expand Down
5 changes: 3 additions & 2 deletions xsdata/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ class StructureStyle(Enum):
:cvar FILENAMES: filenames
:cvar NAMESPACES: namespaces
:cvar SINGLE_PACKAGE: package
:cvar CLUSTERS: clusters
:cvar SINGLE_PACKAGE: single-package
"""

FILENAMES = "filenames"
NAMESPACES = "namespaces"
SINGLE_PACKAGE = "single-package"
CLUSTERS = "clusters"
SINGLE_PACKAGE = "single-package"


class NameCase(Enum):
Expand Down

0 comments on commit 284e682

Please sign in to comment.