Folks I have a question about new “advancedAuth” s...
# contributing-to-airbyte
s
Folks I have a question about new “advancedAuth” specification is it ok that ? on Java part we have camelCase
oauthUserInputFromConnectorConfigSpecification
https://github.com/airbytehq/airbyte/blob/cb9c5123b1789310ee313c2823868ecba65aa35f/airbyte-api/src/main/openapi/config.yaml#L3259 on Python part we have snake_case
oauth_user_input_from_connector_config_specification
https://github.com/airbytehq/airbyte/blob/cb9c5123b1789310ee313c2823868ecba65aa35f/airbyte-cdk/python/airbyte_cdk/models/airbyte_protocol.py#L122 I see that for old deprecated specification “authSpecification” we have camelCase for both python and java
u
the java part is for the API server, the bottom is for the airbyte protocol, so the naming convention is appropriate for each
s
I am trying to add new “advancedAuth” section to
spec.json
do I need to use camelCase or snake_case ?
I mean
cat spec.json
Copy code
"advancedAuth": { 
    "authFlowType": "oauth2.0"
    ....
  } 

  OR   

  "advanced_auth": {
    "auth_flow_type": "oauth2.0"
    ....
  }
u
you can go with the snake_case on the spec.json (protocol side)
u
@Chris (deprecated profile) hm I just tried both way “camel_case” vs “snakeCase” for
spec.json
Copy code
1) cat spec.json

"advanced_auth": {
    "auth_flow_type": "oauth2.0",
...

2) cat spec.json

"advancedAuth": {
    "authFlowType": "oauth2.0",
camalCase - OK snake_case - UI generate error: “Fetching connector failed.”
s
is this working?
Copy code
"advancedAuth": {
    "auth_flow_type": "oauth2.0",
advancedAuth
camelCase and the rest of properties nested inside snake_case
sec let me check …
u
this works :
Copy code
"advancedAuth": {
  "auth_flow_type": "oauth2.0",
  "oauthConfigSpecification": {
    "completeOAuthOutputSpecification": {
    "completeOAuthServerInputSpecification": {
    "completeOAuthServerOutputSpecification": {
u
ah, “rest of snake_case”
u
let me do 2-nd check…
u
this also works
Copy code
"advancedAuth": {
      "auth_flow_type": "oauth2.0",
      "oauth_config_specification": {
        "complete_oauth_output_specification": {
        "complete_oauth_server_input_specification": {
        "complete_oauth_server_output_specification": {
s
let’s go with that last one then!
u
ok thank
u
you can take a look at the unit test here https://github.com/airbytehq/airbyte/blob/master/airbyte-oauth/src/test/java/io/airbyte/oauth/flows/BaseOAuthFlowTest.java and how the object is filled up to know what you need to put in there btw