Consider whether to prioritize and recommend OpenAPI and SDK integration for existing and future tap maintainers #1227
aaronsteers
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
Following from some recent conversations on this topic, I wanted to solicit contributors' and maintainers' opinions about relative cost/benefit of using the OpenAPI spec for new taps and existing taps.
For a sample in the "new taps" category, there's the
tap-shortcut
implementation from @edgarrmondragon which does use OpenAPI (more detail below). For a sample in the "existing taps" category, I think tap-github offers a good thought experiment - since they do publish an OpenAPI spec document, and since we already have a robust implementation built without a dependency on it.I did some digging and found that GitHub does publish OpenAPI descriptions in this repo.
Taking a simple example, here is the native definition of
MilestonesStream
, followed by the definition of themilestones
in OpenAPI:Show code snippets...
Tap Stream Definition:
From https://github.com/MeltanoLabs/tap-github/blob/5a3ec399feec9253865e467b74b65a4991af7279/tap_github/repository_streams.py#L586-L617:
Open API Definition
From https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml:
OpenAPI limitations
What this doesn't solve for and would still need to be separately implemented:
post_process()
Request for feedback
So, the two questions I'd love feedback on:
tap-github
to reference the OpenAPI spec and then perform all needed alterations upon that schema as a starting point?If yes to either of the above, does this change the mainstream dev process? OpenAPI specs are not always easy to browse and we can't assume the developer has prior Postman experience. Are there tooling or dev patterns we'd recommend?
I think there's a possible future where we highly recommend using OpenAPI as the starting point for new taps, but there's also a possible future where we do support OpenAPI descriptors for developers who want to use them, without strongly recommending that path as the preferred path.
Example Singer implementation using OpenAPI
@edgarrmondragon has built
tap-shortcut
which leverages their OpenAPI spec. This can be helpful for thought experiments.OpenAPIStream
classes (subclassed fromRESTStream
)schema
could be inferred/inherited from the OpenAPI description.Beta Was this translation helpful? Give feedback.
All reactions