Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/randgalt/takari-swagger
Utilities for working with Swagger
https://github.com/randgalt/takari-swagger
Last synced: 6 days ago
JSON representation
Utilities for working with Swagger
- Host: GitHub
- URL: https://github.com/randgalt/takari-swagger
- Owner: Randgalt
- License: apache-2.0
- Created: 2015-08-12T18:06:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T17:03:40.000Z (over 9 years ago)
- Last Synced: 2024-10-16T20:48:14.105Z (28 days ago)
- Language: JavaScript
- Homepage:
- Size: 343 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# takari-swagger
Utilities for working with Swagger
## Background
[Swagger](http://swagger.io/) is a system for documenting RESTful APIs. It consists of libraries and a [web-based console](http://swagger.io/swagger-ui/). The libraries can be cumbersome to use and bring in many unwanted dependencies. Takari-Swagger is a simpler library that allows publishing the data needed by the Swagger console without most of the overhead.
## Modules
* *takari-swagger-core* - library for generating Swagger JSON via reflection.
* *takari-swagger-bundle* - JAX-RS resource for publishing Swagger JSON plus a bundled version of the Swagger console## How To Use
1. Allocate a `SwaggerBuilder` via `Swagger.builder()`
2. Pass in the list of Resource classes to analyze via `jaxRsClasses()`
3. Set the base path for the APIs via `basePath()`
4. Finally, call `build()`
The returned `Swagger` instance can be used to return the Swagger JSON. Either use takari-swagger-bundle for this or provide your own (see ApiDocsResource.java for an example).