-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: generated python-sdk #94
base: master
Are you sure you want to change the base?
Conversation
jarinox
commented
Feb 15, 2024
•
edited
Loading
edited
- To reduce development work on the python sdk it will be generated using swagger-codegen
- This PR includes the generated sdk merged together with the old sdk where old classes and methods have been marked deprecated. This makes the new sdk available while still providing a copy of the old sdk.
- sdk has been generated by swagger-codegen - It is still possible to use the old sdk
086e0a2
to
e86389b
Compare
- ORS_API_KEY secret must be set in settings for workflow to work
Hey, I played around with this for a bit, and out of the box, the following things are apparent:
The current module has 1 client class, 1 method/class per endpoint and a bit of util, so ~20 in total. That makes it rather clear to see what I want to use. With this, the client might get easier to maintain, but currently, it certainly doesn't get easier to use. Regarding the PR structure:
|
This PR contains the generated client and deprecation of the old client. The documentation contained in this PR is generated by swagger-codegen alongside the code. The other PR contains vitepress configuration to host the generated docs. |
The generated client in fact requires more code to achieve the same things. This was one of the first things I noticed and discussed when experimenting with the codegen. Beside less maintenance the generated classes allow cleaner code when performing complex requests as the parameters are not specified as map but rather defined as objects. |
- Add snapping service - Adapt MatrixServiceApi test to new client - Remove unimplemented test templates
611ea68
to
1a61040
Compare
This function simlifies the creation of the generic ApiClient which is used by the Service Apis.
The apiClient mehtod simplifies the creation of the ApiClient class.
99590aa
to
a49120a
Compare
62cf6cb
to
a49120a
Compare
Deploys on push to generated-client branch to testpypi
61565e7
to
88e7ca9
Compare
2bb08d0
to
4bb5c3b
Compare
4bb5c3b
to
d5a7be0
Compare