sdaschner / jaxrs-analyzer

Creates REST documentation for JAX-RS projects
Apache License 2.0
319 stars 101 forks source link

support prettification of requests/responses #127

Closed rmannibucau closed 7 years ago

rmannibucau commented 7 years ago

Idea is to add a flag to prettify the payloads for string based backends (adoc and plain)

linked to issue: https://github.com/sdaschner/jaxrs-analyzer/issues/125

Side note: made a few changes compared to 0.15 (I think they are ok but just want to mention them):

  1. enum get merged into a string instead of something not json ("foo"|"bar" would be "foo|bar")
  2. replaced visit(collection) by visitStart/visitEnd(collection) to be able to ensure the [ and ] are symmetric (was not the case)
  3. changed a bit the adoc output (added some \n) to ensure it renders properly in html even with prettification (so you can get few more empty lines which are not affecting the rendering normally)
sdaschner commented 7 years ago

Cool, thanks a lot for contributing!

I have changed the configuration a bit, actually the Backend is configurable using a map. Also renamed the CLI option. Please have a look.

I have uploaded the 0.16-SNAPSHOT version in the Maven snapshot repository, could you please check whether that is all fine? :-)

rmannibucau commented 7 years ago

Looks good, thanks!