-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[ISSUE #20044] generate pydantic models from handwritten schema #20475
[ISSUE #20044] generate pydantic models from handwritten schema #20475
Conversation
- ApiKeyAuthenticator - BasicHttpAuthenticator - BearerAuthenticator - DeclarativeOauth2Authenticator - NoAuth
…on 'type' not being defined)
…rm validation against the handwritten schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I just had a few follow up questions related to your comments.
Also, can you update the airbyte-cdk
readme with how to run the model generation command locally as well since it will start being part of our workflow
ddf2d94
to
4471266
Compare
My bad for triggering the source acceptance test on this PR. It should have been on 20599 |
…handwritten-schema
/approve-and-merge reason="This is tooling improvement that has no impact on the airbyte-cdk itself but will help our development team to iterate through the low-code project" |
Squash and merge |
What
This PR addressed this ticket. It will allow for automatic model generation based on the handwritten component manifest.
How
The generations follows the same life-cycle as the generation of the Airbyte protocol files i.e.:
Manually
Run
./gradlew generateComponentManifestClassFiles
Automatically (as part of GitHub "Connectors Base" check)
When the check runs:
Note that
airbyte-cdk/python/airbyte_cdk/sources/declarative/models/__init__.py
has been excluded from flake8 because it generated error F401 and F403.Recommended reading order
airbyte-cdk/python/airbyte_cdk/sources/declarative/models/low_code_component_schema.py
has been autogenerated and the validation on the generation is part of issue #19759🚨 User Impact 🚨
None yet. Eventually, we will use the generated model in the factory that generates our Python objects but this is for a later issue