swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

Home Page:http://swagger.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discarded Explode attribute in Header and Parameter Annotation

micryc opened this issue · comments

Description

When I add explode attribute to Header or Parameter Object where ArraySchema attribute also appears at the same time then explode attribute is silently discarded.

Definition:

@Header(
explode = Explode.TRUE,
name = "Rate-Limit-Limit",
description = "The number of allowed requests in the current period",
array = @ArraySchema(maxItems = 10, minItems = 1, schema = @Schema(implementation = SampleHeaderSchema.class))),

Output:

Rate-Limit-Limit:
description: The number of allowed requests in the current period
style: simple
schema:
maxItems: 10
minItems: 1
type: array
items:
$ref: '#/components/schemas/SampleHeaderSchema'

Expected Output:

Rate-Limit-Limit:
description: The number of allowed requests in the current period
style: simple
explode: true
schema:
maxItems: 10
minItems: 1
type: array
items:
$ref: '#/components/schemas/SampleHeaderSchema'