Closed 3DRaven closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue.
Hi! I used 2.9.2 version of springfox
In my project is not working @ApiModel and @Example annotations for generation of custom example.
I used this yaml spec (it part of full spec):
`paths: /v1/logic: post: description: | get vcsp flags of account security:
responses: '200': description: purchases information
schema: $ref: '#/definitions/GlobalResponse'
default: description: unexpected error schema: $ref: '#/definitions/GlobalResponse'`
I used this code to rewrite default models mapper and using custom example value in swagger-ui
@Component @Primary public class CustomExampleModelMapper extends ModelMapper { @Override public Map<String, Model> mapModels(Map<String, springfox.documentation.schema.Model> from) { Map<String, Model> mapModels = super.mapModels(from); mapModels.get("Processor").setExample("test: 1\ntest1: 2"); return mapModels; } }
But in swagger-ui i see just string as:
How to place custom text in example in swagger-ui? I need to insert custom yaml in swagger-ui.