meraki / dashboard-api-python

Official Dashboard API library (SDK) for Python
MIT License
292 stars 152 forks source link

Adding functionalities #156

Closed av1m closed 3 years ago

av1m commented 3 years ago

Hello,

I am a developer for the Zenconnect company and use this repository a lot.

I would like to add some typing and some features that could prove to be very useful for more than one. I thought about creating an open source repository (with an open license), but I thought it might be good to share it with more people.

My question then is: will you be interested in PR on this project? This will mainly cover typing and dedicated classes for each entity. Maybe used something like pydantic with mypy.

If your opinion is favorable, I think it would be wise to add a package to the repository that would initially be independent from your code.

TKIPisalegacycipher commented 3 years ago

Hi Avi,

PRs are welcome and considered. For such a change I'd recommend starting by adding the features to the generator templates and generator script, rather than the generated modules and methods.

On Fri, Apr 23, 2021 at 7:38 AM Avi Mimoun @.***> wrote:

Hello,

I am a developer for the Zenconnect https://github.com/zenconnectfr company and use this repository a lot.

I would like to add some typing and some features that could prove to be very useful for more than one. I thought about creating an open source repository (with an open license), but I thought it might be good to share it with more people.

My question then is: will you be interested in PR on this project? This will mainly cover typing and dedicated classes for each entity. Maybe used something like pydantic https://github.com/samuelcolvin/pydantic with mypy https://github.com/python/mypy.

If your opinion is favorable, I think it would be wise to add a package to the repository that would initially be independent from your code.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/meraki/dashboard-api-python/issues/156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5EUKSQCZ6TB73GI2GUQBTTKGA63ANCNFSM43OYUPVA .

av1m commented 3 years ago

Thank you for the answer! I saw how the documentation is generated in the generator folder (it is very well done by the way) The problem with generating static typing is that the schema returned by the openapi specification is just object.

For example :

"responses": {
          "200": {
            "description": "Successful operation",
            "schema": {
              "type": "object"  ⟵ Here
            },

I don't know if we can get some fields from the examples ...

av1m commented 3 years ago

@TKIPisalegacycipher do you have an idea or a proposal concerning this problem ?

TKIPisalegacycipher commented 3 years ago

Given the amount of work that would be required it would be better to wait until such data types are explicitly defined in the OAS spec.

av1m commented 3 years ago

Do you know if this is planned? And if so, when would this be scheduled?

TKIPisalegacycipher commented 3 years ago

I don't think anything is announced but I'm looking forward to it.