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
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:
The text was updated successfully, but these errors were encountered:
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:
That gets translated into this OpenAPI specification:
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:
The text was updated successfully, but these errors were encountered: