SAService Architect Back to designer
SAService ArchitectDocumentation
Python DSL reference project.validate() | project.to_yaml()

Validation and YAML output

Validate the composed object graph and serialize symbolic references into the canonical YAML contract.

When to use

Run validation in development and CI; emit YAML when the topology must be stored or consumed by other Service Architect tooling.

Behavior

  • validate() returns diagnostics rather than throwing for ordinary schema and capability findings.
  • to_yaml() preserves declaration order and emits readable symbolic keys instead of numeric designer IDs.
  • References to types, streams, endpoints, modules, and pools are derived from their objects.
  • LOCAL_MODULE is represented by explicit YAML null where the symbolic YAML contract requires it.

Validation result properties

Diagnostic fields align with ServiceGen validation families.

PropertyTypeDescription
codestring

Stable SG_* diagnostic code.

stagestring

Parse, schema, semantic, capability, or related stage.

messagestring

Human-readable explanation.

path/detailsmetadata

Location and structured context for tooling.

Python example

diagnostics = project.validate()
if diagnostics:
    for diagnostic in diagnostics:
        print(diagnostic)
else:
    Path("architecture.yaml").write_text(project.to_yaml())