Coder Social home page Coder Social logo

hubspot-public-api-spec-collection's People

Contributors

rpanicker06 avatar hspublicapis avatar

Stargazers

Kartikeya Kashiva avatar Adrian Marten avatar Enoma avatar Dennis Jung avatar saran.io avatar Viktor Brech avatar Hannah avatar

Watchers

Ze'ev Klapow avatar James Cloos avatar Chris Riley avatar Stephen avatar Viktor Brech avatar saran.io avatar Dennis Jung avatar  avatar  avatar Hannah avatar

hubspot-public-api-spec-collection's Issues

MembershipsUpdateResponse required fields are not returned on API operations

Hello,

First of all, thanks for all the support provided regarding OpenAPI usage. I'm opening this issue here as I think it is directly related to the specification, but sorry in advanced if this is not the proper place to raise this.

Problem

We are currently using the HubSpot OpenAPI spec to auto-generate a client for a Kotlin based application we are working on.
We've successfully integrated it and managed to generate all required code. Also made some tests to retrieve some entities and seems to be working like a charm.

After some testing, we are having an error with the Add records to a List operation (Probably happening with other operations on the List Membermship API).
As described in the specification, it should return a MembershipsUpdateResponse, and we are getting an error when the client tries to parse the reponse body, as it expecting some required fields that are not returned when adding a record to a List (e.g: recordIdsRemoved)

com.squareup.moshi.JsonDataException: Required value 'recordIdsRemoved' missing at $
	at com.squareup.moshi.internal.Util.missingProperty(Util.java:660)
	at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:105)
	at com.squareup.moshi.internal.NullSafeJsonAdapter.fromJson(NullSafeJsonAdapter.java:41)
	at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:70)
	at com.hubspot.lists.api.MembershipsApi.putCrmV3ListsListIdMembershipsAddWithHttpInfo(MembershipsApi.kt:1405)
	at com.hubspot.lists.api.MembershipsApi.putCrmV3ListsListIdMembershipsAdd(MembershipsApi.kt:225)
[...]

The actual response from the API is like (required fields are not present in the response):

{
    "recordsIdsAdded": [
        "13XXXXXXXX"
    ]
}

Workarround

After digging and debugging a bit the issue, we removed the required fields of MembershipsUpdateResponse from the local file for the OpenAPI specification we use and regenerated again all the code for the client.
This seems to be fixing the issue and we can now successfully run the Add records to a List operation.

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.