Skip to content

body parameter isn't loaded when using parameter ref #119

@msarmstr

Description

@msarmstr

Hi, I'm having an issue with using a ref for a body parameter.

parameters:
  PetParam:
    in: body
    name: body
    required: true
    schema:
      $ref: '#/definitions/Pet'
paths: 
  /pet: 
    post:
      operationId: addPet
      parameters:
        - $ref: '#/parameters/PetParam'

When a request is made with the addPet operation above, the payload is empty.

Seems to be that pyswagger.io.Request._prepare_body isn't derefing the body parameter, so getattr(parameter, 'in') returns None.

By the way, this is a great tool. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions