Proper Typing for API Calls

Eddysanoli
Getting noticed

Proper Typing for API Calls

Hello! I've been using the API for almost a year now, and one of the things that I really don't like about it, is the fact that it doesn't provide any sort of typing for complex outputs. This makes it hard to guess the shape of the output, although I do know the documentation sort of provides a guide for them. What I have resorted to doing was simply to start creating a bunch of typed dictionaries that specify the structure of different endpoints. 

 

Is there a chance that I could contribute with a stubs package for this? Or something similar? I feel like even though this is not absolutely needed, a bit of typing could go a long way to making the DX better.

 

Thank you!

4 Replies 4
mlefebvre
Building a reputation

Please don't.

Why not? lol

PhilipDAth
Kind of a big deal
Kind of a big deal

Check out the Open API specification.
https://github.com/meraki/openapi 

Thank you! Thats pretty nice, but would you guys be interested in doing something like stubs or anything similar. I could probably contribute to that repo quite frequently. People without strict type checking would not even see any changes, while people that actually check types, be able to get nice linting for the output of their functions.

Get notified when there are additional replies to this discussion.