easily generate docs and playground for your RESTful API


Email StackOverflow

How to: with Spring Boot

With the spring-boot-starter-jsondoc integrating JSONDoc with Spring Boot application is really simple. Here are the steps:

Declare the dependency to spring-boot-starter-jsondoc:


Configure JSONDoc in application.properties file

# mandatory configuration
# optional configuration

See Configuration for more information about JSONDoc configuration properties.

Enable JSONDoc on you configuration class

public class MyWebapp {
	public static void main(String[] args) {
		SpringApplication.run(MyWebapp.class, args);

At this point it is possible to start up the application and go to http://localhost:8080/jsondoc to see the documentation (provided that you wrote the documentation on your services and objects), ready to be used with jsondoc-ui or with your custom documentation viewer.

Optional (but recomended): use jsondoc-ui-webjar to see the documentation

Declare the dependency to the jsondoc-ui-webjar project:


And now you can go to http://localhost:8080/jsondoc-ui.html, insert http://localhost:8080/jsondoc in the box and get the documentation.

In case you are using @EnableWebMvc annotation, then you need to also register resource handlers for static ui resources, in particular:

public class WebConfig extends WebMvcConfigurationSupport {
        protected void addResourceHandlers(ResourceHandlerRegistry registry) {
                registry.addResourceHandler("**/*.css", "**/*.js", "**/*.map", "*.html").addResourceLocations("classpath:META-INF/resources/").setCachePeriod(0);


Version 1.2.17 | Licensed under MIT License

GitHub Project | Issues