Skip to content

Use rest_api_resources in generated sources#141

Draft
Mirochill wants to merge 1 commit into
dlt-hub:develfrom
Mirochill:fix-133-rest-api-resources
Draft

Use rest_api_resources in generated sources#141
Mirochill wants to merge 1 commit into
dlt-hub:develfrom
Mirochill:fix-133-rest-api-resources

Conversation

@Mirochill

Copy link
Copy Markdown

Summary

  • update generated source imports to use RESTAPIConfig and rest_api_resources from dlt.sources.rest_api
  • have generated @dlt.source functions yield resources via rest_api_resources(source_config) instead of returning a nested rest_api_source(...)
  • adjust the rendered-source helper and add coverage for the generated import/yield shape

Fixes #133.

Validation

  • git diff --check -- dlt_init_openapi/renderer/default/templates/source.py.j2 tests/integration/utils.py tests/integration/basics/test_misc.py
  • inspected the generated source template against the current dlt REST API source templates
  • Not run locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated Imports in OpenAPI-Generated Code

1 participant