eve-swagger
eve-swagger copied to clipboard
Examples not shown in Swagger-ui
Adding example resources on the docs appears to be broken. The examples are not shown in the Swagger UI although they appear in the json OpenAPI specification. I am not sure if this is a problem of eve-swagger or Swagger-ui, I just tried to follow the instructions here: https://github.com/pyeve/eve-swagger#example-resources-on-the-docs
I am using this configuration:
'DOMAIN': {
'users': {
'description': 'this is a description of the users endpoint',
'example': {"name": "Joe", "id": "1234", "age": 30}, <--- custom example
'allow_unknown': True,
'schema': { ... }
}, ...
}
That gets translated into this OpenAPI specification:
{
"openapi": "3.0.0",
"info": {...},
"servers": {...},
"paths": {},
"components": {
"schemas": {}, <---- the example shown in swagger ui appears to be taken from here
"responses": {},
"parameters": {},
"examples": {}, <---- the provided custom example goes here
"requestBodies": {},
}
}
The provided custom example is not shown anywhere in swagger-ui. Instead, it still shows the default example generated from the schema.
I would like the custom example I provided to be shown here:
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.