SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation graph references -> user-named Module

Modules, contracts and descriptors

The graph materializes shared types, public functions and transport definitions inside Modules explicitly created and named by the user.

When to use

Use this reference when generating, reviewing or operating a Service Architect project.

Behavior

  • Module.name is the exact local directory; model is only an example name chosen by a project author.
  • A public Type selects its destination through Type.module and adds shared type/serde output to that Module.
  • An HTTP DataConnector selects its schema owner through DataConnector.module and adds OpenAPI sources and bindings.
  • A gRPC DataConnector selects its schema owner through DataConnector.module and adds protobuf sources, descriptors and bindings.
  • Public stream or endpoint functions select a Module through functionModule.
  • One Module may contain more than one kind of generated artifact when graph references require it.
  • Each Module has its own dependency manifest and Makefile so it can be published and tested independently.

Contract and model assets

Files generated for schema ownership and publication.

PathPurposeDescription
<Module.name>/User-selected module

Exact directory named in the Module editor. Contents are driven by references to this Module.

<Module.name>/proto/<normalize(Connector.name)>/Protobuf source

Created when a gRPC connector selects this Module.

descriptors/<connector-derived-name>.protosetProtobuf descriptor

Compiled descriptor set generated from the selected gRPC connector schema.

<Module.name>/openapi/<normalize(Connector.name)>/OpenAPI source

Created when an HTTP connector selects this Module.

<Module.name>/{pkg,src,include}/generatedGenerated bindings

Target-language location for schema output.

<Module.name>/{pkg,src,include}/typesPublic types

Created when public types reference this Module through Type.module.

generate-*.generated.shGenerated tool entrypoint

Runs the pinned schema generator for a disposable standalone Module.

go.mod, Cargo.toml, package.json, CMakeLists.txtPackage manifest

Makes the user-defined Module independently consumable.

Dockerfile.generatedPackage verification

Builds an independent TypeScript Module in Docker.

README.md + MakefilePreserved entrypoints

Human Module overview and stable command surface.

User-defined module flow

modules:
  commerce_contracts:
    name: commerce_contracts
    modulePath: github.com/acme/commerce-contracts
dataConnectors:
  publicOrders:
    name: "Public Orders API"
    type: HTTP
    module: commerce_contracts
# Output: commerce_contracts/openapi/publicordersapi/...