Ask questionsSupport deep objects for query parameters with deepObject style


Many applications expect deeply nested objects in input parameters, see the discussion in swagger-ui starting from this comment: In LoopBack, we are running into this problem too, see

Consider a filter parameter defined as follows:

   in: query
   name: filter
     type: object
   style: deepObject
   explode: true
   description: Options for filtering the results
   required: false

Let's say the user wants to provide the following value, for example by entering a JSON into the text area rendered by swagger-ui:

  "name": "ivan",
  "birth-date": {
    "gte": "1970-01-01"

At the moment, the OpenAPI Specification v3 does not describe how to encode such value in a query string. As a result, OpenAPI clients like swagger-ui don't know how to handle this input - see the discussion in for an example.


The following query string should be created by swagger-js client for the input value shown above.


The proposed serialization style is supported by, which is used by as the default query parser, which means that a vast number of Node.js API servers are already expecting this serialization style.

I am not sure if there is any existing formal specification of this format, I am happy to look into that once my proposal gets considered as acceptable in principle.

Additional information

Existing issues that are touching a similar topic:

  • style: form + object looses the parameter name? #1006
  • Are indexes in the query parameter array representable? #1501

Two older comments from swagger-js that may be relevant:

Limitations: deepObject does not handle nested objects. The specification and documentation does not provide an example for serializing deep objects. Flat objects will be serialized into the deepObject style just fine.

As for deepObject and nested objects - that was explicitly left out of the spec, and it's ok to just Not Support It™.


Answer questions everlast240

Hey guys, I've been trying different things for some time now, but can't get the standard JSONAPI sparse fieldsets params to work with swagger-ui... JSONAPI specifies a way to fetch only required attributes of the included resources. E.g.:

// example:

This all works for my endpoints, but no matter how I format the payload I enter in SwaggerUI and/or setup the swagger JSON, I can't get it to work... For example, using the endpoint(s) works like that:

curl -X GET "http://localhost:5000/person/39?include=address,[person]=first_name,last_name,age&fields[address]=city,full_address,latitude,longitude"

Tried different swagger JSON setups (e.g.with deepObject etc), and payloads in the swagger-ui text field (e.g.: {person: "first_name,last_name,age", address: "city,full_address,latitude,longitude"}), but no success for now... Part of the complication is that the object / hash keys (model / resource name) are dynamic: they depend on the included resources (in the compound document) and I can't statically describe the schema definition.

Any ideas? Help is appreciated! PS: Using Grape ( and the Netfix fast_jsonapi (

Github User Rank List