-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Same ref example in methods not working #3198
Comments
What tool are you using which doesn't work? This repository is for the OpenAPI specification itself. |
@MikeRalphson Swagger but i dont know if openapi write correctly |
@petrkasnal The The content:
application/json:
schema:
$ref: '../BaseSchemas/ApiResult.yml'
examples:
UnauthorizedExample:
$ref: '#/components/examples/UnauthorizedExample'
components:
examples:
UnauthorizedExample:
summary: An example of a 401 Unauthorized response
value:
code: 401
message: The 'Authorization' header is missing or contains an invalid value. and the content:
application/json:
schema:
$ref: '../BaseSchemas/ApiResult.yml'
examples:
UnauthorizedExample:
summary: An example of a 401 Unauthorized response
externalValue: '../examples/UnauthorizedExample.json'
|
@hkosova ok thank you very much for your help :) |
Hi,
i'm try use same example over ref in few methods and it isn't work.
Example.yml
test: 'ok'
items.yml
And result show this
![image](https://user-images.githubusercontent.com/90285874/224145295-1b209948-bc95-429c-a945-6f499687ff00.png)
Post:
Get:
![image](https://user-images.githubusercontent.com/90285874/224145404-ff3d9916-2023-41a8-8a57-b2c7c1a6e027.png)
The text was updated successfully, but these errors were encountered: