feat(ipa): add IPA-132 OperationResponse schema rules - #1437
Draft
julius-jogela wants to merge 1 commit into
Draft
feat(ipa): add IPA-132 OperationResponse schema rules#1437julius-jogela wants to merge 1 commit into
julius-jogela wants to merge 1 commit into
Conversation
julius-jogela
force-pushed
the
feat-ipa-132-operation-response-schema
branch
2 times, most recently
from
August 14, 2026 16:20
0dd2c21 to
ed56aed
Compare
Add the three rules validating how long-running operation status is communicated through the OperationResponse schema: - xgen-IPA-132-operation-endpoints-must-return-operation-response: the single Operation endpoint must reference the OperationResponse schema, and the Operations collection endpoint must return a paginated response whose results reference it. - xgen-IPA-132-operation-status-must-use-the-standard-status-enum: the schema must report progress through a status field using exactly the enum PENDING, IN_PROGRESS, SUCCEEDED, FAILED, CANCELED, SUPERSEDED. - xgen-IPA-132-operation-response-must-include-core-metadata: operationId, operationType, createdAt and updatedAt must be defined and required, operationType must use exactly the enum CREATE, UPDATE, DELETE, CUSTOM, and customMethod must be defined but not required. The schema name, both enums and the exact-enum-match helper live in utils/longRunningOperations.js for reuse by the remaining IPA-132 rules.
julius-jogela
force-pushed
the
feat-ipa-132-operation-response-schema
branch
from
August 14, 2026 17:18
10a7ed2 to
14859d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR adds the IPA-132 rules validating how long-running operation status is communicated through the
OperationResponseschema. Stacked on #1435; the base retargets tomainonce that merges.Jira ticket: CLOUDP-429837
Rules added
All at
warnseverity:xgen-IPA-132-operation-endpoints-must-return-operation-responseIPA-132-operation-endpoints-must-return-operation-response.../operations/{operationId}) must reference theOperationResponseschema; the Operations collection endpoint must return a paginated response whoseresultsitems reference it. Exceptions at the content media type levelxgen-IPA-132-operation-status-must-use-the-standard-status-enumIPA-132-operation-status-must-use-the-standard-status-enumOperationResponsemust define astatusproperty whose enum is exactlyPENDING,IN_PROGRESS,SUCCEEDED,FAILED,CANCELED,SUPERSEDEDxgen-IPA-132-operation-response-must-include-core-metadataIPA-132-operation-response-must-include-core-metadataoperationId,operationType,createdAt,updatedAtdefined and required;operationTypeenum exactlyCREATE,UPDATE,DELETE,CUSTOM;customMethoddefined but not required (it applies only toCUSTOMoperations, which cannot be validated statically)The schema rules anchor on
$.components.schemas.OperationResponseper the guideline metadata. TheOperationResponseschema name, both enums and the exact-enum-match helper live inutils/longRunningOperations.jsfor reuse by the remaining IPA-132 rules.Testing
gen-ipa-docs, prettier and eslint clean.spectral lint openapi/.raw/v2.yamlwith the full ruleset: 0xgen-IPA-132-*findings — the spec defines noOperationResponseschema yet.required, and de-referencing the schemas each fires exactly the right rule.Checklist
Changes to Spectral