meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
285 stars 148 forks source link

Generator does not add the required query parameters to methods if the query parameters are arrays of objects #253

Open HamedOsama opened 2 months ago

HamedOsama commented 2 months ago

Python version installed 3.12.1

Meraki library version installed 1.45.0

OS Platform Windows 10

Describe the bug Ranges query parameter is missing in getOrganizationCameraBoundariesLinesByDevice it must have ranges query parameter which required in this endpoint /organizations/{organizationId}/camera/detections/history/byBoundary/byInterval

Code snippets code-snippet

console-error

But it's working on adding ranges query parameter through postman working-one

TKIPisalegacycipher commented 2 months ago

Hi @HamedOsama and thank you for this contribution.

I checked the operation docs and it seems the query params are correctly marked as required, however, the generator for the library does not seem to generate the necessary array of objects query parameters. Therefore, there is a bug in the generator, and not with this specific method.

The library is dynamically generated and thus all changes need to start with either the OAS (which is not the issue here) or the generator. If we were to merge this PR, it'd be lost in the next release of the library. So I will close the PR, but keep this issue open.

So, thanks again for this contribution, but if you'd like to see this fixed permanently, please consider submitting a PR to update the generator so that the generator correctly adds the required query params. Aside from generate_library.py, the jinja templates may also need updates.

In the meantime, we'll track this issue here.