airbytehq / airbyte-api-java-sdk

Java SDK for Airbyte API
https://api.airbyte.com/
MIT License
16 stars 6 forks source link

Java SDK ListSourcesResponse Error: json matched more than one of the possible type references #107

Open jduckwo opened 1 month ago

jduckwo commented 1 month ago

Topic

Java SDK ListSourcesResponse Error: json matched more than one of the possible type references

Relevant information

I am attempting to use the Java SDK to return a list of all Sources. I am using the sample code provided in the SDK repo. When I make the request I am getting an error. Any idea what I am doing wrong or is this an issue with the version of the SDK I am using?

Airbyte version: 1.0.0 SDK version 1.5.9

Code

Airbyte sdk = Airbyte.builder()
      .security(Security.builder()
          .basicAuth(SchemeBasicAuth.builder()
              .password("")
              .username("")
              .build())
          .build())
      .build();

  ListSourcesRequest req = ListSourcesRequest.builder()
      .build();

  ListSourcesResponse res = sdk.sources().listSources()
      .request(req)
      .call();

Error

  Method threw 'com.fasterxml.jackson.databind.JsonMappingException' exception.

Detailed Message

  json matched more than one of the possible type references, matches are: [com.airbyte.api.models.shared.SourceAirtable, com.airbyte.api.models.shared.SourceAppfollow, com.airbyte.api.models.shared.SourceAsana, com.airbyte.api.models.shared.SourceClickhouse, com.airbyte.api.models.shared.SourceDynamodb, com.airbyte.api.models.shared.SourceE2eTestCloud, com.airbyte.api.models.shared.SourceFaker, com.airbyte.api.models.shared.SourceGoogleDirectory, com.airbyte.api.models.shared.SourceHardcodedRecords, com.airbyte.api.models.shared.SourceInsightly, com.airbyte.api.models.shared.SourceIp2whois, com.airbyte.api.models.shared.SourceMailchimp, com.airbyte.api.models.shared.SourceMonday, com.airbyte.api.models.shared.SourceNotion, com.airbyte.api.models.shared.SourceOkta, com.airbyte.api.models.shared.SourcePinterest, com.airbyte.api.models.shared.SourcePostgres, com.airbyte.api.models.shared.SourceRetently, com.airbyte.api.models.shared.SourceScryfall, com.airbyte.api.models.shared.SourceSpacexApi, com.airbyte.api.models.shared.SourceSquare, com.airbyte.api.models.shared.SourceTiktokMarketing, com.airbyte.api.models.shared.SourceWhiskyHunter, com.airbyte.api.models.shared.SourceXkcd, com.airbyte.api.models.shared.SourceYoutubeAnalytics] - json=REDACTED
jduckwo commented 1 month ago

I also tested with the following versions of the SDK and received the same error: