-
Notifications
You must be signed in to change notification settings - Fork 1.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
GEN-309: OpenAPI Connector #17754
GEN-309: OpenAPI Connector #17754
Conversation
""" | ||
|
||
def custom_url_exec(): | ||
if client.status_code == 200: |
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.
is this enough? Aren't we expecting any specific shape? I guess that if I put www.google.com
i might get a 200 but it's not a real service that I can parse no? 🤔
"""Method to return api collection Entities""" | ||
try: | ||
collection_request = CreateAPICollectionRequest( | ||
name=EntityName(collection.get("name")), |
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.
let's prepare pydantic models, this is error-prone:
collection.get("name")
might beNone
EntityName
does not allowNone
- The error better tell us the data is not behaving properly, rather than enigmatic pydantic errors.
Let's properly parse the payload and validate early (shift left as many errors as possible), then let the rest of the flow be "dumb" on how to treat the results, instead of having to be aware all the time about the shape of our data
Quality Gate passed for 'open-metadata-ui'Issues Measures |
Quality Gate passed for 'open-metadata-airflow-apis'Issues Measures |
Quality Gate passed for 'open-metadata-ingestion'Issues Measures |
Describe your changes:
Fixes
I worked on OpenAPI Ingestion Connector
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>