config

Project configuration loading and normalization.

exception django_angular3.config.ConfigError[source]

Bases: ValueError

Raised when the project configuration is invalid.

class django_angular3.config.ProjectConfig(config_path: 'Path', project_name: 'str', openapi_source: 'Path', ui_source: 'Path', angular_output: 'Path', openapi_generator_config: 'Path | None' = None, ng_openapi_gen_config: 'Path | None' = None)[source]

Bases: object

Parameters:
  • config_path (Path)

  • project_name (str)

  • openapi_source (Path)

  • ui_source (Path)

  • angular_output (Path)

  • openapi_generator_config (Path | None)

  • ng_openapi_gen_config (Path | None)

angular_output: Path
config_path: Path
ng_openapi_gen_config: Path | None = None
openapi_generator_config: Path | None = None
openapi_source: Path
project_name: str
ui_source: Path
django_angular3.config.get_previous_schema_path(source)[source]

Return the conventional path for the previous schema artifact.

The previous schema is stored alongside the current schema with .previous inserted before the file extension. For example:

spec/openapi/source/api.json  →  spec/openapi/source/api.previous.json

This path is written by export_schema before the current schema is overwritten, and consumed by build_app for change detection.

Parameters:

source (Path)

Return type:

Path

django_angular3.config.load_project_config(path)[source]
Parameters:

path (str | Path)

Return type:

ProjectConfig