-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Connector Builder] upgrade orval and use connector manifest schema directly #20166
[Connector Builder] upgrade orval and use connector manifest schema directly #20166
Conversation
# AirbyteProtocol: | ||
# $ref: ../../../../airbyte-protocol/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml |
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.
Removing AirbyteProtocol from this spec, because it still has issues being pulled in which aren't the fault of orval, but more an incompatibility between JSON schema features that the AirbyteProtocol is using and the version of OpenAPI that most generator tools still support.
This means we are in solution number 2 as described here which is a totally satisfactory position to be in.
from connector_builder.generated.models.declarative_stream import DeclarativeStream | ||
|
||
|
||
class ConnectorManifest(BaseModel): |
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.
FYI @girarda @brianjlai since this PR is having the connector builder server OpenAPI spec reference the connector manifest schema directly, it is now generating a lot more models.
Is this setup okay to move forward with for now? I'm assuming we will either start to consume these models or remove them as part of #20044
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.
What
Resolves #18258
As described in the above issue, until now orval (the openAPI -> typescript generator library we use) had issues with pulling in external JSON schema files.
After several rounds of back-and-forth on this orval issue, as of version
6.11.0-alpha.10
all of the issues I have found have now been resolved!How
This PR therefore upgrades to that version of orval, and updates the connector builder OpenAPI spec to pull in the connector manifest schema directly into the API and use it where relevant. This is important for upcoming changes to the connector builder UI which will utilize these types.
This means that a ConnectorManifest typescript type is now generated in the ConnectorBuilderClient.ts file, so it can be used for type-checking of manifest objects in the connector builder, which makes up the other changes in this PR. This is important for upcoming changes to the connector builder UI which will utilize these types.
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
There should be no visible user impact as a result of this change.