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
There are two things that I would like to have in OpenAPI that the seems not to be possible according to the documentation. Strangely, if I try to implement them, the result HTML is rendered as I would expect, even though schema validation errors also appear.
Extend/override properties of a parameter defined externally.
Example:
# .../external-param:
get:
description: Uses a parameter defined in another file.parameters:
- $ref: reusableParam.yamlresponses:
200:
description: OK/external-param-combined:
get:
description: Uses a parameter defined in another file and combines with local parameters.parameters:
- name: reusableParamallOf:
- $ref: reusableParam.yaml
- required: true
- schema:
type: numberdefault: 50responses:
200:
description: OK# ...
Extend/Override a set of responses defined externally.
Example:
# .../external-responses-combined:
get:
description: Uses multiple responses defined in another file and combines with local responses.responses:
allOf:
- $ref: '#/components/responses/GeneralResponses'
- 200:
description: OKcomponents:
responses:
GeneralResponses:
$ref: generalResponses.yaml# ...
Also strange, when executing the same code in a local swagger-ui project (npm run dev) OR with a local static files server (I used Caddy and http-server) it works and doesn't show any schema validation errors.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
There are two things that I would like to have in OpenAPI that the seems not to be possible according to the documentation. Strangely, if I try to implement them, the result HTML is rendered as I would expect, even though schema validation errors also appear.
Example:
Example:
Also strange, when executing the same code in a local swagger-ui project (
npm run dev
) OR with a local static files server (I used Caddy and http-server) it works and doesn't show any schema validation errors.Can someone help me understand this behaviour? Here is a complete example:
repo: https://github.com/guizoxxv/open-api-example
html: https://guizoxxv.github.io/open-api-example/
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions