Skip to content

[BUG] Issue while parsing query parameters contents #93

@julienguarino

Description

@julienguarino

Describe the bug
When parsing a YAML string containing query parameters described with 'content' instead of 'schema' directly I get an error:

Parameter.__init__() missing 1 required positional argument: 'schema'

To Reproduce
Steps to reproduce the behavior:

  1. Using the following schema:
openapi: 3.0.0
info:
  title: Example API
  version: 1.0.0
paths:
  /path1:
    get:
      summary: GET operation on path1
      parameters:
        - in: query
          name: param1
          content:
            application/json:
              schema:
                type: string
          description: First parameter for path1
        - in: query
          name: param2
          schema:
            type: integer
          description: Second parameter for path1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
  1. Using: openApiParser(spec_string=YAML_STRING)
  2. See error: Parameter.__init__() missing 1 required positional argument: 'schema'

Expected behavior
This syntax should be supported

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions