Skip to content

OpenAPI conflict

A refusal to apply an OpenAPI import, delete a project’s OpenAPI contract, or vary or undo its dynamic values, because the project is no longer in the state that was reviewed.

Field Value
type https://mockhub.dev/problems/openapi-conflict
Status 409

An import is applied only as its preview showed it. The preview records the state of the contract and of the project’s mocks, and what the import would write; when either has moved by the time of the apply, because the contract or a mock changed in between, nothing is applied. Deleting a contract names the revision that was reviewed, and is refused the same way once there is a newer one. Varying response values is applied only as its review showed it, and undoing the latest batch only while nothing it touched has changed. The document itself may be fine.

Always 409.

From applying an OpenAPI import, deleting a project’s contract, and applying or undoing Vary response values.

When detail
The contract or a mock changed after the preview The project or its contract changed since this import was previewed. Preview it again before applying it.
The import would now write something the preview did not show This import would no longer do what its preview showed. Preview it again before applying it.
The contract has a newer revision than the one reviewed The contract is at revision <n>, not <n>. Review it again before deleting it.
The contract has been deleted This project has no OpenAPI contract any more.
The contract, a mock, the stored choices or the project’s templating changed after Vary response values reviewed them The contract, its mocks or the project's templating changed since these dynamic values were previewed. Preview them again before applying.
The batch to undo is not the latest one There is no such change to undo; only the latest batch can be. Nothing was undone.
Something the latest batch touched has changed since The reason, such as A mock this change updated was edited afterwards. Nothing was undone.

This type carries no extension members.

{
"type": "https://mockhub.dev/problems/openapi-conflict",
"title": "Contract changed since the preview",
"status": 409,
"detail": "The project or its contract changed since this import was previewed. Preview it again before applying it."
}

Select Update the preview on the import page and read the new plan before applying it: the change that caused the conflict is not in your document, and applying over it unread could undo it. For a deletion, review the contract’s current revision first. Vary response values reviews the scope again by itself; read it and apply again. A batch that can no longer be undone stays as it is: change the values again, or select Use fixed values everywhere.

Report a problem with this page