Apipie/apipie-rails

Discrepancy: `params` Defined as Array of Integer in Apipie appears as Array of Strings in Swagger File

rahulramm opened this issue · 4 comments

Defining an array parameter as Integer within Apipie validates correctly in the HTML documentation but generates the Swagger file with an array of string type.

Parameter defined within Apipie

param :folder_ids, Array, of: Integer, desc: "Array of folder IDs"

Expected Behavior:
The Swagger file should reflect the parameter folder_ids as an array of Integer type, consistent with the definition in Apipie's DSL.

Actual Behavior:
The Swagger file represents folder_ids as an array of string type, contrary to the defined type in Apipie.

Screenshots:

1. HTML Documentation (Apipie):

Screenshot 2023-12-17 at 9 08 25 PM

2. Swagger File Output:

Screenshot 2023-12-17 at 9 07 59 PM
{
    "name": "folder_ids",
    "type": "array",
    "items": {
      "type": "string"
    },
    "in": "formData",
    "description": "Array of folder IDs"
}

I see, thanks for reporting.

@PanosCodes is it possible for you to look at this one? Would you know already where this string type be coming from?

Thanks

Feel free to test #904

Thanks @rahulramm for the report
Thanks @PanosCodes for the quick fix.

released in v1.3.0

Much Appreciated. Thank you so much for the quick turnaround. @mathieujobin @PanosCodes