play-swagger icon indicating copy to clipboard operation
play-swagger copied to clipboard

Swagger Custom Mappings not working with multiples parameters

Open samirbraga opened this issue 3 years ago • 1 comments

I'm trying to document a simple Pagination object in swagger-custom-mappings.yml this way:

- type: Pagination
  required: false
  specAsParameter:
    - type: integer
      name: pageSize
    - type: integer
      name: page

But, the rendered result is it: image

Looking at the code, I found this block where only the first element of specAsParameter array is really interpreted correctly with type and etc. For example, in another object, I've used a list of filters as a query string parameter, but the type array can't be placed in another position than not first.

https://github.com/iheartradio/play-swagger/blob/526323d38ab87e6c5aa3dd7d94e9b1578ebc9bce/core/src/main/scala/com/iheart/playSwagger/SwaggerSpecGenerator.scala#L219-L236

Why this behavior?

samirbraga avatar Feb 14 '22 18:02 samirbraga

@samirbraga We are currently reviewing it. It may take some time, but we plan to address it.

Javakky-pxv avatar Jul 21 '23 03:07 Javakky-pxv