jskov / openapi-jaxrs-client

An OpenAPI JAX-RS client code generator
Apache License 2.0
1 stars 4 forks source link

Bitbucket API for listing projects returns Object #637

Closed jskov-jyskebank-dk closed 6 months ago

jskov-jyskebank-dk commented 6 months ago

The API has an OK return declared:

  /api/latest/projects:
    get:
...
      responses:
        '200':
          description: A page of projects.
          content:
            application/json:
              schema:
                type: object
                properties:
                  values:
                    type: array
                    items:
                      $ref: '#/components/schemas/RestProject'
                  size:
                    type: number
                    example: 1
                  limit:
                    type: number
                    example: 25
                  nextPageStart:
                    type: integer
                    format: int32
                  isLastPage:
                    type: boolean
                  start:
                    type: integer
                    format: int32

But it ends up as:

  @GET
  @Path("api/latest/projects")
  @Produces(MediaType.APPLICATION_JSON)
  @APIResponses({
    @APIResponse(responseCode = "200", description = "A page of projects.",
                 content = @Content(schema = @Schema(implementation = Object.class))),
    @APIResponse(responseCode = "400", description = "The permission level is unknown or not related to projects.",
                 content = @Content(schema = @Schema(implementation = Object.class)))
  })
  @Operation(summary = "Get projects")
  Object getProjects(@QueryParam("name") String name, @QueryParam("permission") String permission, @QueryParam("start") BigDecimal start, @QueryParam("limit") BigDecimal limit);