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](https://private-user-images.githubusercontent.com/108332798/291072255-3523c1c9-14bc-429d-b97f-d7fecc76e47d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc3OTA0MDEsIm5iZiI6MTcxNzc5MDEwMSwicGF0aCI6Ii8xMDgzMzI3OTgvMjkxMDcyMjU1LTM1MjNjMWM5LTE0YmMtNDI5ZC1iOTdmLWQ3ZmVjYzc2ZTQ3ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYwN1QxOTU1MDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNmRkMWZhZjRjNzU4NGE4MTMxNWUwNDBlOWEyYWE3ZmI4Y2EwZmU0YjIzMGViNzRhNjU5Mjk1YzNmMjMzZTk2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.7oup1GLBfm9zd6gYgZHN7LpIEIcsJkDaoHfrScf2gWo)
2. Swagger File Output:
![Screenshot 2023-12-17 at 9 07 59 PM](https://private-user-images.githubusercontent.com/108332798/291072232-78d66cfe-5e01-4236-8119-a9fbfea1defa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc3OTA0MDEsIm5iZiI6MTcxNzc5MDEwMSwicGF0aCI6Ii8xMDgzMzI3OTgvMjkxMDcyMjMyLTc4ZDY2Y2ZlLTVlMDEtNDIzNi04MTE5LWE5ZmJmZWExZGVmYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYwN1QxOTU1MDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lMThiZmU4MjIyMGNjYzNjNjQ3ODVjYWQwYzI1NTM0MzhjMjVkMzlmMzJhMWZlZWMxNzY2OGExNjE2YTIzM2ZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.HrCkI2gjRi2TeWu-xFOMnYfxMqIfyKxiFB1OkbC-7Ac)
{
"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