Skip to content

Not possible to use namespace.param() to specify the same parameter in different locations #159

@ColdHeat

Description

@ColdHeat

Code

    @namespace.param(name="asdf", _in="query")
    @namespace.param(name="asdf", _in="json")

Expected Behavior

I would expect the above code to result in two parameters with two different locations. This should be possible b/c in openapi the parameters section is a list.

Actual Behavior

The parameters trample each other in the params dictionary so you only ever get one of them.

Environment

  • Python version: 3.7
  • Flask version: 1.x
  • Flask-RESTX version: 0.2.0

Additional Context

Not sure why params is a dictionary when the output data is a list. It would be much easier to just merge two lists of dictionaries. If I'm not making a mistake here this is kind of a weird design choice by restful/restx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions