# How do I generate an OpenAPI yaml file from a Collection of requests?

**URL:** <https://community.postman.com/t/how-do-i-generate-an-openapi-yaml-file-from-a-collection-of-requests/29790>\
**Category:** Help Hub\
**Created:** [November 16, 2021, 7:54pm UTC](https://community.postman.com/t/how-do-i-generate-an-openapi-yaml-file-from-a-collection-of-requests/29790 "2021-11-16T19:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiniqua](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Shiniqua](https://community.postman.com/u/Shiniqua)\
**Post date:** [November 16, 2021, 7:54pm UTC](https://community.postman.com/t/how-do-i-generate-an-openapi-yaml-file-from-a-collection-of-requests/29790/1 "2021-11-16T19:54:24Z")

</div>

How do I generate an OpenAPI yaml file from a Collection of requests?

I see no command for this.

---

<div class="post-metadata">

**Author:** ![Vashanth\_S](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@Vashanth\_S](https://community.postman.com/u/Vashanth_S)\
**Post date:** [November 18, 2021, 1:30pm UTC](https://community.postman.com/t/how-do-i-generate-an-openapi-yaml-file-from-a-collection-of-requests/29790/2 "2021-11-18T13:30:56Z")

</div>

Hey @Shiniqua  
Found a npm library on this: [postman-to-openapi - npm](https://www.npmjs.com/package/postman-to-openapi), might be useful.

---

<div class="post-metadata">

**Author:** ![Shiniqua](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Shiniqua](https://community.postman.com/u/Shiniqua)\
**Post date:** [November 18, 2021, 4:42pm UTC](https://community.postman.com/t/how-do-i-generate-an-openapi-yaml-file-from-a-collection-of-requests/29790/3 "2021-11-18T16:42:31Z")

</div>

Thanks, that is useful.

I guess I can infer then that there is no way—within Postman—to sync the creation and modification of requests within collections with an OpenApi spec, which appears to only reside under the API tab.
