# \#shared-code

**URL:** https://community.postman.com/tag/shared-code/341.md

[Latest](https://community.postman.com/latest.md) · [Categories](https://community.postman.com/categories.md) · [Tags](https://community.postman.com/tags.md)

---

## [How can I share my components between 2 openapi specification? ($ref: 'otherAPI.yml#/components/schemas/User')](https://community.postman.com/t/how-can-i-share-my-components-between-2-openapi-specification-ref-otherapi-yml-components-schemas-user/24914)

<div class="topic-metadata">

**Author:** [@Jochen.Szostek](https://community.postman.com/u/Jochen.Szostek)\
**Replies:** 2\
**Last updated:** [March 25, 2022, 1:41am UTC](https://community.postman.com/t/how-can-i-share-my-components-between-2-openapi-specification-ref-otherapi-yml-components-schemas-user/24914 "2022-03-25T01:41:56Z")

</div>

Hello, In my IDE I can share openapi components between API’s, by referencing the other openapi spec yaml file: $ref: 'otherAPI.yml#/components/schemas/User' Since POSTman isn’t file-based, I can’t seem to get this wo…

---

## [Tests retrieved from collection variable - test failures stop subsequent tests from running](https://community.postman.com/t/tests-retrieved-from-collection-variable-test-failures-stop-subsequent-tests-from-running/25362)

<div class="topic-metadata">

**Author:** [@jshea](https://community.postman.com/u/jshea)\
**Replies:** 0\
**Last updated:** [June 30, 2021, 6:42pm UTC](https://community.postman.com/t/tests-retrieved-from-collection-variable-test-failures-stop-subsequent-tests-from-running/25362 "2021-06-30T18:42:29Z")

</div>

I have tests that I want to use in multiple API calls. Using JavaScript from external files has been an open issue for 6 years now but isn’t officially supported (yet). I’m storing tests in collection variables so they …

---

## [Help with multipart-formdata - Python Requests code](https://community.postman.com/t/help-with-multipart-formdata-python-requests-code/16213)

<div class="topic-metadata">

**Author:** [@bbourgau](https://community.postman.com/u/bbourgau)\
**Replies:** 1\
**Last updated:** [June 28, 2021, 5:16am UTC](https://community.postman.com/t/help-with-multipart-formdata-python-requests-code/16213 "2021-06-28T05:16:57Z")

</div>

Hi, When I create a form-data POST request with two images, the Postman Request works. However when I select the code for Python - Requests the generated code does not work at all. It’s looking for the boundary marker…

---

## [How can I run API from share collection using public url?](https://community.postman.com/t/how-can-i-run-api-from-share-collection-using-public-url/19347)

<div class="topic-metadata">

**Author:** [@CV-JigneshP](https://community.postman.com/u/CV-JigneshP)\
**Replies:** 4\
**Last updated:** [February 1, 2021, 2:27pm UTC](https://community.postman.com/t/how-can-i-run-api-from-share-collection-using-public-url/19347 "2021-02-01T14:27:42Z")

</div>

I have created collection with multiple api. Share that collection with Public URL. Now I am running that collection using shared url then only first api running each time. can anyone give example based on it

---

## [Reference Shared API models](https://community.postman.com/t/reference-shared-api-models/15759)

<div class="topic-metadata">

**Author:** [@JoanVilarino](https://community.postman.com/u/JoanVilarino)\
**Replies:** 0\
**Last updated:** [September 10, 2020, 3:02pm UTC](https://community.postman.com/t/reference-shared-api-models/15759 "2020-09-10T15:02:17Z")

</div>

Hi everyone We are switching from SwaggerHub to Postman, and I don’t find the way to reference another API where my models are shared for common responses like this: ‘400’: $ref: “https://api.swaggerhub.com/domains/my…

---

## [Is it possible to have a shared Ajv schema?](https://community.postman.com/t/is-it-possible-to-have-a-shared-ajv-schema/7275)

<div class="topic-metadata">

**Author:** [@jshea](https://community.postman.com/u/jshea)\
**Replies:** 6\
**Last updated:** [August 29, 2019, 9:23pm UTC](https://community.postman.com/t/is-it-possible-to-have-a-shared-ajv-schema/7275 "2019-08-29T21:23:15Z")

</div>

I have a schema that I want to use in tests in several dozen individual requests. Instead of copying the same schema definition into the Test for each request, is it possible to define the schema at a Collection level an…
