> ## Documentation Index
> Fetch the complete documentation index at: https://os.inttegro.dev/simile/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> An overview of the executable contract vocabulary Simile adds to OpenAPI.

OpenAPI describes individual fields well, but many valid service payloads depend on relationships
between fields. Simile adds `x-simile-constraints` for relationships inside one payload and
`x-simile-from-request` for public relationships between an operation's request and response.

For example, OpenAPI can require `created_at` and `updated_at` to be RFC 3339 timestamps. The Simile
extension can additionally require them to appear in chronological order:

```yaml theme={null}
type: object
required: [created_at, updated_at]
properties:
  created_at: { type: string, format: date-time }
  updated_at: { type: string, format: date-time }
x-simile-constraints:
  - ordered:
      paths: [/created_at, /updated_at]
```

The result is executable contract rather than descriptive metadata. Simile compiles each clause for
two jobs:

* **proof** — reject an incoming request or generated response that violates the relationship;
* **construction** — establish the relationship while synthesizing a request or response.

Invalid paths, incompatible types, contradictory clauses, and unsupported operators fail service
compilation. Simile never silently ignores a constraint it cannot execute.

## Extension map

| Topic | What it covers | Reference |
| - | - | - |
| `x-simile-from-request` | Preserved inputs, derived response values, reachable states, and ineligible optional data | [`x-simile-from-request`](https://os.inttegro.dev/simile/request-response-relations) |
| `x-simile-constraints` | Executable relationships among values inside one payload | [`x-simile-constraints`](https://os.inttegro.dev/simile/x-simile-constraints) |
| Mechanics | Placement, JSON Pointers, selectors, predicates, guards, and authoring rules | [Constraint mechanics](https://os.inttegro.dev/simile/constraint-mechanics.md) |
| Value relationships | Ordering, bounds, equality, distinct values, and scalar-set relationships | [Value relationships](https://os.inttegro.dev/simile/constraint-value-relationships.md) |
| Conditional and derived values | Implications, arithmetic equations, and collection aggregates | [Conditional and derived values](https://os.inttegro.dev/simile/constraint-conditional-derived.md) |
| Stateful and rendered values | Finite lifecycle paths and strings rendered from fields | [Lifecycles and templates](https://os.inttegro.dev/simile/constraint-lifecycle-template.md) |

> [!NOTE]
>
> Use ordinary OpenAPI keywords for field-local rules such as `required`, `enum`, `minimum`,
> `maxLength`, `oneOf`, and `format`. Use `x-simile-constraints` only when multiple values must be
> understood together.

For the complete constraint vocabulary, read [`x-simile-constraints`](https://os.inttegro.dev/simile/x-simile-constraints).
For the design model and proof semantics, read [Payload soundness](https://os.inttegro.dev/simile/payload-soundness.md).
For approximate generation when a provider has not published a relationship, read
[Generation heuristics](https://os.inttegro.dev/simile/generation-heuristics.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.