# Invalid API definition due to "null" in response

**URL:** <https://community.postman.com/t/invalid-api-definition-due-to-null-in-response/59838>\
**Category:** Help Hub\
**Tags:** collections, specification\
**Created:** [April 11, 2024, 9:37am UTC](https://community.postman.com/t/invalid-api-definition-due-to-null-in-response/59838 "2024-04-11T09:37:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![descent-module-cand4](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@descent-module-cand4](https://community.postman.com/u/descent-module-cand4)\
**Post date:** [April 11, 2024, 9:37am UTC](https://community.postman.com/t/invalid-api-definition-due-to-null-in-response/59838/1 "2024-04-11T09:37:20Z")

</div>

Hi there,  
I want to have collection that is in sync with the API specs.  
I’ve uploaded specs and uploaded collection, but when I want to “enable updates suggestion from definition” it’s not possible (greyed out) and the reason for it is “Unable to find valid API definition”.  
When I check the definition I indeed see 18 errors all of the same type: “Invalid data type”.  
The reason for this error is oneOf structure in the response with one of the options of type “null”. I really doubt that we’re the first one to have this issue, thus really hope that there is a way to work this around. Preliminary search (in Google and here at the forum) didn’t show any results.

Please help.

---

<div class="post-metadata">

**Author:** ![descent-module-cand4](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@descent-module-cand4](https://community.postman.com/u/descent-module-cand4)\
**Post date:** [April 11, 2024, 10:22am UTC](https://community.postman.com/t/invalid-api-definition-due-to-null-in-response/59838/2 "2024-04-11T10:22:12Z")

</div>

found the response here:  
Technically we have an error in our APU specs, as stated in the [OAS 3](https://swagger.io/docs/specification/data-models/data-types/):  
Note that there is no null type; instead, the nullable attribute is used as a modifier of the base type.  
Correct way to do it should be, as described [here](https://swagger.io/docs/specification/data-models/data-types/#null).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [April 14, 2024, 10:22am UTC](https://community.postman.com/t/invalid-api-definition-due-to-null-in-response/59838/3 "2024-04-14T10:22:32Z")

</div>

Closed on April 14, 2024, 10:22am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
