Skip to main content

OpenAPI upgrade

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: openapi-upgrade · 2 operations

POST /v1/openapi-upgrade/{tenant_slug}/apply​

Apply a reviewed OpenAPI upgrade

Apply a reviewed plan: the upgraded document becomes a new version of the same project.

Raises: HTTPException: 404 unknown project / version; 409 plan-stale (the source plans differently now), nothing-to-upgrade (already at target), version-exists, or a source refusal (see :func:load_version_source); 422 when the plan or the import fails; 409 QUALITY_POLICY_BLOCKED when the tenant's import policy refuses the upgraded document.

Operation id: apply_openapi_upgrade_v1_openapi_upgrade__tenant_slug__apply_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for apply a reviewed openapi upgrade.

Responses

StatusDescriptionBody
200Successful response for apply a reviewed openapi upgrade.application/json UpgradeApplyResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/openapi-upgrade/{tenant_slug}/plan​

Plan an OpenAPI version upgrade (no write)

Plan the upgrade of a document or a version to target; nothing is written.

Returns: The plan (:meth:UpgradePlan.as_dict) plus origin and, for a version source, project_id / version_record_id / version_label.

Raises: HTTPException: 404 unknown project / version; 409 when the version has no single-file source; 413 / 422 for a document too large, unparseable, not OpenAPI, of an unsupported version, or newer than target.

Operation id: plan_openapi_upgrade_v1_openapi_upgrade__tenant_slug__plan_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for plan an openapi version upgrade (no write).

Responses

StatusDescriptionBody
200Successful response for plan an openapi version upgrade (no write).application/json object
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

UpgradeApplyRequest​

Apply a reviewed plan to a project / catalog item version as a new version.

PropertyTypeRequiredDescription
targetenum "3.0", "3.1", "3.2"yesTarget OpenAPI version family (as planned).
project_idstringyesProject or catalog item to add the upgraded version to.
versionstring or nullnoThe version that was planned (default: the latest).
plan_digeststringyesThe plan_digest of the reviewed plan; a mismatch is refused (409).
version_labelstring or nullnoLabel of the new version (for example 2.0.0). Default: a date/time label.

UpgradeApplyResponse​

The version an apply created.

PropertyTypeRequiredDescription
project_idstringyesProject identifier the resource belongs to.
version_record_idstringyesThe new version's id (versions.id).
version_labelstringyesVersion Label.
source_version_record_idstringyesThe version that was upgraded.
target_versionstringyesThe OpenAPI version the new version declares.
change_countintegeryesNumber of change.

UpgradePlanRequest​

What to plan: a pasted document, or a project / catalog item version, and the target.

PropertyTypeRequiredDescription
targetenum "3.0", "3.1", "3.2"yesTarget OpenAPI version family.
document_textstring or nullnoThe document itself (JSON or YAML). Set this or project_id, not both.
project_idstring or nullnoProject or catalog item whose version is upgraded. Set this or document_text.
versionstring or nullnoThe version to upgrade: a version id (UUID) or label (1.0.0). Default: the latest.
include_documentbooleannoReturn the upgraded document with the plan.