# Expected validation errors are not showing up

**URL:** <https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986>\
**Category:** Help Hub\
**Created:** [May 2, 2023, 7:55am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986 "2023-05-02T07:55:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![payload-observer-105](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/payload-observer-105/32/15700_2.png) [@payload-observer-105](https://community.postman.com/u/payload-observer-105)\
**Post date:** [May 2, 2023, 7:55am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986/1 "2023-05-02T07:55:36Z")

</div>

New guy here.

Here’s a snippet from API definition file:

```auto
  /houses:
    get:
      summary: Returns a list of houses.
      description: Returns a list of all houses in the database.
      responses:
        '201': # status code
          description: Successful operation
          content:
            application/json:
              schema: 
                type: integer

```

And here’s my request to my API down this path:

 ![Снимок](https://us1.discourse-cdn.com/getpostman/original/3X/8/a/8adf44d0b426b50b71534f32b7ba81cb9234f9ee.png)

As you can see, I have purposely incorporated two flaws in my definitions file - response code is not 201, and we receive not an integer but an array of objects.

Why are there no validation errors popping up?

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [May 2, 2023, 10:13am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986/2 "2023-05-02T10:13:00Z")

</div>

From looking at your request, it doesn’t appear you have any tests.

Where have you added your validations?

It won’t error based on the definition file. You have to add tests.

---

<div class="post-metadata">

**Author:** ![payload-observer-105](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/payload-observer-105/32/15700_2.png) [@payload-observer-105](https://community.postman.com/u/payload-observer-105)\
**Post date:** [May 2, 2023, 10:51am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986/3 "2023-05-02T10:51:36Z")

</div>

I mean, straight in the Postman web-interface. As far as I get it, it should throw me errors when I send requests through it. And sometimes it works, like here:

 ![Снимок](https://us1.discourse-cdn.com/getpostman/original/3X/5/9/591895b4a4a64a39075e01c4a0812db312aebfed.png)  
 ![Снимок2](https://us1.discourse-cdn.com/getpostman/original/3X/1/c/1cc80f61b6ed85c89aec8125496f612099750fca.png)

But in the mentioned case it doesn’t…

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [May 2, 2023, 11:01am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986/4 "2023-05-02T11:01:53Z")

</div>

I haven’t used that feature, so hopefully someone who has might be able to answer your question.

I don’t know how or what Postman checks when you import a definition like this.

Not sure that integer will be a valid schema type for application/json. Which would be object or array (or just object, as an array is a type of object).

Integer’s would be set against the individual properties.

First time I’ve seen the feature. Nice to know its there.

---

<div class="post-metadata">

**Author:** ![payload-observer-105](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/payload-observer-105/32/15700_2.png) [@payload-observer-105](https://community.postman.com/u/payload-observer-105)\
**Post date:** [May 2, 2023, 11:05am UTC](https://community.postman.com/t/expected-validation-errors-are-not-showing-up/46986/5 "2023-05-02T11:05:24Z")

</div>

I purposely set it to integer to initiate the error.

Thanks for attempt to help. Glad you found out something new.

Hope someone will come up with the solution…
