External Schema Reference[edit]
When you document an API, it is common to have some features which you use across several API resources. In that case, you can create a snippet for such elements in order to use them multiple times when you need it. With OpenAPI 3.0, you can reference a definition hosted on any location. It can be the same server, or another one – for example, GitHub, SwaggerHub, and so on.
Refering a Schema In The Same Document[edit]
Click the Change schema or Add schema links in a parameter, request body, or response to trigger the selection wizard. Choose the Select Schema link from the wizard, then click On Document schema link. Pick a schema from the dropdown below then click Finish.
Refering a Schema In The Same File System[edit]
Click the Change schema or Add schema links in a parameter, request body, or response to trigger the selection wizard. Choose the Select Schema link from the wizard, then click Local schema link. A file dialog picker is triggered. Pick an OpenAPI document. Available schemas in that document will be shown. Pick one schema from the table below then click Finish.
Refering a Remote Schema[edit]
Click the Change schema or Add schema links in a parameter, request body, or response to trigger the selection wizard. Choose the Select Schema link from the wizard, then click Remote schema link. Fill in the remote location URI then hit Enter or Fetch button. Available schemas in that remote location will be fetched and shown. Pick one schema from the table below then click Finish.
Filling In a Schema Reference Manually[edit]
To manually fill in a schema reference, click the Change schema or Add schema links in a parameter, request body, or response to trigger the selection wizard. Choose the Select Schema link from the wizard, then click Schema URI link. Fill in the schema URI then click Finish.