-
I'm trying to define OpenAPI for a query parameter that uses a simple type for a deepObject. According to the OpenAPI spec, the following should work: openapi: 3.0.3
info:
title: OpenAPI definition
version: 0.0.1
paths:
/example:
get:
parameters:
- name: foo
in: query
required: false
schema:
type: object
minProperties: 1
style: deepObject
explode: true
example: >
{
"bar": "baz"
}
responses:
"200":
description: OK
"400":
description: Bad request
"401":
description: Authorization info missing or invalid
"403":
description: Unauthorized
"404":
description: Not found Should result in a query such as Note: I alos posted this question to StackOverflow. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Got an answer on StackOverflow: parameters:
- name: foo
in: query
required: false
style: deepObject # <-------
explode: true # <-------
schema:
type: object
... |
Beta Was this translation helpful? Give feedback.
Got an answer on StackOverflow:
Move
style
andexplode
outside theschema
, to the parameter level: