<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MembershipsUpdateResponse required fields are not returned on API operations in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/981015#M73831</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt; ,&lt;BR /&gt;&lt;BR /&gt;Thanks for your response.&lt;BR /&gt;Are there any plans to take any action on this issue?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 08:31:11 GMT</pubDate>
    <dc:creator>RMoldes</dc:creator>
    <dc:date>2024-05-23T08:31:11Z</dc:date>
    <item>
      <title>MembershipsUpdateResponse required fields are not returned on API operations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/976877#M73660</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;First of all, thanks for all the support provided regarding OpenAPI usage.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H2&gt;Problem&lt;/H2&gt;&lt;P&gt;We are currently using the HubSpot OpenAPI spec to auto-generate a client for a Kotlin based application we are working on.&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After some testing, we are having an error with the &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L351" target="_blank" rel="noopener"&gt;Add records to a List&lt;/A&gt; operation (Probably happening with other operations on the List Membermship API).&lt;BR /&gt;&lt;BR /&gt;As described in the specification, it should return a &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L2254" target="_blank" rel="noopener"&gt;MembershipsUpdateResponse&lt;/A&gt;, and we are getting an error when the client tries to parse the reponse body, as it expecting some &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L2255" target="_blank" rel="noopener"&gt;required fields&lt;/A&gt; that are not returned when adding a record to a List (e.g: recordIdsRemoved)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;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)
[...]&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The actual response from the API is like (&lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L2255C45-L2255C61" target="_blank" rel="noopener"&gt;required fields&lt;/A&gt; are not present in the response):&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;{
    "recordsIdsAdded": [
        "13XXXXXXXX"
    ]
}&lt;/PRE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;H2&gt;Workarround&lt;/H2&gt;&lt;P&gt;After digging and debugging a bit the issue, we removed the &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L2255C45-L2255C61" target="_blank" rel="noopener"&gt;required fields&lt;/A&gt; of MembershipsUpdateResponse from the local file for the OpenAPI specification we use and regenerated again all the code for the client.&lt;BR /&gt;This seems to be fixing the issue and we can now successfully run the &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/blob/main/PublicApiSpecs/CRM/Lists/Rollouts/144891/v3/lists.json#L351" target="_blank" rel="noopener"&gt;Add records to a List&lt;/A&gt; operation.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I've already created a Github issue in case it helps to keep track of this issue/question:&lt;BR /&gt;- &lt;A href="https://github.com/HubSpot/HubSpot-public-api-spec-collection/issues/15" target="_blank" rel="noopener"&gt;https://github.com/HubSpot/HubSpot-public-api-spec-collection/issues/15&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 14:27:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/976877#M73660</guid>
      <dc:creator>RMoldes</dc:creator>
      <dc:date>2024-05-15T14:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: MembershipsUpdateResponse required fields are not returned on API operations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/977783#M73692</link>
      <description>&lt;P&gt;Thanks for sharing your workaround. And thank you for taking the time to file the GitHub issue — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 17:57:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/977783#M73692</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-05-16T17:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: MembershipsUpdateResponse required fields are not returned on API operations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/981015#M73831</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt; ,&lt;BR /&gt;&lt;BR /&gt;Thanks for your response.&lt;BR /&gt;Are there any plans to take any action on this issue?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 08:31:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/MembershipsUpdateResponse-required-fields-are-not-returned-on/m-p/981015#M73831</guid>
      <dc:creator>RMoldes</dc:creator>
      <dc:date>2024-05-23T08:31:11Z</dc:date>
    </item>
  </channel>
</rss>

