Specifiying an example in the API docs using OpenAPI DSL
See original GitHub issueI have code for an API endpoint, and I’d like the generated ReDoc documentation to contain an example response that I build. How do I do that?
So something like:
OpenApiBuilder.document().json("200", MyClass.class, openApiParam -> {
openApiParam.description("OK.");
openApiParam.example(new MyClass(3, "def"));
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (27 by maintainers)
Top Results From Across the Web
Specifiying an example in the API docs using OpenAPI DSL
I have code for an API endpoint, and I'd like the generated ReDoc documentation to contain an example response that I build.
Read more >Making OpenAPI / Swagger Bearable With Your Own DSL
So writing a DSL (Domain Specific Language) for Open API just means creating a set of variables and functions that return hash maps....
Read more >Using OpenAPI and Swagger UI - Quarkus
This guide explains how your Quarkus application can expose its API description through an OpenAPI specification and how you can test it via...
Read more >Spring Boot + Swagger 3 (OpenAPI 3) Hello World Example
Swagger is a set of open-source tools built around the OpenAPI Specification that can help you design, build, document and consume REST APIs....
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tipsy Probably, I could spend some time on this task next week
Merged! Thanks for the help @sealedtx and @TobiasWalle !