title: automatically generate RESTful API sample JSON
body: <p>I have some RESTful APIs on Jersey 2.17 with Jackson.
  They are all on JSON style, and work very well.</p>
  
  <p>But I want to generate a good RESTful Docs withJSON sample for developers.</p>
  
  <p>So I tried some maven plugins,</p>
  
  <p>Firstly I tried <a href="http://www.mojohaus.org/servicedocgen-maven-plugin/index.html" rel="nofollow noreferrer">ServiceDocGen Maven Plugin</a>,</p>
  
  <p>it directly generate HTML docs with Json sample.
  But it doesn’t know Jackson annotation like @JsonProperty, @JsonIgnore, 
  So the JSON sample is inaccurate.</p>
  
  <p>Then I tried <a href="https://github.com/greensopinion/swagger-jaxrs-maven" rel="nofollow noreferrer">swagger-jaxrs-maven</a>, it knows some Jackson annotation like @JsonProperty, but still can't handle @JsonIgnore. Also it is the description of the data schema, not the sample. It will fail if the API directly return a JSON string.</p>
  
  <p>I also tried jaxrs-raml-maven-plugin, it can only use JAXB to generate sample which is inaccurate.</p>
  
  <p>Basically My requirement is simple:</p>
  
  <ol>
  <li><p>Generate endpoint URL and parameter description from JAX-RS annotation, every plugins I tried did it very well.</p></li>
  <li><p>Generate sample JSON on payload, I don't care JSON sample data logic is correct or not, I care if the data structure is accurate. So setting fixed data on certain type is OK, like ServiceDocGen always set "text" on a string.  </p></li>
  </ol>
  
  <p>I believe it is not so tough to generate JSON sample: Firstly go through Java Object tree, fill in random type safe data. Then call Jackson deserializer to generate json data.</p>
  
  <p>But until now I can't find any maven plugin is doing this job well.</p>
  
  <p>Any suggestion ?</p>