JSON Schema for structured operation semantics in OpenAPI extensions.
This repository publishes JSON Schemas for incubating OpenAPI extension patterns. The extension provides machine-readable operation semantics such as operation classification, effects, data sensitivity, and risk levels for API policy and authorization decisions.
| Extension | Status | Description |
|---|---|---|
x-intentops-semantics |
Preferred | Current recommended extension name |
x-intent |
Legacy | Original prototype name (still supported) |
- Existing users of
x-intentcan continue using it. The schema remains fully supported. - New implementations should prefer
x-intentops-semantics.
Preferred (x-intentops-semantics):
https://shaalin.github.io/x-intent-schema/schemas/x-intentops-semantics/v1/schema.json
Legacy (x-intent):
https://shaalin.github.io/x-intent-schema/schemas/x-intent/v1/schema.json
- Effects are declarative. They describe policy-relevant semantics, not an exhaustive runtime trace.
- Effects are cumulative and unordered. The array has no sequence; order carries no meaning.
- Target is a semantic boundary. It identifies the resource domain (e.g.,
billing.invoice), not a runtime scope, IAM resource, or specific object ID.
See docs/semantics.md for full details.
schemas/x-intentops-semantics/v1/schema.json # Preferred
schemas/x-intent/v1/schema.json # Legacy
| File | Description |
|---|---|
| minimal.json | Simplest valid operation semantics (read, no optional fields) |
| read-only.json | Read with data classification |
| draft-mutate.json | Multi-effect: read + mutate |
| external-financial-high-risk.json | High-risk financial transfer with external call |
paths:
/invoices/{id}:
get:
operationId: getInvoice
x-intentops-semantics:
ver: "1"
operation_class: billing.invoice.get
effects:
- kind: read
target: billing.invoice
data:
class: confidential| Field | Required | Description |
|---|---|---|
ver |
yes | Schema version ("1") |
operation_class |
yes | Stable semantic identifier for the operation |
effects |
yes | Declarative policy-relevant effects (array) |
effects[].kind |
yes | Effect category (read, mutate, delete, etc.) |
effects[].target |
no | Affected domain/subsystem |
effects[].risk |
no | Risk level (low, medium, high) |
effects[].data.class |
no | Data classification |
effects[].data.pii |
no | PII indicator |
- Overview — What this extension is and isn't
- Semantics — Field definitions and rules
- Publishing — Hosting and versioning guidance
pip install -r requirements.txt
python validate.pyThis repo defines only the operation semantics schema. It does not include runtime grants, policy engines, or implementation details.
Apache 2.0