JSONDoc

easily generate docs and playground for your RESTful API

Contacts

Email StackOverflow


How to migrate from 1.2.0 to 1.2.5

Moved @ApiFlow and related annotations to another package

@ApiFlow, @ApiFlowSet, @ApiFlowStep have been moved to another package. If you are using them you just need to reorganize your imports.

Optional code changes

You can remove JSONDoc annotations from Spring's objects returned by methods or being the method's request body.

How to migrate from 1.1.16 to 1.2.0

Changes in the jsondoc maven plugin

If you were using this scanner org.jsondoc.springmvc.scanner.SpringJSONDocScanner, you now need to change it to one of the following org.jsondoc.springmvc.scanner.Spring3JSONDocScanner or org.jsondoc.springmvc.scanner.Spring4JSONDocScanner depending on the Spring version you have on the classpath.

Optional code changes

  • if using Spring MVC, you can now get most of the documentation from the Spring's annotations, so you could optionally remove some of the JSONDoc annotations to keep your code clean.
  • you can now distribute the link of the docs using the url query parameter containing the jsondoc path, for example in this way: http://localhost:8080/jsondoc-ui.html?url=http://localhost:8080/jsondoc. In this way JSONDoc will be automatically loaded without typing anything in the UI input box.

How to migrate from 1.1.6 to 1.1.7+

Changes in the jsondoc-ui module

The page jsondoc.jsp has been changed to jsondoc-ui.html.

How to migrate from 1.1.4 to 1.1.5+

Changes in the annotations

The required property of the @ApiPathParam annotation has been removed. Easy to fix: just remove it from your annotated parameters.

How to migrate from 1.0.9 to 1.1.0+

Unfortunately version 1.1.0+ is not backward compatible with previous versions due to a modification needed to make the documentation writing and generation easier. Fortunately the changes you are required to do on your code are small and quickly doable with some find and replace in your IDE.

Changes in the annotations

The @ApiParam annotation is now split into @ApiPathParam and @ApiQueryParam. Moreover the ApiParamType has been removed from the @ApiPathParam and @ApiQueryParam annotations. To fix this, replace @ApiParam with the corresponding @ApiPathParam or @ApiQueryParam annotation and remove ApiParamType annotation property.

Changes in the Spring MVC controller declaration

When using Spring MVC, the class JSONDocController now wants initialization parameters injected on the constructor and not with properties setters. To fix this, replace the existing bean declaration in the Spring's XML application context (or in Java configuration) with:

<bean id="documentationController" class="org.jsondoc.springmvc.controller.JSONDocController">
	<constructor-arg name="version" value="1.0" />
	<constructor-arg name="basePath" value="http://localhost:8080/api" />
	<constructor-arg name="packages">
	  <list>
		<value>org.jsondoc.sample.controller</value> <!-- packages in which you have your spring controllers -->
		<value>org.jsondoc.sample.pojo</value> <!-- packages in which you have your objects -->
		<value>com.sample.external.pojo</value> <!-- they can also belong to external jars -->
	  </list>
	</constructor-arg>
</bean>


Version 1.2.23 | Licensed under MIT License

GitHub Project | Issues