Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header Parameters not validated #251

Open
melloware opened this issue Nov 4, 2023 · 0 comments
Open

Header Parameters not validated #251

melloware opened this issue Nov 4, 2023 · 0 comments

Comments

@melloware
Copy link

Reported here: orval-labs/orval#878

If you define Header parameters using "in" : "header", it fails with

⚠️  SyntaxError: Swagger schema validation failed.
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/0 must have required property 'schema'
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/0 must NOT be valid
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/0 must match exactly one schema in oneOf
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/0 must have required property '$ref'
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/0 must match exactly one schema in oneOf
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/1 must have required property 'schema'
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/1 must NOT be valid
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/1 must match exactly one schema in oneOf
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/1 must have required property '$ref'
  #/paths/~1domino~1dataset~1file~1content~1{snapshotId}/get/parameters/1 must match exactly one schema in oneOf
 "/domino/dataset/file/content/{snapshotId}" : {
      "get" : {
        "tags" : [ "Domino" ],
        "summary" : "Get a single file content",
        "description" : "Gets the contents of a single file as a string.",
        "parameters" : [ {
          "name" : "X-Domino-Api-Key",
          "in" : "header",
          "description" : "Domino API Key",
          "required" : true,
          "example" : "83b8568486a99e4a61a49583fd8bea78cbe51ccfbabed01fa04bedf9c875ff96",
          "content" : {
            "text/plain" : { }
          }
        }, {
          "name" : "X-Domino-Api-Url",
          "in" : "header",
          "description" : "Domino URL",
          "required" : true,
          "example" : "https://domino.ksmpartners.com/v4",
          "content" : {
            "text/plain" : { }
          }
        }, {
          "name" : "snapshotId",
          "in" : "path",
          "description" : "Snapshot Identifier",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "filePath",
          "in" : "query",
          "description" : "File Path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "File Content",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "403" : {
            "description" : "Forbidden",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500" : {
            "description" : "Unexpected error",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant