OpenAPI V2 Schema - DealProduct - quantity as decimal?

Currently the quantity in GetDealsProductsResponse for /api/v2/deals/products endpoint is defined as integer, but it’s also possible to use fractional values like 5.5 there, thus breaking validation:

quantity:
  type: integer
  description: The quantity of the product

Quick and dirty patch with yq is following:

.paths."/deals/products".get.responses."200".content."application/json".schema.properties.data.items.allOf[0].properties.quantity.type = "number"
1 Like

Hi! You’re right, the API accepts and returns decimal values for quantity but the schema had it typed as integer. This has been fixed now. Thanks for letting us know!

1 Like