oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
526 stars 45 forks source link

[Bug] Martian is not respecting Path Item Object's parameters #74

Closed RafaeLeal closed 4 years ago

RafaeLeal commented 4 years ago

In the OpenAPI-Specification 2.0 (same as Swagger 2.0) you can nest parameters like this:

{
  "paths": {
    "/api/pets/{id}": {
      "get": {
        "method": "get",
        "parameters": [
          {
            "name": "watch",
            "type": "string",
            "in": "query"
          }
        ]
      },
      "parameters": [
        {
          "name": "id",
          "type": "string",
          "in": "path",
          "required": true
        }
      ]
    }
  }
}

But martian is only looking into parameters inside get (or any other http verb)

Reference: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#pathItemObject

oliyh commented 4 years ago

Hi,

Thank you for this, a very welcome addition.