-
Notifications
You must be signed in to change notification settings - Fork 1
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
Revisit OpenAPI and the generated python API for mutation #655
Comments
I've done a LOT of research over the last week or so and this looks tough for various reasons:
I'm considering options that are endorsed by Best case scenario with this solution would look like:
and they would be able to share the same environment. We could also consider the github pinned package approach where we only generate the client as needed so it does not break but I am personally less inclined to go with this approach (mainly due to a lack of knowledge on how to implement this, maintain this) Would love to get your thoughts :)) |
Thanks @nevoodoo, this is comprehensive! After some thought, I agree that supporting the generator indefinitely is a bad approach - I think generating and "freezing" the old API is the approach we should take once we know what we want in the future - so we can move forward as we help analysts upgrade their scripts. Whether that be move completely to GraphQL for mutations, or an gRPC approach, I don't mind, as long as we can get the client side stable. To be clear, I'm not tied to |
Yeah totally agree. I think that sounds like a good, actionable approach to me :) Correct me if I'm wrong but ditching the endpoints + fastapi wouldn't change much if we need to maintain an SDK for our users and we're generating it from OpenAPI, right? Maybe we just freeze the SDK for now and then look at working on the graphql version of the SDK in the meantime. |
Update: I attempted to upgrade from pydantic.fields import FieldInfo, Undefined
ImportError: cannot import name 'Undefined' from 'pydantic.fields' |
The OpenAPI API spec and generated python module has been a bit of a painpoint for a while - and it looks like we're going to run into issues with our generator being pinned back, but the newer versions of FastAPI will generate a new version of the OpenAPI spec (3.1): #643 (comment)
We should consider whether the REST / OpenAPI / generated python module is the best approach here. I have a couple of suggestions, but not restricted to that:
mutation
to graphql: I'm a little sceptical on the user experience here, less discoverable?The text was updated successfully, but these errors were encountered: