Skip to content

Commit b47f0ca

Browse files
authored
fix: (DeclarativeOAuthFlow) - add access_token_params property to match the actual spec properties (#103)
1 parent 3c96f16 commit b47f0ca

File tree

2 files changed

+46
-18
lines changed

2 files changed

+46
-18
lines changed

protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml

+23-9
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,9 @@ definitions:
659659
description: |-
660660
OAuth specific blob. Pertains to the fields defined by the connector relating to the OAuth flow.
661661
type: object
662-
additionalProperties: false
662+
additionalProperties: true
663663
required:
664664
- consent_url
665-
- scope
666665
- access_token_url
667666
- extract_output
668667
properties:
@@ -710,6 +709,20 @@ definitions:
710709
"Authorization": "Basic {base64Encoder:{client_id}:{client_secret}}"
711710
}
712711
}
712+
access_token_params:
713+
type: object
714+
additionalProperties: true
715+
description: |-
716+
The OAuth Specific optional query parameters to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step.
717+
When this property is provided, the query params are encoded as `Json string` and passed to the outgoing API request.
718+
719+
Examples:
720+
{
721+
"access_token_params": {
722+
"my_query_param": "param_value",
723+
"{client_id_key}": {{client_id_key}}
724+
}
725+
}
713726
extract_output:
714727
type: array
715728
items:
@@ -726,22 +739,23 @@ definitions:
726739
}
727740
state:
728741
type: object
729-
additionalProperties: true
730742
description: |-
731743
The OAuth Specific object to provide the criteria of how the `state` query param should be constructed,
732744
including length and complexity.
733745
734-
TODO: review and edit this property, once the state generation logic is finilized.
735-
736746
Examples:
737747
{
738748
"state": {
739-
"min_length": 7,
740-
"max_length": 128,
741-
"min_special": 3,
742-
"excluded": ["$", "\\", "."]
749+
"min": 7,
750+
"max": 128,
743751
}
744752
}
753+
additionalProperties: true
754+
properties:
755+
min:
756+
type: integer
757+
max:
758+
type: integer
745759
client_id_key:
746760
type: string
747761
description: |-

protocol-models/src/main/resources/airbyte_protocol/v0/airbyte_protocol.yaml

+23-9
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,9 @@ definitions:
714714
description: |-
715715
OAuth specific blob. Pertains to the fields defined by the connector relating to the OAuth flow.
716716
type: object
717-
additionalProperties: false
717+
additionalProperties: true
718718
required:
719719
- consent_url
720-
- scope
721720
- access_token_url
722721
- extract_output
723722
properties:
@@ -765,6 +764,20 @@ definitions:
765764
"Authorization": "Basic {base64Encoder:{client_id}:{client_secret}}"
766765
}
767766
}
767+
access_token_params:
768+
type: object
769+
additionalProperties: true
770+
description: |-
771+
The OAuth Specific optional query parameters to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step.
772+
When this property is provided, the query params are encoded as `Json string` and passed to the outgoing API request.
773+
774+
Examples:
775+
{
776+
"access_token_params": {
777+
"my_query_param": "param_value",
778+
"{client_id_key}": {{client_id_key}}
779+
}
780+
}
768781
extract_output:
769782
type: array
770783
items:
@@ -781,22 +794,23 @@ definitions:
781794
}
782795
state:
783796
type: object
784-
additionalProperties: true
785797
description: |-
786798
The OAuth Specific object to provide the criteria of how the `state` query param should be constructed,
787799
including length and complexity.
788800
789-
TODO: review and edit this property, once the state generation logic is finilized.
790-
791801
Examples:
792802
{
793803
"state": {
794-
"min_length": 7,
795-
"max_length": 128,
796-
"min_special": 3,
797-
"excluded": ["$", "\\", "."]
804+
"min": 7,
805+
"max": 128,
798806
}
799807
}
808+
additionalProperties: true
809+
properties:
810+
min:
811+
type: integer
812+
max:
813+
type: integer
800814
client_id_key:
801815
type: string
802816
description: |-

0 commit comments

Comments
 (0)