Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rahulramm opened this issue Dec 17, 2023 · 4 comments · Fixed by #904

Comments

@rahulramm
Copy link

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"
}
@mathieujobin
Copy link
Collaborator

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

@PanosCodes
Copy link
Contributor

Feel free to test #904

@mathieujobin
Copy link
Collaborator

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

released in v1.3.0

@rahulramm
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants