OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Hi there, I'm not sure if this question/feature-req applies here or not, but sure if it is implemented affects the generatior, so here I ask:
I find myself using the power of $ref to reference external components in my API definitions, which is great as allows component reuse. But I find myself with this kind of code in my API definitions, where the links to external components are very long and hard to read:
I would really like to know if is there any way to define the base-path of that URLs in some kind of variable or YAML tag, so I could lead to $refs of this form:
where I could define apicomponents-errors: http://... just once.
This is not only for better readability, but to allow update the versions all-in-once, as you can see from this example that the referenced components are versioned by its URL.
I have no idea if such kind of feature exists or can be implemented in OAS 3.
P.S. This does not only applies to schemas, but any kind of ref.
Hi there, I'm not sure if this question/feature-req applies here or not, but sure if it is implemented affects the generatior, so here I ask:
I find myself using the power of
$ref
to reference external components in my API definitions, which is great as allows component reuse. But I find myself with this kind of code in my API definitions, where the links to external components are very long and hard to read:I would really like to know if is there any way to define the base-path of that URLs in some kind of variable or YAML tag, so I could lead to
$ref
s of this form:$ref: '{apicomponents-errors}#/components/schemas/Something'
where I could define
apicomponents-errors: http://...
just once.This is not only for better readability, but to allow update the versions all-in-once, as you can see from this example that the referenced components are versioned by its URL.
I have no idea if such kind of feature exists or can be implemented in OAS 3.
P.S. This does not only applies to schemas, but any kind of ref.