hubspot-public-api-spec-collection's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.