You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the boilerplate and for usefull article!
But how can I reuse the same paths defenitions for different versions of the docs with the only different schema or properties definitions?
Is there any way to use variables in $ref's of the paths defenitions? Or is it possible to use relative (internal) links within $ref descriptions of the paths defenitions that not binded with concrete shemas files?
I mean if I want to create different versions of the OpenApi documentation (for developers and public for ex.) and there are only differences in schemas elements descriptions for dev and public versions. Is it possible to change the $ref for example from "../schemas/Pet.yaml" to "#/components/schemas/Pet" in path defenition and then make two different files (/schemas/Pet-dev.yaml and /schemas/Pet-public.yaml) and two openapi-public.yaml and openapi-dev.yaml main files with different components/schemas $refs (' $ref: "./schemas/pet-open.yaml" and $ref: "./schemas/pet-dev.yaml" '). in theory it may give the possibility reuse the same paths defnitions for both dev and open docs.
Unfortunately for now $ref's with internal links, like "#/components/schemas/Pet" cause an error at the building of the final doc file. And using external links like "../schemas/Pet.yaml" in paths $refs makes hard binding paths defenition with schema defenition so it doesn't allow me to reuse path defenition for different version of the docs.
Could you give me the advice?
The text was updated successfully, but these errors were encountered:
Hi!
Thanks for the boilerplate and for usefull article!
But how can I reuse the same paths defenitions for different versions of the docs with the only different schema or properties definitions?
Is there any way to use variables in $ref's of the paths defenitions? Or is it possible to use relative (internal) links within $ref descriptions of the paths defenitions that not binded with concrete shemas files?
I mean if I want to create different versions of the OpenApi documentation (for developers and public for ex.) and there are only differences in schemas elements descriptions for dev and public versions. Is it possible to change the $ref for example from "../schemas/Pet.yaml" to "#/components/schemas/Pet" in path defenition and then make two different files (/schemas/Pet-dev.yaml and /schemas/Pet-public.yaml) and two openapi-public.yaml and openapi-dev.yaml main files with different components/schemas $refs (' $ref: "./schemas/pet-open.yaml" and $ref: "./schemas/pet-dev.yaml" '). in theory it may give the possibility reuse the same paths defnitions for both dev and open docs.
Unfortunately for now $ref's with internal links, like "#/components/schemas/Pet" cause an error at the building of the final doc file. And using external links like "../schemas/Pet.yaml" in paths $refs makes hard binding paths defenition with schema defenition so it doesn't allow me to reuse path defenition for different version of the docs.
Could you give me the advice?
The text was updated successfully, but these errors were encountered: