java - Documenting existing JAX-RS implementation with Swagger without annotating it -


i generate swagger documentation existing jax-rs implementation without having modify code @ all. i'd love not have introduce kind of swagger annotations decorating classes.

here

https://github.com/swagger-api/swagger-core/wiki/swagger-core-jax-rs-project-setup-1.5.x.

they seem suggest after configuring application use swagger have annotate code swagger able generate swagger.json. right? annotations needed? if not, don't understand purpose

is magic of documenting existing jax-rs application without modifying code possible?

i've found http://www.adam-bien.com/roller/abien/entry/jax_rs_get_swagger_json.

could solution?

swagger annotations required add documentation jax-rs implementation. purpose define api operations , parameters, meaning , purpose.

the link shared appears sort of hack mechanism. don't see how code can find out intent of api unless explicitly declare it.

if need minimize swagger annotation usage, there 2 ways this:

  1. only use @api @ class level , not use method level annotations. render basic swagger.json listing of get/post etc apis.

  2. write interface , use annotations here. api class needs extend interface then. reduce impact on existing class.

hope helps.


Comments

Popular posts from this blog

php - Webix Data Loading from Laravel Link -

libGdx unable to find files in android application data directory -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -