Showing results for 
Search instead for 
Did you mean: 

$ref to point to an external model

Occasional Visitor

$ref to point to an external model



I'm using openAPI spec to generate the data models.
However for one specific model (eg: error model), this is defined in a common separate library(jar) and want to use the same instead of the one generated from openAPI spec.


is there an option in $ref to say that this is an external model?


$ref: '#/definitions/Error' # means go to the root of the current document and then find elements definitions and Error one after one


but i want to use the Error Model defined in a sperate common library and how to indicate the same in openApi spec.


What is the best practice here?




New Here?
Join us and watch the welcome video:
Top Kudoed Authors