43 lines
1.1 KiB
Markdown
43 lines
1.1 KiB
Markdown
# Referencing Another API Specification
|
|
|
|

|
|
|
|
## What
|
|
|
|
Referencing another specification allows for cleaner and more organized code. Some use cases are as follows:
|
|
|
|
* Generate API documentaion in Hubs
|
|
* De-duplicate common structures like responses or shared parameters in Modeling
|
|
* Test a connected API specification in Scenarios
|
|
* Setup a mock server for an API in Prism
|
|
|
|
## How
|
|
|
|
1. Choose the **source**
|
|
|
|
* This File
|
|
|
|
* This Project
|
|
|
|
* Select a **file**
|
|
|
|
* Shared/Common
|
|
|
|
* External URL
|
|
|
|
* Enter a valid **URL** to an existing specification
|
|
|
|
2. Select a **target**, if required
|
|
|
|
3. Confirm your choice. (Only required if there is a confirm button)
|
|
|
|
4. View the referenced specification by clicking the book icon
|
|
|
|
---
|
|
**Related Links**
|
|
|
|
* [Reference other Sources](/documentation/referencing-other-data-sources)
|
|
* [API Models](/modeling/modeling-with-openapi/api-models)
|
|
* [Shared Parameters and Responses](/modeling/modeling-with-openapi/shared-parameters-and-responses)
|
|
|