SAService Architect Back to designer
SAService ArchitectDocumentation
Python DSL reference yaml_to_api_document(source)

Designer API JSON

Convert symbolic YAML into the flat JSON model sent by the designer to the code-generation API.

When to use

Use this for API integration, payload inspection, or tooling that must reproduce fromYaml(...).toJSON() from the designer.

Behavior

  • Accepts a YAML string, YAML file path, or parsed Mapping.
  • Flattens services, streams, connectors, endpoints, links, types, pools, and modules into separate arrays.
  • Assigns deterministic numeric IDs by declaration order and resolves symbolic references in a second pass.
  • Converts designer enum names to their numeric API constants.
  • Fields represented by the Python explicit-null marker are omitted instead of being sent as JSON null.

Flat API collections properties

Top-level fields produced by the converter.

PropertyTypeDescription
settingsobject

Project settings.

services / streams / linksarrays

Execution graph with numeric references.

dataConnectors / endpointsarrays

Integrations with connector and endpoint IDs.

types / pools / modulesarrays

Shared declarations.

Python example

from sa_dsl import yaml_to_api_document

payload = yaml_to_api_document("architecture.yaml")
assert isinstance(payload["services"], list)
assert isinstance(payload["streams"], list)