-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Labels
requires investigationThis needs to be looked at in more detailThis needs to be looked at in more detail
Description
The invocation of GetAllParametersFromOperations (present here ) gives incorrect params (when we drill into the parameters within the nested map) for the same OpenApi Specification
Example of the issue
For the following spec we get 3 params with name random_id
openapi: 3.1.0
info:
title: FastAPI
version: 0.1.0
description: stop complaining
servers:
- url: https://api.hype.ai
description: Production server
paths:
/items/{random_id}:
get:
summary: Read Item
operationId: read_item_items__item_id__get
parameters:
- name: random_id
in: path
required: true
schema:
type: boolean
title: random id
- name: random_id
in: query
required: true
schema:
type: integer
title: random id
- name: random_id
in: query
required: true
schema:
type: boolean
title: random id
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
For the same spec but rearranging params, we get 2 params with name random_id
(the first param refers to random_id present in query of type integer, the second param refers to random_id present in path of type boolean )
openapi: 3.1.0
info:
title: FastAPI
version: 0.1.0
description: stop complaining
servers:
- url: https://api.hype.ai
description: Production server
paths:
/items/{random_id}:
get:
summary: Read Item
operationId: read_item_items__item_id__get
parameters:
- name: random_id
in: query
required: true
schema:
type: integer
title: random id
- name: random_id
in: query
required: true
schema:
type: boolean
title: random id
- name: random_id
in: path
required: true
schema:
type: boolean
title: random id
responses:
"200":
description: Successful Response
content:
application/json:
schema: {}
What should happen
For both the specs above we should get 3 parameters when calling GetAllParametersFromOperations and drilling into the parameters within the operation
Metadata
Metadata
Assignees
Labels
requires investigationThis needs to be looked at in more detailThis needs to be looked at in more detail