Skip to content

OpenAPI: generated yaml/json files misplaced @Parameter annotation #3654

@bmudda-wpp

Description

@bmudda-wpp

The following annotation on a method in a controller for Parameters

public Map<String, Object> getUser(
      @Parameter(description = "The user ID", required = true) @PathParam String id,
      @Parameter(description = "Flag for fetching active/inactive users. (Defaults to true if not provided)") @QueryParam Boolean activeOnly)

yields the following yaml file which is missing the first @Parameter and assigned the second on to the first attribute

  /public-api/user/{id}:
    get:
      tags:
      - User
      summary: Find a user by ID
      description: Finds a user by ID or throws a 404
      operationId: getUser
      parameters:
      - name: id
        in: path
        description: Flag for fetching active/inactive users. (Defaults to true if
          not provided)
        required: true
        schema:
          type: string
      - name: activeOnly
        in: query
        schema:
          type: boolean
      ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions