Skip to content

[Breaking Change] Cross-Version Runtime Exception: Data does not match any schemas from 'oneOf' (AutoRest v2 -> v3)Β #7278

@mikekistler

Description

@mikekistler

The Breaking Changes check in PR 26672 failed with a runtime exception with "ERROR: Schema violation: Data does not match any schemas from 'oneOf'.

Pasted Graphic

The exception points to an "x-ms-example":

          "NameSpaceCreate": {
            "$ref": "./examples/NameSpaces/EHNamespaceFailover.json"
          }

for an operation with a 202 response that includes an "Azure-AsyncOperation" and a "location" response header. And the example included both of these headers:

  "responses": {
    "202": {
      "headers": {
        "azure-asyncoperation": "http://azure.async.operation/status",
        "location": "eastus"
      }
    }
  }

Through trial and error, I determined that the "location" header was causing the exception, and with a little more experimenting I found that the value had to be a URL. That makes sense, except that the OpenAPI only defined "location" as a "string". Strange!

Anyway, fixing the value of "location" in the example to be a valid URL fixed the runtime exception.

Metadata

Metadata

Labels

Breaking ChangesImprovements to Breaking Changes toolingCentral-EngSysThis issue is owned by the Engineering System team.Spec PR ToolsTooling that runs in azure-rest-api-specs repo.

Type

No type

Projects

Status

πŸ“‹ Backlog

Status

πŸ“‹ Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions