HTTPAPI OpenAPI 3.1 Transcription Profile
Profile Version 0.1 — 20 October 2026 Requires HTTPAPI Version 0.2Status
This optional profile defines an interoperable transcription from an HTTPAPI contract into an OpenAPI 3.1 document. It does not change the HTTPAPI request, response, runtime, or wire contracts. The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, and MAY have the meanings defined by HTTPAPI Version 0.2. An implementation claiming this profile MUST state:- HTTPAPI Version 0.2;
- OpenAPI 3.1 Transcription Profile Version 0.1;
- the exact OpenAPI 3.1 patch version emitted; and
- every declared implementation limit.
1. Document
The document’sopenapi property MUST contain the exact OpenAPI 3.1 version
emitted. info.version identifies the described API or service version; it is
not the HTTPAPI version or this profile version.
The title, description, contact, license, terms of service, server URLs, and an
optional mounted path prefix are transcription inputs. They are not portable
HTTPAPI endpoint-contract properties.
The public form of this profile MUST omit internal-only endpoints. A gateway
or deployment document that includes internal endpoints is not the public form
of this profile and MUST preserve the service-only authorization policy.
2. Routes and operations
Each canonical route and each alias route becomes an operation under its path and lowercase HTTP method. A mounted path prefix, when supplied, is prepended before paths are emitted.operationId is selected in this order:
- an explicit alias operation identifier, for an alias;
- the canonical endpoint operation identifier;
- a generated identifier for the canonical method and path.
/, -, _, ., and : and
removing surrounding { and }. Components are joined with _. An alias
without its own explicit identifier appends Alias to the canonical operation
identifier. Operation identifiers MUST be unique within one document; a
transcriber MUST reject duplicates.
summary contains the declared operation summary. When no summary is declared,
it contains the uppercase method, one space, and the mounted path.
The following OpenAPI Specification Extensions preserve HTTPAPI operation
metadata:
An extension MUST be omitted when the corresponding HTTPAPI metadata is not
declared.
3. Request bodies
An endpoint without a typed request body omitsrequestBody. A typed request
body emits:
requiredfrom the HTTPAPI request-body contract;- one
contentmember for every normalized accepted media type; and - the request shape as the media type’s
schema.
4. Responses
Each declared response contract becomes one OpenAPI response. A positive HTTP status is rendered as its decimal status-code key. HTTPAPI status0 becomes
the default response.
The response description is the trimmed declared description. When it is
empty, the transcriber uses Response.. A typed response body emits its schema
under the declared media type; an omitted media type defaults to
application/json.
When an endpoint declares no response contracts, the transcriber emits one
default response with the description Required placeholder response. so
that the OpenAPI operation remains structurally valid.
5. Shape mapping
HTTPAPI shapes map to OpenAPI 3.1 Schema Objects as follows:
String bounds map to
minLength and maxLength. Numeric bounds map to
minimum and maximum. Object-property bounds map to minProperties and
maxProperties. Array-item bounds map to minItems and maxItems. HTTPAPI
bounds are inclusive and the emitted Schema Object MUST preserve that meaning.
6. Discriminated objects
A discriminated request object emits one schema inoneOf for each variant and
sets discriminator.propertyName to the discriminator property. Every branch:
- MUST have
type: objectwhen the variant has no more specific object type; - MUST define the discriminator property as
type: stringwith the branch’s literal value as its singleenummember; and - MUST include the discriminator property in
required.
mapping.
7. Presence rules
Presence rules are layered over the ordinary object schema withallOf.
An exactly-one rule emits a oneOf whose branches each require one named
property. A minimum-presence rule emits an anyOf over every combination of
the minimum number of required names. A maximum-presence rule rejects every
combination containing one more than the maximum by emitting not schemas
with those names in required.
When minimum and maximum constraints both apply, all corresponding schemas are
included. Independent HTTPAPI rules MUST remain independent Schema Object
members; they MUST NOT be collapsed into one larger alternative group.