Skip to content

@Parameter info are ignored for header  #544

Closed
@btocquec

Description

@btocquec

Hi,

Here is my controller part:

...
    @Operation(summary = "find-articles")
    @Parameter(name = HttpHeaders.IF_MODIFIED_SINCE,
            description = "DateTime",
            in = ParameterIn.HEADER,
            schema = @Schema(type = "string", format = "date-time"),
            example = "2020-01-01T00:00:00.000Z"
    )
    public ResponseEntity<Page<Article>> findArticles(
            @RequestHeader(value = HttpHeaders.IF_MODIFIED_SINCE, required = false) Instant modifiedSince, ...

I expect to see my example and my description in it but I've only got:
image

If I put this part under "parameters" in @operation it works but as I want to create my own reusable annotation, I'd like this @parameter to be used.

Looking deeper in the code, it appears that the binding can't be done between modifiedSince and HttpHeaders.IF_MODIFIED_SINCE where as the merge works if in @operation.

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions