What OpenAPI owns
OpenAPI is the authority for:- HTTP methods and paths;
- request body presence, media types, and schemas;
- response statuses, media types, and schemas;
- public examples and tags;
- callback and top-level webhook wire contracts; and
operationId, when a provider wants HCL to target an operation.
What HCL adds
HCL can:- select a status already declared by the operation;
- publish exact, schema-checked named outcomes;
- select outcomes from public request values;
- group outcomes into opaque test scenarios;
- map Simile’s protocol-error categories to declared service responses; and
- declare backends, transactional consequences, and post-response work;
- attach one or more webhook occurrences to a committed effect; and
- supply a minimal webhook contract only when the public API source omits it.
operationId, which is why an operation needs an ID only when
HCL refers to it.
A minimal overlay
Suppose OpenAPI already declaresPOST /orders, operationId: createOrder, and a 201 response.
The provider can choose that response and declare observable follow-up work:
createOrder exists, 201 is declared, and the backend reference
resolves. behavior selects the public HTTP result, effect owns its synchronous consequences,
and async owns work dispatched outside the response-critical path. The service supervisor applies
this compiled plan without reopening HCL.
Exact outcomes without private rules
OpenAPI examples are the lowest-maintenance source of exact output. If a reusable failure family or scenario needs more control, HCL can provide a body that is checked against the selected OpenAPI response schema:Why not put everything in HCL
A second full API language would create drift. Providers would have to maintain methods, paths, schemas, and examples twice, while ordinary OpenAPI tooling could not see the emulator’s contract. Keeping HCL additive makes source ownership clear and allows OpenAPI-only services to remain first-class. The same boundary applies to webhooks. OpenAPI owns a reusable outbound method and payload schema. HCL owns when an operation emits that message, how its body is projected from public request or response data, and any explicit causal dependencies between sibling occurrences. See Webhook delivery for the complete model. The complete block grammar, value types, defaults, and name-resolution rules are defined in the Simile HCL language specification. Use the HCL glossary when a term such as outcome, scenario, fault, or effect needs a precise definition. When ordinary OpenAPI Schema cannot express a public relationship between fields, Simile provides the executablex-simile-constraints extension. See the
OpenAPI extension reference for its clause glossary and authoring rules.
Why not infer behavior from route names
POST /orders suggests creation to a human, but it does not prove what is stored, what identity is
assigned, or what happens later. Simile refuses to turn naming conventions into state or effect
semantics. Approximation is permitted only in bounded payload generation heuristics, where it is
reported and never becomes a validation rule.
Continue with Outcome fidelity for response selection or
Dependencies and effects for backend declarations.