Skip to content

Commit

Permalink
fix a bug where the OAuthAuthenticator was misnamed (#20700)
Browse files Browse the repository at this point in the history
* fix a bug where the OAuthAuthenticator was misnamed

* roll airbyte-cdk version

* add some missing component types to the existing factory type registry

* fix test
  • Loading branch information
brianjlai authored Dec 20, 2022
1 parent 1a6a1c6 commit b17df69
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
3 changes: 3 additions & 0 deletions airbyte-cdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.16.2
Fix the naming of OAuthAuthenticator

## 0.16.1
Include declarative_component_schema.yaml in the publish to PyPi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ definitions:
$options:
type: object
additionalProperties: true
DeclarativeOauth2Authenticator:
description: Authenticator for requests using Oauth authentication
OAuthAuthenticator:
description: Authenticator for requests using OAuth 2.0 authentication
type: object
required:
- type
Expand All @@ -375,7 +375,7 @@ definitions:
properties:
type:
type: string
enum: [DeclarativeOauth2Authenticator]
enum: [OAuthAuthenticator]
client_id:
type: string
client_secret:
Expand Down Expand Up @@ -580,7 +580,7 @@ definitions:
- "$ref": "#/definitions/BasicHttpAuthenticator"
- "$ref": "#/definitions/BearerAuthenticator"
- "$ref": "#/definitions/CustomAuthenticator"
- "$ref": "#/definitions/DeclarativeOauth2Authenticator"
- "$ref": "#/definitions/OAuthAuthenticator"
- "$ref": "#/definitions/NoAuth"
- "$ref": "#/definitions/SessionTokenAuthenticator"
error_handler:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from airbyte_cdk.sources.declarative.extractors.record_selector import RecordSelector
from airbyte_cdk.sources.declarative.interpolation.interpolated_boolean import InterpolatedBoolean
from airbyte_cdk.sources.declarative.interpolation.interpolated_string import InterpolatedString
from airbyte_cdk.sources.declarative.requesters import RequestOption
from airbyte_cdk.sources.declarative.requesters.error_handlers import HttpResponseFilter
from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy import ConstantBackoffStrategy
from airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy import (
ExponentialBackoffStrategy,
Expand All @@ -37,6 +39,7 @@
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.cursor_pagination_strategy import CursorPaginationStrategy
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment import OffsetIncrement
from airbyte_cdk.sources.declarative.requesters.paginators.strategies.page_increment import PageIncrement
from airbyte_cdk.sources.declarative.requesters.request_options import InterpolatedRequestOptionsProvider
from airbyte_cdk.sources.declarative.retrievers.simple_retriever import SimpleRetriever
from airbyte_cdk.sources.declarative.schema.inline_schema_loader import InlineSchemaLoader
from airbyte_cdk.sources.declarative.schema.json_file_schema_loader import JsonFileSchemaLoader
Expand All @@ -45,7 +48,7 @@
from airbyte_cdk.sources.declarative.stream_slicers.datetime_stream_slicer import DatetimeStreamSlicer
from airbyte_cdk.sources.declarative.stream_slicers.list_stream_slicer import ListStreamSlicer
from airbyte_cdk.sources.declarative.stream_slicers.single_slice import SingleSlice
from airbyte_cdk.sources.declarative.stream_slicers.substream_slicer import SubstreamSlicer
from airbyte_cdk.sources.declarative.stream_slicers.substream_slicer import ParentStreamConfig, SubstreamSlicer
from airbyte_cdk.sources.declarative.transformations import RemoveFields
from airbyte_cdk.sources.declarative.transformations.add_fields import AddFields

Expand All @@ -69,8 +72,10 @@
"DpathExtractor": DpathExtractor,
"ExponentialBackoffStrategy": ExponentialBackoffStrategy,
"HttpRequester": HttpRequester,
"HttpResponseFilter": HttpResponseFilter,
"InlineSchemaLoader": InlineSchemaLoader,
"InterpolatedBoolean": InterpolatedBoolean,
"InterpolatedRequestOptionsProvider": InterpolatedRequestOptionsProvider,
"InterpolatedString": InterpolatedString,
"JsonSchema": JsonFileSchemaLoader, # todo remove after hacktoberfest and update connectors to use JsonFileSchemaLoader
"JsonFileSchemaLoader": JsonFileSchemaLoader,
Expand All @@ -81,7 +86,9 @@
"OAuthAuthenticator": DeclarativeOauth2Authenticator,
"OffsetIncrement": OffsetIncrement,
"PageIncrement": PageIncrement,
"ParentStreamConfig": ParentStreamConfig,
"RecordSelector": RecordSelector,
"RequestOption": RequestOption,
"RemoveFields": RemoveFields,
"SimpleRetriever": SimpleRetriever,
"SingleSlice": SingleSlice,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"DeclarativeSource.streams": "DeclarativeStream",
# DeclarativeStream
"DeclarativeStream.retriever": "SimpleRetriever",
"DeclarativeStream.schema_loader": "DefaultSchemaLoader",
"DeclarativeStream.schema_loader": "JsonFileSchemaLoader",
# DefaultErrorHandler
"DefaultErrorHandler.response_filters": "HttpResponseFilter",
# DefaultPaginator
Expand Down
2 changes: 1 addition & 1 deletion airbyte-cdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="airbyte-cdk",
version="0.16.1",
version="0.16.2",
description="A framework for writing Airbyte Connectors.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"type": "DeclarativeStream",
"retriever": {"type": "SimpleRetriever"},
"schema_loader": {"type": "DefaultSchemaLoader"},
"schema_loader": {"type": "JsonFileSchemaLoader"},
}
],
},
Expand Down

0 comments on commit b17df69

Please sign in to comment.