public String generateJSON ( Collection < Route > routes ) { Swagger swagger = build ( routes ) ; String json = Json . pretty ( swagger ) ; return json ; }
Generates a Swagger 2 . 0 JSON specification from the collection of routes .