Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Server integration
    1. generating the swagger json on-the-fly. our REST api includes ".../api" endpoint to generate the json.
    2. It means that you need to add api documentation at your code by using annotation 
  2. No server integration
    1. generating the swagger json file manually or 
    2. generating the json automatically in compilation (build) by using 3rd party tools
      1. it can use same annotations mentioned #1 above, javadocs or JAX-RS annotation
  3. Brown Dog API - utilizing Swagger: https://bd-api-dev.ncsa.illinois.edu/docs/

Testing

Currently, BrownDog uses mostly Java and Scala to create REST API. We will test these languages and preferred-library first. The test results and notes will be posted here.

...

Method 1 (server integration)

Method 2 (generating json)

swagger-maven-plugin (https://github.com/kongchen/swagger-maven-plugin)

This is the maven plugin that generate the json files and html file by using swagger java annotations in the code

  • It generates the json files such as service.json, workflows.json, datasets.json by using swagger java annotations in the code. Also, it generates single api html file.
  • Loaded the each json files into swagger-UI and worked.
  • Problem:
    • Swagger-UI with "service.json" supposes to connect to other jsons like workflows.json and datasets.json. But it didn't work. It may need to be tested with the pom.xml configuration for the maven plugin
enunciate (http://enunciate.codehaus.org/)

This is a tool that generate swagger-UI, htmls, etc by using JAX-RS java annotations. It can be ran as a command-line tool or maven-plugin