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

Using Endpoints (Swagger/OpenAPI) with Python 3 #351

Closed
dgaedcke opened this issue Mar 1, 2020 · 3 comments
Closed

Using Endpoints (Swagger/OpenAPI) with Python 3 #351

dgaedcke opened this issue Mar 1, 2020 · 3 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@dgaedcke
Copy link

dgaedcke commented Mar 1, 2020

My GAE Std app is currently in Python2.7 & we also use OpenAPI to generate our clients
But I'm facing this version conflict with the old Endpoints library.

I'm wondering if I bite the bullet and upgrade my code to Python 3 (using this new NDB library), will I face the same issue? Or is there another/newer method for decorating my endpoints & generating the Swagger spec??

Thanks for any tips you can provide!!

cloudendpoints/endpoints-management-python#72

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 1, 2020
@cguardia cguardia added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Mar 2, 2020
@cguardia
Copy link
Contributor

cguardia commented Mar 2, 2020

Python 2.7 has reached end of life status, so migrating to Python 3 is a good idea if you have that possibility. I looked at the old endpoints library, and it was explicitly not migrated to Python 3 after an initial attempt was reverted (cloudendpoints/endpoints-management-python#46). I checked and the code is still not Python 3 compatible, so I don't think it will ever be.

It seems that the recommended way forward to use OpenAPI is to run an instance of the Extensible Service Proxy (ESP): https://cloud.google.com/endpoints/docs/openapi/running-esp-localdev

@dgaedcke
Copy link
Author

dgaedcke commented Mar 2, 2020

Thanks for looking into this!! The reason we used Endpoints is to decorate our server API surface and then we auto-generate the client libraries to communicate with that API. Unless I misunderstand ESP, I don't think it provides that feature. Without that, we'd have to go back to hand-coding all of our API's and that would force replacing a bunch of existing code. I did see that NDB has been migrated to Py3 which will be a big help, but I'm still at a loss for how to preserve our generation of Swift/Dart clients. All feedback or ideas welcome. Thanks again!

@cguardia
Copy link
Contributor

cguardia commented Mar 2, 2020

I'm sorry that there's not much that we can do to help you solve your problem. You could consider forking the endpoints library, making the version change, and using that in your code instead of the old one.

Closing this, since it's not really related to NDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants