OpenAPI registries
The OpenAPI Initiative registries, the x-permdock- namespace PermDock emits, which registered x-oai-* and x-agent-trust extensions it reuses, and the rule for never inventing names in someone else's namespace.
Status: planned Phase: 2
What it is
The OpenAPI Initiative maintains a set of registries that give shared names to things the specification itself leaves open:
| Registry | What it lists |
|---|---|
| Extension Field | Individual x-* fields with a defined meaning and the objects they may appear on |
| Namespace | Prefixes of the form x-{namespace}- reserved for one organisation or project |
| Format | Values for the JSON Schema format keyword |
| Tag Kind | Values for the tag kind field |
| Media Type | Media types with defined handling in OpenAPI descriptions |
| Draft Feature | Features being trialled before they enter the specification |
| Alternative Schema | Schema languages other than JSON Schema that a description may reference |
Registering is a pull request against OAI/spec.openapis.org that adds a Markdown file under registries/_{registryName}. The Namespace Registry requires the prefix format x-{namespace}- with lowercase identifiers; registered namespaces are fdx, jsonschema, ms, oai (reserved for the OpenAPI Initiative), oas-draft, oas, sap and scalar.
The Extension Registry entries that matter to PermDock:
x-oai-deprecated: marks a Security Scheme deprecated in documents older than 3.2.x-oai-deviceAuthorization: the OAuth 2.0 device authorization flow insideflows, pre-3.2.x-oai-deviceAuthorizationUrl: the RFC 8628 device authorization endpoint, pre-3.2.x-agent-trust: a trust-level metadata block for agent-authenticatedapiKeysecurity schemes, carrying the signaturealgorithm, a trust level vocabulary and a JWKS endpoint for local verification.
There is no registered x-oai-oauth2MetadataUrl, and permdock is not a registered namespace today.
Why it matters for PermDock
PermDock puts permission keys, portable conditions, approval metadata and security-profile declarations into OpenAPI documents so gateways, SDK generators, portals and agents can read them. Every one of those fields is an extension. Two things go wrong when extensions are named casually:
- Collisions. An
x-permissionsfield means something different to every tool that emits one. A registered namespace makesx-permdock-permissionsmean exactly one thing. - Impersonation. Writing an unregistered
x-oai-*name looks official and is not; a viewer that implements the registeredx-oai-*set will ignore it or, worse, misread it.oaiis reserved for the OpenAPI Initiative.
Conversely, when a registered extension already says what PermDock needs to say, reusing it means other tools understand the output without knowing PermDock exists. That is why the 3.1 fallbacks for device authorization and deprecation use the x-oai-* names, and why the Web Bot Auth security scheme carries x-agent-trust rather than an x-permdock-* twin.
How PermDock uses it
The permdock namespace
Registering permdock in the Namespace Registry is a Phase 2 action item, done in the same phase as the permdock/openapi entry and permdock openapi:
- Open a pull request against OAI/spec.openapis.org adding a Markdown file for the
permdocknamespace under the namespace registry directory. - Prefix:
x-permdock-; identifiers are lowercase, camelCase after the prefix as inx-permdock-securityProfile(the registry constrains the namespace token, not the suffix). - Point the entry at this page as the description of every field in the namespace.
Until the registration lands, the extensions are still valid OpenAPI (any x- field is), but the prefix is not reserved. Nothing in PermDock's output changes when it is.
PermDock extensions
| Extension | Appears on | JSON shape | Purpose |
|---|---|---|---|
x-permdock-permissions | Operation | Array of permission keys: ["post.delete"]; the matching scope of each key appears in the operation's security | The permissions protect enforces on the route, in catalog terms |
x-permdock-conditions | Operation | Object keyed by permission key whose values are portable condition JSON (wire formats) | What a scope allows beyond "the scope is present", e.g. authorId = subject.id |
x-permdock-securityProfile | Security Scheme, Operation, root | String, currently "fapi2" | Declares that the resource server implements a named security profile (FAPI 2.0); an operation-level value overrides the scheme's. On --target 3.3 output it is the stable twin of the native type: profile scheme and securityProfileRequirements emitted from the pinned OpenAPI 3.3 draft, so consumers that ignore the draft still see the declaration |
x-permdock-approval | Operation | Object keyed by permission key: { "post.delete": { "reason": "human" } } | The operation may answer approval-required; clients can plan for an approval step (approvals) |
x-permdock-oauth2MetadataUrl | Security Scheme (3.1 targets only) | URL string | Fallback for the 3.2 oauth2MetadataUrl field, for which no x-oai-* extension is registered |
x-permdock-catalog | Root | { "v": 1, "generator": "...", "catalog": "sha256:...", "drafts": { "oas": "3.3-dev@<commit>", "securityProfiles": "oai-discussion-5304@2026-09-01", "overlay": "1.2-dev@<commit>" } } | Lets permdock openapi --check detect drift between catalog and document. drafts is present only when the output depends on an unfinished specification (today: --target 3.3 for oas and securityProfiles, --overlay 1.2 for overlay) and names each pinned revision; --check fails and permdock doctor warns when the pins differ from the installed CLI's (ADR 0025) |
Every value is plain JSON that survives the same round trips as a permission leaf; nothing in an extension is a reference to a runtime object.
{
"paths": {
"/posts/{id}": {
"delete": {
"operationId": "deletePost",
"security": [{ "permdockOAuth": ["post:delete"] }],
"x-permdock-permissions": ["post.delete"],
"x-permdock-conditions": {
"post.delete": { "op": "eq", "field": "authorId", "value": { "ref": "subject.id" } }
},
"x-permdock-approval": { "post.delete": { "reason": "human" } },
"x-permdock-securityProfile": "fapi2",
"responses": { "204": { "description": "Deleted" }, "403": { "$ref": "#/components/responses/PermDockDenied" } }
}
}
}
}Registered names PermDock reuses
| Situation | Registered extension | Where PermDock writes it |
|---|---|---|
Deprecated scheme, --target 3.1 | x-oai-deprecated | Security Scheme |
Device authorization flow, --target 3.1 | x-oai-deviceAuthorization | Inside flows of an oauth2 scheme |
Device authorization endpoint, --target 3.1 | x-oai-deviceAuthorizationUrl | Inside that flow |
| Web Bot Auth agent identity | x-agent-trust | The apiKey Security Scheme that carries the signature |
For Web Bot Auth, PermDock documents signed agent traffic as an apiKey scheme with in: header and name: Signature-Agent, the header through which the verifier discovers the signer's keys. The x-agent-trust block on that scheme carries the signature algorithm, the trust level (using the vocabulary the registry entry defines) and the JWKS endpoint the adapter verifies against. PermDock does not define its own trust vocabulary; the field names and allowed values are taken from the registry entry when the Phase 4 HTTP adapters implement verification.
Rules
- Never invent an
x-oai-*name. Theoainamespace belongs to the OpenAPI Initiative; if a 3.2 or 3.3 feature has no registered pre-3.2 extension, the fallback isx-permdock-*(as foroauth2MetadataUrl). - Use a registered extension whenever one exists for the purpose, including extensions outside the
oainamespace (x-agent-trust). - Otherwise use
x-permdock-*, document it in the table above, and version its shape throughx-permdock-catalog.v. - Never write into another registered namespace (
x-ms-,x-sap-,x-scalar-,x-jsonschema-), nor into an unregistered vendor namespace a consumer reads as its own: gateway import fields (x-amazon-apigateway-*,x-google-*,x-kong-*,x-zuplo-*), docs-host and generator fields (x-mint,x-mcp,x-topics,x-fern-*,x-speakeasy-*,x-stainless-*,x-readme), nor another party's extension for a protocol PermDock has not adopted (the communityx-gnap; see GNAP). A team that wants one of those derived from PermDock's fields writes its own consumer-side overlay (OpenAPI ecosystem), even when a field there looks close. - The importer reads the native fields, the registered fallbacks and the
x-permdock-*set; unknown extensions are preserved untouched, never dropped. - Draft-only native fields (today the
type: profilescheme andsecurityProfileRequirementson--target 3.3, and the Overlay 1.2components.actionsshape on--overlay 1.2) are emitted only behind an experimental flag, always with a stable twin (thex-permdock-*extension, or the 1.1 Overlay form), and with the pinned revision written intox-permdock-catalog.drafts(ADR 0025).
The emitter's test fixtures enforce rule 1 mechanically: output containing any x-oai-* name outside the three registered ones fails the suite.
Mapping table
| Registry concept | PermDock concept |
|---|---|
Namespace permdock, prefix x-permdock- | Every PermDock-specific field in a document |
Extension x-oai-deprecated | meta.deprecated on an action, 3.1 output |
Extension x-oai-deviceAuthorization, x-oai-deviceAuthorizationUrl | flows: ['deviceAuthorization'] adapter option, 3.1 output |
Extension x-agent-trust | Web Bot Auth apiKey scheme emitted by the HTTP adapters |
Extension Registry, no entry for oauth2MetadataUrl | x-permdock-oauth2MetadataUrl |
| Format, Tag Kind, Media Type, Draft Feature, Alternative Schema registries | Not used; PermDock emits standard JSON Schema formats and no draft features |
Sources
- OpenAPI Initiative registries.
- Namespace Registry.
- Extension Registry.
- OAI/spec.openapis.org, where registrations are submitted.
Related
- OpenAPI 3.2: the 3.1 fallback table.
- OpenAPI Overlay: how the extensions are delivered without mutating the source document.
- OpenAPI 3.3: why
x-permdock-securityProfileexists and what it twins on 3.3 output. - ADR 0025: the draft pin in
x-permdock-catalog.drafts. - Web Bot Auth: the scheme that carries
x-agent-trust. - OpenAPI adapter and CLI: openapi.
- ADR 0019.
Open questions
- Whether
x-permdock-permissionsshould become an array of{ key, scope }objects so a document is self-describing without the catalog; today the scope is only readable fromsecurity. - The exact
x-agent-trustfield names and trust-level values, to be copied from the registry entry when Phase 4 starts. - Whether
x-permdock-catalogshould carry a hash of the catalog or itsvand generator version only.
Arazzo workflows
How an Arazzo 1.1.0 workflow is an agent plan, and how permdock simulate pre-flights every step by resolving its operationId to the operation's x-permdock-permissions and returning one Decision per step before anything executes.
RFC 9457 Problem Details
The application/problem+json body PermDock's HTTP adapters return for denied and approval-required decisions, and why it is written for humans and models alike.