Forum Discussion

karthiktom's avatar
Occasional Visitor
3 years ago

$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?




No RepliesBe the first to reply