# API Designer Contract Testing Reference Schema from API Spec

**URL:** <https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322>\
**Category:** Help Hub\
**Tags:** tests, collections\
**Created:** [June 12, 2020, 4:44am UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322 "2020-06-12T04:44:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FleetOperate\_API\_Dev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/fleetoperate_api_dev/32/4731_2.png) [@FleetOperate\_API\_Dev](https://community.postman.com/u/FleetOperate_API_Dev)\
**Post date:** [June 12, 2020, 4:44am UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/1 "2020-06-12T04:44:00Z")

</div>

Hi,

I’ve been setting up contract tests for my API that is designed using the API Designer. With following the webinar by Kin Lane, contract testing was shown off. One thing that I found difficult was the separation of the schema to test with and that of the API spec in the designer.

The strategy used in the webinar series is to have the API spec in the API designer where that is the central truth. I like this. But the contract test is validating the API response by using a copy of the object schema, which is a portion of the API spec in the designer, by having it in the environment variables. Maintaining the response schema in two places could lead to forgetting to update the test, or inconsistencies where contract tests pass but API design and contract test are out of sync with each other.

It would be nice if the postman test library in the Response Test section of a Request, would be able to reference a component schema in the API spec in the designer instead of the environment variable.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![robmcec](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/robmcec/32/5857_2.png) [@robmcec](https://community.postman.com/u/robmcec)\
**Post date:** [December 7, 2020, 3:38pm UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/2 "2020-12-07T15:38:53Z")

</div>

@FleetOperate_API_Dev

Have you added this to their feature requests on Github?

---

<div class="post-metadata">

**Author:** ![FleetOperate\_API\_Dev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/fleetoperate_api_dev/32/4731_2.png) [@FleetOperate\_API\_Dev](https://community.postman.com/u/FleetOperate_API_Dev)\
**Post date:** [December 10, 2020, 7:28pm UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/3 "2020-12-10T19:28:59Z")

</div>

I had not, sorry. If you feel inclined, add it and comment on here for others to know.

---

<div class="post-metadata">

**Author:** ![FleetOperate\_API\_Dev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/fleetoperate_api_dev/32/4731_2.png) [@FleetOperate\_API\_Dev](https://community.postman.com/u/FleetOperate_API_Dev)\
**Post date:** [January 7, 2021, 3:39pm UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/4 "2021-01-07T15:39:53Z")

</div>

Added this as a feature request in Postmans Github project. [Postman Feature Request](https://github.com/postmanlabs/postman-app-support/issues/9408)

---

<div class="post-metadata">

**Author:** ![hexes](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@hexes](https://community.postman.com/u/hexes)\
**Post date:** [June 17, 2022, 5:29am UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/5 "2022-06-17T05:29:54Z")

</div>

I can’t understand why that’s feature still didn’t implemented?!

---

<div class="post-metadata">

**Author:** ![mission-meteorologi3](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@mission-meteorologi3](https://community.postman.com/u/mission-meteorologi3)\
**Post date:** [April 20, 2023, 9:33am UTC](https://community.postman.com/t/api-designer-contract-testing-reference-schema-from-api-spec/13322/6 "2023-04-20T09:33:16Z")

</div>

+1 to get notification when this feature is ready.

We need to be able to validate against the OpenAPI schema not only during development time but also during runtime.  
This will be part of our CI CD process.
