cancel
Showing results for 
Search instead for 
Did you mean: 

$ref - External Link - anyOf (Multiple response formats) Not working as expected

inauro
Occasional Contributor

$ref - External Link - anyOf (Multiple response formats) Not working as expected

Hi, 

 

While documenting my API responses, I use $ref to point to a response format stored externally. I use anyOf and specify different schemas but none of them are getting resolved and show in the Response documentation.

 

Documentation

inauro_0-1620890184040.png

Response

inauro_1-1620890289972.png

Can you chk and respond as soon as possible? We are on Teams Plan.

 

Thanks!

Tags (1)
2 REPLIES 2
HenrikHL
Occasional Contributor

Re: $ref - External Link - anyOf (Multiple response formats) Not working as expected

If you are in a Domain - this "normally" displays wrong. The APIs referring to it will display it correctly (at least it does for me)...

 

An example (check commodities):

(From domain)

HenrikHL_0-1620892814664.png

 

In API using a $ref:

HenrikHL_1-1620892852572.png

 

HKosova
Moderator

Re: $ref - External Link - anyOf (Multiple response formats) Not working as expected

Hi @inauro, please see my answer in your other thread. To recap - the files refrenced by $refs in your example are not OpenAPI schema definitions, that's why they do not get parsed. You need to define schemas for your data structures.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements