Skip to content

Explode object for object query parameters #206

@felixdo

Description

@felixdo

Trying to make spring pageable parameters work. The generated OpenAPI schema is:

"parameters": [
          {
            "name": "pageable",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Pageable"
            }
          }
[...]
"Pageable": {
        "type": "object",
        "properties": {
          "page": {
            "minimum": 0,
            "type": "integer",
            "format": "int32"
          },
          "size": {
            "minimum": 1,
            "type": "integer",
            "format": "int32"
          },
          "sort": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }

And spring wants that as ?page=...&size=..... Afaict this is the "exploded, form" style for openapi serialization of object query parameters, and this is the expected format for this combination. From martian I get however: pageable%5Bpage%5D=10. Not sure if this is an easy fix, there are a gazillion different ways to represent parameters in the openapi spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions