Skip to content

Request builder not including values of (int) 0 #1103

@seamoss

Description

@seamoss

In the spec I'm consuming:

...
{
  "in": "query",
  "name": "offset",
  "required": true,
  "description": "number of records to skip for pagination",
  "type": "integer",
  "format": "int32",
  "minimum": 0,
  "default": 0,
  "x-example": 0
}
...

When the request is built, it's ignoring the 0 when passed either by parameter injection or using the default.

Expected: /1.0/menu?offset=0&limit=10

Actual: /1.0/menu?limit=10

I know this is standard across the board to make 0 assumptions, but the API I'm consuming is designed to require this parameter in the GET request. Faster to resolve in my end than assume they will update with a correction.

Any thoughts?

Disclosure: I couldn't find any dupes of this. Sorry if I missed any hidden gems.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions