hey team, in a bidirectional validation, marking a...
# pactflow
g
hey team, in a bidirectional validation, marking a delete as deprecated caused the validation to break entirely, as if it had been removed from the spec. The idea was to use the deprecation flag for a while to redirect consumers to another API. Is this the expected behavior? Thanks
m
Can you please show how you deprecated it?
g
it was deprecated by setting deprecated=true
Copy code
"/asset-model/v1/objects": {
      "delete": {
        "tags": [
          "ModelServices"
        ],
        "summary": "Deletes the model object.",
        "description": "Deletes the model object.",
        "operationId": "DeleteObject",
        "parameters": [
          {
            "name": "WorkspaceSessionId",
            "in": "header",
            "description": "Workspace session id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid",
              "default": "00000000-0000-0000-0000-000000000000"
            }
          }
        ],
        "requestBody": {
          "description": "The delete operation.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteOperation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteOperation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewModelPatch"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
m
Could you please raise an issue here with a reproducible example: https://github.com/pactflow/openapi-pact-comparator/ I’ve just tested this locally with a working example, and deprecating the endpoint didn’t break the test