httpie / http-prompt

An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
https://http-prompt.com
MIT License
8.96k stars 326 forks source link

support parameter references in swagger spec #150

Closed dfrommi closed 4 years ago

dfrommi commented 5 years ago

Swagger allows to reuse common parameters by referencing items of the top-level parameters section. The parameter section in paths then looks like

      parameters:
        - $ref: "#/parameters/max"
        - $ref: "#/parameters/offset"

An error is thrown at the moment in that case, because a name property is expected and references are not resolved.

This PR resolves references from the top-level parameters object if $ref is found.

jkbrzt commented 4 years ago

Thanks!