juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Simplified swagger annotations.
Date Thu, 08 Mar 2018 02:36:34 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new bad860b  Simplified swagger annotations.
bad860b is described below

commit bad860b6a5539360026734e83f4462c9cf3ee70f
Author: JamesBognar <jamesbognar@apache.org>
AuthorDate: Wed Mar 7 21:36:25 2018 -0500

    Simplified swagger annotations.
---
 .../apache/juneau/dto/swagger/OperationTest.java   |   18 +-
 .../org/apache/juneau/dto/swagger/Operation.java   |   12 +-
 juneau-doc/src/main/javadoc/overview.html          |  238 ++--
 .../examples/rest/SystemPropertiesResource.java    |  118 +-
 .../rest/addressbook/AddressBookResource.java      |   16 +-
 .../microservice/resources/ConfigResource.java     |   68 +-
 .../microservice/resources/LogsResource.java       |   45 +-
 .../org/apache/juneau/rest/test/NlsResource.java   |   70 +-
 .../rest/test/OptionsWithoutNlsResource.java       |    6 +-
 .../java/org/apache/juneau/rest/test/NlsTest.java  |   12 +-
 .../apache/juneau/rest/BasicRestInfoProvider.java  | 1410 ++++----------------
 .../java/org/apache/juneau/rest/RestRequest.java   |    4 +-
 .../juneau/rest/annotation/MethodSwagger.java      |  210 ---
 .../apache/juneau/rest/annotation/Parameter.java   |  213 ---
 .../juneau/rest/annotation/ResourceSwagger.java    |  333 -----
 .../apache/juneau/rest/annotation/Response.java    |  107 --
 .../apache/juneau/rest/annotation/RestMethod.java  |   35 +-
 .../juneau/rest/annotation/RestResource.java       |   22 +-
 18 files changed, 615 insertions(+), 2322 deletions(-)

diff --git a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/dto/swagger/OperationTest.java b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/dto/swagger/OperationTest.java
index 1f44ad1..5549d6f 100644
--- a/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/dto/swagger/OperationTest.java
+++ b/juneau-core/juneau-core-test/src/test/java/org/apache/juneau/dto/swagger/OperationTest.java
@@ -352,11 +352,11 @@ public class OperationTest {
 	public void testSetResponses() {
 		Operation t = new Operation();
 		
-		t.setResponses(new AMap<Integer,ResponseInfo>().append(123,responseInfo("bar")));
+		t.setResponses(new AMap<String,ResponseInfo>().append("123",responseInfo("bar")));
 		assertObjectEquals("{'123':{description:'bar'}}", t.getResponses());
 		assertType(Map.class, t.getResponses());
 		
-		t.setResponses(new AMap<Integer,ResponseInfo>());
+		t.setResponses(new AMap<String,ResponseInfo>());
 		assertObjectEquals("{}", t.getResponses());
 		assertType(Map.class, t.getResponses());
 
@@ -371,11 +371,11 @@ public class OperationTest {
 	public void testAddResponses() {
 		Operation t = new Operation();
 
-		t.addResponses(new AMap<Integer,ResponseInfo>().append(123,responseInfo("bar")));
+		t.addResponses(new AMap<String,ResponseInfo>().append("123",responseInfo("bar")));
 		assertObjectEquals("{'123':{description:'bar'}}", t.getResponses());
 		assertType(Map.class, t.getResponses());
 		
-		t.addResponses(new AMap<Integer,ResponseInfo>());
+		t.addResponses(new AMap<String,ResponseInfo>());
 		assertObjectEquals("{'123':{description:'bar'}}", t.getResponses());
 		assertType(Map.class, t.getResponses());
 
@@ -391,9 +391,9 @@ public class OperationTest {
 	public void testResponse() {
 		Operation t = new Operation();
 		
-		t.response(1, responseInfo("foo"));
+		t.response("1", responseInfo("foo"));
 		t.response(null, responseInfo("bar"));
-		t.response(2, null);
+		t.response("2", null);
 		assertObjectEquals("{'1':{description:'foo'},null:{description:'bar'},'2':null}", t.getResponses());
 	}
 
@@ -411,8 +411,8 @@ public class OperationTest {
 		t.responses((Object)null);
 		
 		assertObjectEquals("{'1':{description:'a'},'2':{description:'b'},'3':{description:'c'}}", t.getResponses());
-		for (Map.Entry<Integer,ResponseInfo> e : t.getResponses().entrySet()) {
-			assertType(Integer.class, e.getKey());
+		for (Map.Entry<String,ResponseInfo> e : t.getResponses().entrySet()) {
+			assertType(String.class, e.getKey());
 			assertType(ResponseInfo.class, e.getValue());
 		}
 	}
@@ -656,7 +656,7 @@ public class OperationTest {
 		assertType(List.class, t.get("produces", Object.class));
 		assertType(MediaType.class, t.get("produces", List.class).get(0));
 		assertType(Map.class, t.get("responses", Object.class));
-		assertType(Integer.class, t.get("responses", Map.class).keySet().iterator().next());
+		assertType(String.class, t.get("responses", Map.class).keySet().iterator().next());
 		assertType(ResponseInfo.class, t.get("responses", Map.class).values().iterator().next());
 		assertType(List.class, t.get("schemes", Object.class));
 		assertType(List.class, t.get("security", Object.class));
diff --git a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Operation.java b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Operation.java
index 77ffa4c..edfd442 100644
--- a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Operation.java
+++ b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/Operation.java
@@ -141,7 +141,7 @@ public class Operation extends SwaggerElement {
 		produces;
 	private List<ParameterInfo> parameters;
 	private List<Map<String,List<String>>> security;
-	private Map<Integer,ResponseInfo> responses;
+	private Map<String,ResponseInfo> responses;
 
 	/**
 	 * Bean property getter:  <property>tags</property>.
@@ -697,7 +697,7 @@ public class Operation extends SwaggerElement {
 	 * 
 	 * @return The property value, or <jk>null</jk> if it is not set.
 	 */
-	public Map<Integer,ResponseInfo> getResponses() {
+	public Map<String,ResponseInfo> getResponses() {
 		return responses;
 	}
 
@@ -712,7 +712,7 @@ public class Operation extends SwaggerElement {
 	 * 	<br>Property value is required.
 	 * @return This object (for method chaining).
 	 */
-	public Operation setResponses(Map<Integer,ResponseInfo> value) {
+	public Operation setResponses(Map<String,ResponseInfo> value) {
 		responses = newMap(value);
 		return this;
 	}
@@ -728,7 +728,7 @@ public class Operation extends SwaggerElement {
 	 * 	<br>Ignored if <jk>null</jk>.
 	 * @return This object (for method chaining).
 	 */
-	public Operation addResponses(Map<Integer,ResponseInfo> values) {
+	public Operation addResponses(Map<String,ResponseInfo> values) {
 		responses = addToMap(responses, values);
 		return this;
 	}
@@ -740,7 +740,7 @@ public class Operation extends SwaggerElement {
 	 * @param response The response description.
 	 * @return This object (for method chaining).
 	 */
-	public Operation response(Integer statusCode, ResponseInfo response) {
+	public Operation response(String statusCode, ResponseInfo response) {
 		return addResponses(Collections.singletonMap(statusCode, response));
 	}
 
@@ -761,7 +761,7 @@ public class Operation extends SwaggerElement {
 	 * @return This object (for method chaining).
 	 */
 	public Operation responses(Object...value) {
-		responses = addToMap(responses, value, Integer.class, ResponseInfo.class);
+		responses = addToMap(responses, value, String.class, ResponseInfo.class);
 		return this;
 	}
 
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index d9005a7..dc56b02 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -13723,31 +13723,6 @@
 				certain aspects.
 			</p>
 			<p>
-				In addition to the methods defined on the <l>RestInfoProvider</l> interface, it also includes the following methods:
-			</p>
-			<ul class='doctree'>
-				<li class='jc'><code>{@link org.apache.juneau.rest.BasicRestInfoProvider} <jk>implements</jk> {@link org.apache.juneau.rest.RestInfoProvider}</code>
-				<ul>
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getVersion(RestRequest) getVersion(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getContact(RestRequest) getContact(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getConsumes(RestRequest) getConsumes(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getProduces(RestRequest) getProduces(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getLicense(RestRequest) getLicense(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getTags(RestRequest) getTags(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getTermsOfService(RestRequest) getTermsOfService(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getExternalDocs(RestRequest) getExternalDocs(RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodSummary(Method,RestRequest) getMethodSummary(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodDescription(Method,RestRequest) getMethodDescription(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodOperationId(Method,RestRequest) getMethodOperationId(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodConsumes(Method,RestRequest) getMethodConsumes(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodProduces(Method,RestRequest) getMethodProduces(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodParameters(Method,RestRequest) getMethodParameters(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodResponses(Method,RestRequest) getMethodResponses(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getMethodTags(Method,RestRequest) getMethodTags(Method,RestRequest)}
-					<li class='jm'>{@link org.apache.juneau.rest.BasicRestInfoProvider#getSwaggerFromFile(RestRequest) getSwaggerFromFile(RestRequest)}
-				</ul>
-			</ul>
-			<p>
 				The default provider provides several options for defining Swagger documentation on your resource:
 			</p>
 			<ul class='spaced-list'>
@@ -13761,12 +13736,12 @@
 	MyResource_ja_JP.json
 					</p>
 				<li>
-					Use {@link org.apache.juneau.rest.annotation.ResourceSwagger @ResourceSwagger} and {@link org.apache.juneau.rest.annotation.MethodSwagger @MethodSwagger}
+					Use {@link org.apache.juneau.rest.annotation.RestResource#swagger() @RestResource(swagger)} and {@link org.apache.juneau.rest.annotation.RestMethod#swagger() @RestMethod(swagger)}
 					annotations on your resource classes and methods.
 					<br><h5 class='figure'>Example:</h5>
 					<p class='bcode w800'>
 	<ja>@RestMethod</ja>(
-		swagger=<ja>@MethodSwagger</ja>(tags=<js>"foo,bar,baz"</js>)
+		swagger=<js>"{tags:'foo,bar,baz'}</js>
 	)
 	<jk>public</jk> Object myMethod() {...}
 					</p>
@@ -17680,14 +17655,14 @@
 		<jc>// Support GZIP encoding on Accept-Encoding header.</jc>
 		encoders=GzipEncoder.<jk>class</jk>,
 	
-		swagger=<ja>@ResourceSwagger</ja>(
-			contact=<js>"{name:'John Smith',email:'john@smith.com'}"</js>,
-			license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>,
-			version=<js>"2.0"</js>,
-			termsOfService=<js>"You're on your own."</js>,
-			tags=<js>"[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}]"</js>,
-			externalDocs=<js>"{description:'Home page',url:'http://juneau.apache.org'}"</js>
-		) 
+		swagger={
+			<js>"contact:{name:'John Smith',email:'john@smith.com'},"</js>,
+			<js>"license:{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'},"</js>,
+			<js>"version:'2.0',"</js>,
+			<js>"termsOfService:'You are on your own.',"</js>,
+			<js>"tags:[{name:'Java',description:'Java utility'}],"</js>,
+			<js>"externalDocs:{description:'Home page',url:'http://juneau.apache.org'}"</js>
+		}
 	)
 	<jk>public class</jk> SystemPropertiesResource <jk>extends</jk> BasicRestServlet {
 	
@@ -17695,14 +17670,14 @@
 			name=<jsf>GET</jsf>, path=<js>"/"</js>,
 			summary=<js>"Show all system properties"</js>,
 			description=<js>"Returns all system properties defined in the JVM."</js>,
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"query"</js>, name=<js>"sort"</js>, description=<js>"Sort results alphabetically."</js>, _default=<js>"false"</js>)
-				},
-				responses={
-					<ja>@Response</ja>(value=200, description=<js>"Returns a map of key/value pairs."</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'sort',in:'query',description:'Sort results alphabetically',default:'false'}"</js>,
+				<js>"],"</js>,
+				<js>"responses:{"</js>,
+					<js>"200: {description:'Returns a map of key/value pairs.'}"</js>,
+				<js>"}"</js>
+			}
 		)
 		<jk>public</jk> Map getSystemProperties(<ja>@Query</ja>(<js>"sort"</js>) <jk>boolean</jk> sort) <jk>throws</jk> Throwable {
 			<jk>if</jk> (sort)
@@ -17714,14 +17689,14 @@
 			name=<jsf>GET</jsf>, path=<js>"/{propertyName}"</js>,
 			summary=<js>"Get system property"</js>,
 			description=<js>"Returns the value of the specified system property."</js>,
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"propertyName"</js>, description=<js>"The system property name."</js>)
-				},
-				responses={
-					<ja>@Response</ja>(value=200, description=<js>"The system property value, or null if not found."</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'propertyName',in:'path',description:'The system property name.'}"</js>,
+				<js>"],"</js>,
+				<js>"responses:{"</js>,
+					<js>"200: {description:'The system property value, or null if not found.'}"</js>,
+				<js>"}"</js>
+			}
 		)
 		<jk>public</jk> String getSystemProperty(<ja>@Path</ja> String propertyName) <jk>throws</jk> Throwable {
 			<jk>return</jk> System.<jsm>getProperty</jsm>(propertyName);
@@ -17732,20 +17707,16 @@
 			summary=<js>"Replace system property"</js>,
 			description=<js>"Sets a new value for the specified system property."</js>,
 			guards=AdminGuard.<jk>class</jk>,
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"propertyName"</js>, description=<js>"The system property name."</js>),
-					<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"The new system property value."</js>),
-				},
-				responses={
-					<ja>@Response</ja>(value=302,
-						headers={
-							<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"The root URL of this resource."</js>)
-						}
-					),
-					<ja>@Response</ja>(value=403, description=<js>"User is not an admin."</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'propertyName',in:'path',description:'The system property name.'},"</js>,
+					<js>"{in:'body',description:'The new system property value.'}"</js>,
+				<js>"],"</js>,
+				<js>"responses:{"</js>,
+					<js>"302: {headers:{Location:{description:'The root URL of this resource.'}}},"</js>,
+					<js>"403: {description:'User is not an admin.'}"</js>,
+				<js>"}"</js>
+			}
 		)
 		<jk>public</jk> Redirect setSystemProperty(<ja>@Path</ja> String propertyName, <ja>@Body</ja> String value) {
 			System.<jsm>setProperty</jsm>(propertyName, value);
@@ -17757,20 +17728,16 @@
 			summary=<js>"Add an entire set of system properties"</js>,
 			description=<js>"Takes in a map of key/value pairs and creates a set of new system properties."</js>,
 			guards=AdminGuard.<jk>class</jk>,
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"propertyName"</js>, description=<js>"The system property key."</js>),
-					<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"The new system property values."</js>, schema=<js>"{example:{key1:'val1',key2:123}}"</js>),
-				},
-				responses={
-					<ja>@Response</ja>(value=302,
-						headers={
-							<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"The root URL of this resource."</js>)
-						}
-					),
-					<ja>@Response</ja>(value=403, description=<js>"Unauthorized:  User is not an admin."</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'propertyName',in:'path',description:'The system property name.'},"</js>,
+					<js>"{in:'body',description:'The new system property values.',schema:{example:{key1:'val1',key2:123}}}"</js>,
+				<js>"],"</js>,
+				<js>"responses:{"</js>,
+					<js>"302: {headers:{Location:{description:'The root URL of this resource.'}}},"</js>,
+					<js>"403: {description:'User is not an admin.'}"</js>,
+				<js>"}"</js>
+			}
 		)
 		<jk>public</jk> Redirect setSystemProperties(<ja>@Body</ja> java.util.Properties newProperties) {
 			System.<jsm>setProperties</jsm>(newProperties);
@@ -17782,19 +17749,15 @@
 			summary=<js>"Delete system property"</js>,
 			description=<js>"Deletes the specified system property."</js>,
 			guards=AdminGuard.<jk>class</jk>,
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"propertyName"</js>, description=<js>"The system property name."</js>),
-				},
-				responses={
-					<ja>@Response</ja>(value=302,
-						headers={
-							<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"The root URL of this resource."</js>)
-						}
-					),
-					<ja>@Response</ja>(value=403, description=<js>"Unauthorized:  User is not an admin"</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'propertyName',in:'path',description:'The system property name.'}"</js>,
+				<js>"],"</js>,
+				<js>"responses:{"</js>,
+					<js>"302: {headers:{Location:{description:'The root URL of this resource.'}}},"</js>,
+					<js>"403: {description:'User is not an admin.'}"</js>,
+				<js>"}"</js>
+			}
 		)
 		<jk>public</jk> Redirect deleteSystemProperty(<ja>@Path</ja> String propertyName) {
 			System.<jsm>clearProperty</jsm>(propertyName);
@@ -18944,14 +18907,14 @@
 		encoders=GzipEncoder.<jk>class</jk>,
 	
 		<jc>// Swagger info.</jc>
-		swagger=<ja>@ResourceSwagger</ja>(
-			contact=<js>"{name:'John Smith',email:'john@smith.com'}"</js>,
-			license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>,
-			version=<js>"2.0"</js>,
-			termsOfService=<js>"You're on your own."</js>,
-			tags=<js>"[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}]"</js>,
-			externalDocs=<js>"{description:'Home page',url:'http://juneau.apache.org'}"</js>
-		)
+		swagger= {
+			<js>"contact:{name:'John Smith',email:'john@smith.com'},"</js>,
+			<js>"license:{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'},"</js>,
+			<js>"version:'2.0',"</js>,
+			<js>"termsOfService:'You're on your own.',"</js>,
+			<js>"tags:[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}],"</js>,
+			<js>"externalDocs:{description:'Home page',url:'http://juneau.apache.org'}"</js>
+		}
 	) 
 	<jk>public class</jk> AddressBookResource <jk>extends</jk> BasicRestServletJena { 
 		
@@ -20700,11 +20663,11 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/{section}"</js>, 
 			description=<js>"Show config file section."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"section"</js>, description=<js>"Section name."</js>)
-				}
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'section',in:'path',description:'Section name.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> ObjectMap getConfigSection(<ja>@Path</ja>(<js>"section"</js>) String section) <jk>throws</jk> Exception { 
 			<jk>return</jk> getSection(section); 
@@ -20712,12 +20675,12 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/{section}/{key}"</js>, 
 			description=<js>"Show config file entry."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={ 
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"section"</js>, description=<js>"Section name."</js>), 
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"key"</js>, description=<js>"Entry name."</js>) 
-				} 
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'section',in:'path',description:'Section name.'},"</js>,
+					<js>"{name:'key',in:'path',description:'Entry name.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> String getConfigEntry(<ja>@Path</ja>(<js>"section"</js>) String section, <ja>@Path</ja>(<js>"key"</js>) String key) <jk>throws</jk> Exception { 
 			<jk>return</jk> getSection(section).getString(key); 
@@ -20725,11 +20688,11 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>POST</jsf>, path=<js>"/"</js>, 
 			description=<js>"Sets contents of config file from a FORM post."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={ 
-					<ja>@Parameter</ja>(in=<js>"formData"</js>, name=<js>"contents"</js>, description=<js>"New contents in INI file format."</js>) 
-				}
-			) 
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'contents',in:'formData',description:'New contents in INI file format.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> Config setConfigContentsFormPost(<ja>@FormData</ja>(<js>"contents"</js>) String contents) <jk>throws</jk> Exception { 
 			<jk>return</jk> setConfigContents(<jk>new</jk> StringReader(contents)); 
@@ -20737,11 +20700,11 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/"</js>, 
 			description=<js>"Sets contents of config file."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={ 
-					<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"New contents in INI file format."</js>) 
-				} 
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{in:'body',description:'New contents in INI file format.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> Config setConfigContents(<ja>@Body</ja> Reader contents) <jk>throws</jk> Exception { 
 			<jk>return</jk> getServletConfig().getConfig().load(contents, <jk>true</jk>).asMap();
@@ -20749,12 +20712,12 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/{section}"</js>, 
 			description=<js>"Add or overwrite a config file section."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={ 
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"section"</js>, description=<js>"Section name."</js>), 
-					<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"New contents for section as a simple map with string keys and values."</js>) 
-				} 
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'section',in:'path',description:'Section name.'}"</js>,
+					<js>"{in:'body',description:'New contents for section as a simple map with string keys and values.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> ObjectMap setConfigSection(<ja>@Path</ja>(<js>"section"</js>) String section, <ja>@Body</ja> Map&lt;String,String&gt; contents) <jk>throws</jk> Exception { 
 			getServletConfig().getConfig().setSection(section, contents); 
@@ -20763,13 +20726,13 @@
 		
 		<ja>@RestMethod</ja>(name=<jsf>PUT</jsf>, path=<js>"/{section}/{key}"</js>, 
 			description=<js>"Add or overwrite a config file entry."</js>, 
-			swagger=<ja>@MethodSwagger</ja>(
-				parameters={ 
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"section"</js>, description=<js>"Section name."</js>), 
-					<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"key"</js>, description=<js>"Entry name."</js>), 
-					<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"New value as a string."</js>) 
-				} 
-			)
+			swagger={
+				<js>"parameters:["</js>,
+					<js>"{name:'section',in:'path',description:'Section name.'}"</js>,
+					<js>"{name:'key',in:'path',description:'Entry name.'}"</js>,
+					<js>"{in:'body',description:'New value as a string.'}"</js>,
+				<js>"]"</js>
+			}
 		) 
 		<jk>public</jk> String setConfigSection(<ja>@Path</ja>(<js>"section"</js>) String section, <ja>@Path</ja>(<js>"key"</js>) String key, <ja>@Body</ja> String value) <jk>throws</jk> Exception { 
 			getServletConfig().getConfig().put(section, key, value, <jk>false</jk>); 
@@ -20814,11 +20777,11 @@
 			<li>
 				Summary and detail views of the same beans providing different levels of information.
 			<li>
-				The use of the {@link org.apache.juneau.html.annotation.HtmlRender @HtmlRender} annotation.
+				The use of the {@link org.apache.juneau.html.HtmlRender} class.
 			<li>
 				The use of the {@link org.apache.juneau.annotation.BeanProperty#format @BeanProperty(format)} annotation.
 			<li>
-				The use of the {@link org.apache.juneau.rest.converters.Querable} interface.
+				The use of the {@link org.apache.juneau.rest.converters.Queryable} interface.
 		</ul>
 		
 		<h5 class='figure'>PetStoreResource.java</h5>
@@ -21300,6 +21263,9 @@
 		<h5 class='topic w800'>juneau-server</h5>
 		<ul class='spaced-list'>
 			<li>
+				Simplified {@link org.apache.juneau.rest.annotation.RestResource#swagger() @RestResource(swagger)}
+				and {@link org.apache.juneau.rest.annotation.RestMethod#swagger() @RestMethod(swagger)} annotations.
+			<li>
 				Fixed bug in <code>UriResolver</code> when request path info had special characters.
 			<li>
 				Fixed bug where incorrect media type was being set on responses (e.g. <code>text/html+schema</code> instead of <code>text/html</code> for schema documents).
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/SystemPropertiesResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/SystemPropertiesResource.java
index 5c56c7d..fafba3d 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/SystemPropertiesResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/SystemPropertiesResource.java
@@ -78,14 +78,14 @@ import org.apache.juneau.rest.widget.*;
 	// Support GZIP encoding on Accept-Encoding header.
 	encoders=GzipEncoder.class,
 
-	swagger=@ResourceSwagger(
-		contact="{name:'John Smith',email:'john@smith.com'}",
-		license="{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}",
-		version="2.0",
-		termsOfService="You're on your own.",
-		tags="[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}]",
-		externalDocs="{description:'Home page',url:'http://juneau.apache.org'}"
-	) 
+	swagger={
+		"contact:{name:'John Smith',email:'john@smith.com'},",
+		"license:{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'},",
+		"version:'2.0',",
+		"termsOfService:'You are on your own.',",
+		"tags:[{name:'Java',description:'Java utility'}],",
+		"externalDocs:{description:'Home page',url:'http://juneau.apache.org'}"
+	}
 )
 public class SystemPropertiesResource extends BasicRestServlet {
 	private static final long serialVersionUID = 1L;
@@ -94,14 +94,14 @@ public class SystemPropertiesResource extends BasicRestServlet {
 		name=GET, path="/",
 		summary="Show all system properties",
 		description="Returns all system properties defined in the JVM.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="query", name="sort", description="Sort results alphabetically.", _default="false")
-			},
-			responses={
-				@Response(value=200, description="Returns a map of key/value pairs.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'sort',in:'query',description:'Sort results alphabetically',default:'false'}",
+			"],",
+			"responses:{",
+				"200: {description:'Returns a map of key/value pairs.'}",
+			"}"
+		}
 	)
 	@SuppressWarnings({"rawtypes", "unchecked"})
 	public Map getSystemProperties(@Query("sort") boolean sort) throws Throwable {
@@ -114,14 +114,14 @@ public class SystemPropertiesResource extends BasicRestServlet {
 		name=GET, path="/{propertyName}",
 		summary="Get system property",
 		description="Returns the value of the specified system property.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="propertyName", description="The system property name.")
-			},
-			responses={
-				@Response(value=200, description="The system property value, or null if not found.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'propertyName',in:'path',description:'The system property name.'}",
+			"],",
+			"responses:{",
+				"200: {description:'The system property value, or null if not found.'}",
+			"}"
+		}
 	)
 	public String getSystemProperty(@Path String propertyName) throws Throwable {
 		return System.getProperty(propertyName);
@@ -132,20 +132,16 @@ public class SystemPropertiesResource extends BasicRestServlet {
 		summary="Replace system property",
 		description="Sets a new value for the specified system property.",
 		guards=AdminGuard.class,
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="propertyName", description="The system property name."),
-				@Parameter(in="body", description="The new system property value."),
-			},
-			responses={
-				@Response(value=302,
-					headers={
-						@Parameter(name="Location", description="The root URL of this resource.")
-					}
-				),
-				@Response(value=403, description="User is not an admin.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'propertyName',in:'path',description:'The system property name.'},",
+				"{in:'body',description:'The new system property value.'}",
+			"],",
+			"responses:{",
+				"302: {headers:{Location:{description:'The root URL of this resource.'}}},",
+				"403: {description:'User is not an admin.'}",
+			"}"
+		}
 	)
 	public Redirect setSystemProperty(@Path String propertyName, @Body String value) {
 		System.setProperty(propertyName, value);
@@ -157,20 +153,16 @@ public class SystemPropertiesResource extends BasicRestServlet {
 		summary="Add an entire set of system properties",
 		description="Takes in a map of key/value pairs and creates a set of new system properties.",
 		guards=AdminGuard.class,
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="propertyName", description="The system property key."),
-				@Parameter(in="body", description="The new system property values.", schema="{example:{key1:'val1',key2:123}}"),
-			},
-			responses={
-				@Response(value=302,
-					headers={
-						@Parameter(name="Location", description="The root URL of this resource.")
-					}
-				),
-				@Response(value=403, description="Unauthorized:  User is not an admin.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'propertyName',in:'path',description:'The system property name.'},",
+				"{in:'body',description:'The new system property values.',schema:{example:{key1:'val1',key2:123}}}",
+			"],",
+			"responses:{",
+				"302: {headers:{Location:{description:'The root URL of this resource.'}}},",
+				"403: {description:'User is not an admin.'}",
+			"}"
+		}
 	)
 	public Redirect setSystemProperties(@Body java.util.Properties newProperties) {
 		System.setProperties(newProperties);
@@ -182,19 +174,15 @@ public class SystemPropertiesResource extends BasicRestServlet {
 		summary="Delete system property",
 		description="Deletes the specified system property.",
 		guards=AdminGuard.class,
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="propertyName", description="The system property name."),
-			},
-			responses={
-				@Response(value=302,
-					headers={
-						@Parameter(name="Location", description="The root URL of this resource.")
-					}
-				),
-				@Response(value=403, description="Unauthorized:  User is not an admin")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'propertyName',in:'path',description:'The system property name.'}",
+			"],",
+			"responses:{",
+				"302: {headers:{Location:{description:'The root URL of this resource.'}}},",
+				"403: {description:'User is not an admin.'}",
+			"}"
+		}
 	)
 	public Redirect deleteSystemProperty(@Path String propertyName) {
 		System.clearProperty(propertyName);
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/addressbook/AddressBookResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/addressbook/AddressBookResource.java
index 20713ca..cffd736 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/addressbook/AddressBookResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/addressbook/AddressBookResource.java
@@ -114,14 +114,14 @@ import org.apache.juneau.utils.*;
 	encoders=GzipEncoder.class,
 
 	// Swagger info.
-	swagger=@ResourceSwagger(
-		contact="{name:'John Smith',email:'john@smith.com'}",
-		license="{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}",
-		version="2.0",
-		termsOfService="You're on your own.",
-		tags="[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}]",
-		externalDocs="{description:'Home page',url:'http://juneau.apache.org'}"
-	)
+	swagger= {
+		"contact:{name:'John Smith',email:'john@smith.com'},",
+		"license:{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'},",
+		"version:'2.0',",
+		"termsOfService:'You're on your own.',",
+		"tags:[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}],",
+		"externalDocs:{description:'Home page',url:'http://juneau.apache.org'}"
+	}
 )
 public class AddressBookResource extends BasicRestServletJena {
 	private static final long serialVersionUID = 1L;
diff --git a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
index d42919d..4d27d6d 100755
--- a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
+++ b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
@@ -86,11 +86,11 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=GET, path="/{section}",
 		description="Show config file section.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="section", description="Section name.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'section',in:'path',description:'Section name.'}",
+			"]"
+		}
 	)
 	public ObjectMap getConfigSection(@Path("section") String section) throws Exception {
 		return getSection(section);
@@ -106,12 +106,12 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=GET, path="/{section}/{key}",
 		description="Show config file entry.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="section", description="Section name."),
-				@Parameter(in="path", name="key", description="Entry name.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'section',in:'path',description:'Section name.'},",
+				"{name:'key',in:'path',description:'Entry name.'}",
+			"]"
+		}
 	)
 	public String getConfigEntry(@Path("section") String section, @Path("key") String key) throws Exception {
 		return getSection(section).getString(key);
@@ -126,11 +126,11 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=POST, path="/",
 		description="Sets contents of config file from a FORM post.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="formData", name="contents", description="New contents in INI file format.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'contents',in:'formData',description:'New contents in INI file format.'}",
+			"]"
+		}
 	)
 	public ObjectMap setConfigContentsFormPost(@FormData("contents") String contents) throws Exception {
 		return setConfigContents(new StringReader(contents));
@@ -145,11 +145,11 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=PUT, path="/",
 		description="Sets contents of config file.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="body", description="New contents in INI file format.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{in:'body',description:'New contents in INI file format.'}",
+			"]"
+		}
 	)
 	public ObjectMap setConfigContents(@Body Reader contents) throws Exception {
 		return getServletConfig().getConfig().load(contents, true).asMap();
@@ -165,12 +165,12 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=PUT, path="/{section}",
 		description="Add or overwrite a config file section.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="section", description="Section name."),
-				@Parameter(in="body", description="New contents for section as a simple map with string keys and values.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'section',in:'path',description:'Section name.'}",
+				"{in:'body',description:'New contents for section as a simple map with string keys and values.'}",
+			"]"
+		}
 	)
 	public ObjectMap setConfigSection(@Path("section") String section, @Body Map<String,Object> contents) throws Exception {
 		getServletConfig().getConfig().setSection(section, null, contents);
@@ -188,13 +188,13 @@ public class ConfigResource extends BasicRestServlet {
 	 */
 	@RestMethod(name=PUT, path="/{section}/{key}",
 		description="Add or overwrite a config file entry.",
-		swagger=@MethodSwagger(
-			parameters={
-				@Parameter(in="path", name="section", description="Section name."),
-				@Parameter(in="path", name="key", description="Entry name."),
-				@Parameter(in="body", description="New value as a string.")
-			}
-		)
+		swagger={
+			"parameters:[",
+				"{name:'section',in:'path',description:'Section name.'}",
+				"{name:'key',in:'path',description:'Entry name.'}",
+				"{in:'body',description:'New value as a string.'}",
+			"]"
+		}
 	)
 	public String setConfigSection(@Path("section") String section, @Path("key") String key, @Body String value) throws Exception {
 		getServletConfig().getConfig().set(section + '/' + key, value);
diff --git a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
index a90ab98..6ba43d1 100755
--- a/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
+++ b/juneau-microservice/juneau-microservice-server/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
@@ -91,9 +91,12 @@ public class LogsResource extends BasicRestServlet {
 	@RestMethod(
 		name=GET,
 		path="/*",
-		swagger=@MethodSwagger(
-			responses={@Response(200),@Response(404)}
-		)
+		swagger= {
+			"responses:{",
+				"200: {description:'OK'},",
+				"404: {description:'Not Found'}",
+			"}"
+		}
 	)
 	public Object getFileOrDirectory(RestRequest req, RestResponse res, RequestProperties properties, @PathRemainder String path) throws Exception {
 
@@ -132,9 +135,12 @@ public class LogsResource extends BasicRestServlet {
 	@RestMethod(
 		name="VIEW",
 		path="/*",
-		swagger=@MethodSwagger(
-			responses={@Response(200),@Response(404)}
-		)
+		swagger= {
+			"responses:{",
+				"200: {description:'OK'},",
+				"404: {description:'Not Found'}",
+			"}"
+		}
 	)
 	public void viewFile(RestRequest req, RestResponse res, @PathRemainder String path, RequestProperties properties, @Query("highlight") boolean highlight, @Query("start") String start, @Query("end") String end, @Query("thread") String thread, @Query("loggers") String[] loggers, @Query("severity") String[] severity) throws Exception {
 
@@ -200,9 +206,12 @@ public class LogsResource extends BasicRestServlet {
 		name="PARSE",
 		path="/*",
 		converters=Queryable.class,
-		swagger=@MethodSwagger(
-			responses={@Response(200),@Response(404)}
-		)
+		swagger= {
+			"responses:{",
+				"200: {description:'OK'},",
+				"404: {description:'Not Found'}",
+			"}"
+		}
 	)
 	public LogParser viewParsedEntries(RestRequest req, @PathRemainder String path, @Query("start") String start, @Query("end") String end, @Query("thread") String thread, @Query("loggers") String[] loggers, @Query("severity") String[] severity) throws Exception {
 
@@ -226,9 +235,12 @@ public class LogsResource extends BasicRestServlet {
 	@RestMethod(
 		name="DOWNLOAD",
 		path="/*",
-		swagger=@MethodSwagger(
-			responses={@Response(200),@Response(404)}
-		)
+		swagger= {
+			"responses:{",
+				"200: {description:'OK'},",
+				"404: {description:'Not Found'}",
+			"}"
+		}
 	)
 	public Object downloadFile(RestResponse res, @PathRemainder String path) throws Exception {
 
@@ -252,9 +264,12 @@ public class LogsResource extends BasicRestServlet {
 	@RestMethod(
 		name=DELETE,
 		path="/*",
-		swagger=@MethodSwagger(
-			responses={@Response(200),@Response(404)}
-		)
+		swagger= {
+			"responses:{",
+				"200: {description:'OK'},",
+				"404: {description:'Not Found'}",
+			"}"
+		}
 	)
 	public Object deleteFile(@PathRemainder String path) throws Exception {
 
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsResource.java
index 46fbab8..279e702 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/NlsResource.java
@@ -50,26 +50,21 @@ public class NlsResource extends BasicRestServletGroup {
 		@RestMethod(
 			name=POST, path="/{a}",
 			description="Test1.c",
-			swagger=@MethodSwagger(
-				parameters={
-					@Parameter(in="path", name="a", description="Test1.d"),
-					@Parameter(in="query", name="b", description="Test1.e"),
-					@Parameter(in="body", description="Test1.f"),
-					@Parameter(in="header", name="D", description="Test1.g"),
-					@Parameter(in="path", name="a2", description="Test1.h"),
-					@Parameter(in="query", name="b2", description="Test1.i"),
-					@Parameter(in="header", name="D2", description="Test1.j"),
-				},
-				responses={
-					@Response(200),
-					@Response(value=201,
-						description="Test1.l",
-						headers={
-							@Parameter(in="foo", name="bar", description="Test1.m"),
-						}
-					)
-				}
-			)
+			swagger= {
+				"parameters:[",
+					"{name:'a',in:'path',type:'string',description:'Test1.d'},",
+					"{name:'b',in:'query',type:'string',description:'Test1.e'},",
+					"{in:'body',type:'string',description:'Test1.f'},",
+					"{name:'D',in:'header',type:'string',description:'Test1.g'},",
+					"{name:'a2',in:'path',type:'string',description:'Test1.h'},",
+					"{name:'b2',in:'query',type:'string',description:'Test1.i'},",
+					"{name:'D2',in:'header',type:'string',description:'Test1.j'}",
+				"],",
+				"responses:{",
+					"200: {description:'OK'},",
+					"201: {description:'Test1.l',headers:{bar:{description:'Test1.m',type:'string'}}}",
+				"}"
+			}
 		)
 		public String test1(@Path("a") String a, @Query("b") String b, @Body String c, @Header("D") String d,
 				@Path("e") String e, @Query("f") String f, @Header("g") String g) {
@@ -170,26 +165,21 @@ public class NlsResource extends BasicRestServletGroup {
 		@RestMethod(
 			name=POST, path="/{a}",
 			description="$L{foo}",
-			swagger=@MethodSwagger(
-				parameters={
-					@Parameter(in="path", name="a", description="$L{foo}"),
-					@Parameter(in="query", name="b", description="$L{foo}"),
-					@Parameter(in="body", description="$L{foo}"),
-					@Parameter(in="header", name="D", description="$L{foo}"),
-					@Parameter(in="path", name="a2", description="$L{foo}"),
-					@Parameter(in="query", name="b2", description="$L{foo}"),
-					@Parameter(in="header", name="D2", description="$L{foo}")
-				},
-				responses={
-					@Response(200),
-					@Response(value=201,
-						description="$L{foo}",
-						headers={
-							@Parameter(in="foo", name="bar", description="$L{foo}"),
-						}
-					)
-				}
-			)
+			swagger= {
+				"parameters:[",
+					"{name:'a',in:'path',description:'$L{foo}'},",
+					"{name:'b',in:'query',description:'$L{foo}'},",
+					"{in:'body',description:'$L{foo}'},",
+					"{name:'D',in:'header',description:'$L{foo}'},",
+					"{name:'a2',in:'path',description:'$L{foo}'},",
+					"{name:'b2',in:'query',description:'$L{foo}'},",
+					"{name:'D2',in:'header',description:'$L{foo}'}",
+				"],",
+				"responses:{",
+					"200: {description:'OK'},",
+					"201: {description:'$L{foo}',headers:{bar:{description:'$L{foo}',type:'string'}}}",
+				"}"
+			}
 		)
 		public String test6(@Path("a") String a, @Query("b") String b, @Body String c, @Header("D") String d,
 				@Path("e") String e, @Query("f") String f, @Header("g") String g) {
diff --git a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OptionsWithoutNlsResource.java b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OptionsWithoutNlsResource.java
index 055c62d..023815b 100644
--- a/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OptionsWithoutNlsResource.java
+++ b/juneau-microservice/juneau-microservice-test/src/main/java/org/apache/juneau/rest/test/OptionsWithoutNlsResource.java
@@ -22,7 +22,8 @@ import org.apache.juneau.rest.annotation.*;
  * JUnit automated testcase resource.
  */
 @RestResource(
-	path="/testOptionsWithoutNls"
+	path="/testOptionsWithoutNls",
+	title="test"
 )
 public class OptionsWithoutNlsResource extends BasicRestServlet {
 	private static final long serialVersionUID = 1L;
@@ -30,7 +31,7 @@ public class OptionsWithoutNlsResource extends BasicRestServlet {
 	//====================================================================================================
 	// Should get to the options page without errors
 	//====================================================================================================
-	@RestMethod(name=OPTIONS, path="/testOptions/*")
+	@RestMethod(name=OPTIONS, path="/testOptions/*", description="test")
 	public Swagger testOptions(RestRequest req) {
 		return req.getSwagger();
 	}
@@ -42,5 +43,4 @@ public class OptionsWithoutNlsResource extends BasicRestServlet {
 	public String test(RestRequest req) {
 		return req.getMessage("bad", 1, 2, 3);
 	}
-
 }
diff --git a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/NlsTest.java b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/NlsTest.java
index 1cb00c6..6f5aeb4 100644
--- a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/NlsTest.java
+++ b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/NlsTest.java
@@ -31,7 +31,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test1").getResponse(Swagger.class);
 		assertObjectEquals("{title:'Test1.a',description:'Test1.b'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'Test1.f'},{'in':'header',name:'D',type:'string',description:'Test1.g'},{'in':'header',name:'D2',type:'string',description:'Test1.j'},{'in':'header',name:'g'},{'in':'path',name:'a',type:'string',description:'Test1.d',required:true},{'in':'path',name:'a2',type:'string',description:'Test1.h',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',type:'string',description:'Test1.e'},{'in':'query',name:'b2',type:'string',des [...]
+		assertObjectEquals("[{'in':'path',name:'a',type:'string',description:'Test1.d',required:true},{'in':'query',name:'b',type:'string',description:'Test1.e'},{'in':'body',type:'string',description:'Test1.f'},{'in':'header',name:'D',type:'string',description:'Test1.g'},{'in':'path',name:'a2',type:'string',description:'Test1.h',required:true},{'in':'query',name:'b2',type:'string',description:'Test1.i'},{'in':'header',name:'D2',type:'string',description:'Test1.j'},{'in':'path',name:'e',requir [...]
 		assertObjectEquals("{'200':{description:'OK'},'201':{description:'Test1.l',headers:{bar:{description:'Test1.m',type:'string'}}}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 
@@ -43,7 +43,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test2").getResponse(Swagger.class);
 		assertObjectEquals("{title:'Test2.a',description:'Test2.b'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'Test2.f'},{'in':'header',name:'D',description:'Test2.g'},{'in':'header',name:'D2',description:'Test2.j'},{'in':'header',name:'g'},{'in':'path',name:'a',description:'Test2.d',required:true},{'in':'path',name:'a2',description:'Test2.h',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',description:'Test2.e'},{'in':'query',name:'b2',description:'Test2.i'},{'in':'query',name:'f'}]", s.getPaths().get("/{a}").get("post"). [...]
+		assertObjectEquals("[{'in':'path',name:'a',description:'Test2.d',required:true},{'in':'query',name:'b',description:'Test2.e'},{'in':'body',description:'Test2.f'},{'in':'header',name:'D',description:'Test2.g'},{'in':'path',name:'a2',description:'Test2.h',required:true},{'in':'query',name:'b2',description:'Test2.i'},{'in':'header',name:'D2',description:'Test2.j'},{'in':'path',name:'e',required:true},{'in':'query',name:'f'},{'in':'header',name:'g'}]", s.getPaths().get("/{a}").get("post"). [...]
 		assertObjectEquals("{'200':{description:'OK2'},'201':{description:'Test2.l'}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 
@@ -55,7 +55,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test3").getResponse(Swagger.class);
 		assertObjectEquals("{title:'Test3.a',description:'Test3.b'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'Test3.f'},{'in':'header',name:'D',description:'Test3.g'},{'in':'header',name:'D2',description:'Test3.j'},{'in':'header',name:'g'},{'in':'path',name:'a',description:'Test3.d',required:true},{'in':'path',name:'a2',description:'Test3.h',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',description:'Test3.e'},{'in':'query',name:'b2',description:'Test3.i'},{'in':'query',name:'f'}]", s.getPaths().get("/{a}").get("post"). [...]
+		assertObjectEquals("[{'in':'path',name:'a',description:'Test3.d',required:true},{'in':'query',name:'b',description:'Test3.e'},{'in':'body',description:'Test3.f'},{'in':'header',name:'D',description:'Test3.g'},{'in':'path',name:'a2',description:'Test3.h',required:true},{'in':'query',name:'b2',description:'Test3.i'},{'in':'header',name:'D2',description:'Test3.j'},{'in':'path',name:'e',required:true},{'in':'query',name:'f'},{'in':'header',name:'g'}]", s.getPaths().get("/{a}").get("post"). [...]
 		assertObjectEquals("{'200':{description:'OK3'},'201':{description:'Test3.l'}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 
@@ -67,7 +67,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test4").getResponse(Swagger.class);
 		assertObjectEquals("{title:'baz',description:'baz'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'baz'},{'in':'header',name:'D',description:'baz'},{'in':'header',name:'D2',description:'baz'},{'in':'header',name:'g'},{'in':'path',name:'a',description:'baz',required:true},{'in':'path',name:'a2',description:'baz',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',description:'baz'},{'in':'query',name:'b2',description:'baz'},{'in':'query',name:'f'}]", s.getPaths().get("/{a}").get("post").getParameters());
+		assertObjectEquals("[{'in':'path',name:'a',description:'baz',required:true},{'in':'query',name:'b',description:'baz'},{'in':'body',description:'baz'},{'in':'header',name:'D',description:'baz'},{'in':'path',name:'a2',description:'baz',required:true},{'in':'query',name:'b2',description:'baz'},{'in':'header',name:'D2',description:'baz'},{'in':'path',name:'e',required:true},{'in':'query',name:'f'},{'in':'header',name:'g'}]", s.getPaths().get("/{a}").get("post").getParameters());
 		assertObjectEquals("{'200':{description:'foobazfoobazfoo'},'201':{description:'baz'}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 
@@ -79,7 +79,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test5").getResponse(Swagger.class);
 		assertObjectEquals("{title:'baz2',description:'baz2'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'baz2'},{'in':'header',name:'D',description:'baz2'},{'in':'header',name:'D2',description:'baz2'},{'in':'header',name:'g'},{'in':'path',name:'a',description:'baz2',required:true},{'in':'path',name:'a2',description:'baz2',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',description:'baz2'},{'in':'query',name:'b2',description:'baz2'},{'in':'query',name:'f'}]", s.getPaths().get("/{a}").get("post").getParameters());
+		assertObjectEquals("[{'in':'path',name:'a',description:'baz2',required:true},{'in':'query',name:'b',description:'baz2'},{'in':'body',description:'baz2'},{'in':'header',name:'D',description:'baz2'},{'in':'path',name:'a2',description:'baz2',required:true},{'in':'query',name:'b2',description:'baz2'},{'in':'header',name:'D2',description:'baz2'},{'in':'path',name:'e',required:true},{'in':'query',name:'f'},{'in':'header',name:'g'}]", s.getPaths().get("/{a}").get("post").getParameters());
 		assertObjectEquals("{'200':{description:'foobaz2foobaz2foo'},'201':{description:'baz2'}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 
@@ -91,7 +91,7 @@ public class NlsTest extends RestTestcase {
 
 		Swagger s = client.doOptions(URL + "/test6").getResponse(Swagger.class);
 		assertObjectEquals("{title:'baz',description:'baz'}", s.getInfo());
-		assertObjectEquals("[{'in':'body',description:'baz'},{'in':'header',name:'D',type:'string',description:'baz'},{'in':'header',name:'D2',type:'string',description:'baz'},{'in':'header',name:'g'},{'in':'path',name:'a',type:'string',description:'baz',required:true},{'in':'path',name:'a2',type:'string',description:'baz',required:true},{'in':'path',name:'e',required:true},{'in':'query',name:'b',type:'string',description:'baz'},{'in':'query',name:'b2',type:'string',description:'baz'},{'in':'q [...]
+		assertObjectEquals("[{'in':'path',name:'a',description:'baz',required:true},{'in':'query',name:'b',description:'baz'},{'in':'body',description:'baz'},{'in':'header',name:'D',description:'baz'},{'in':'path',name:'a2',description:'baz',required:true},{'in':'query',name:'b2',description:'baz'},{'in':'header',name:'D2',description:'baz'},{'in':'path',name:'e',required:true},{'in':'query',name:'f'},{'in':'header',name:'g'}]", s.getPaths().get("/{a}").get("post").getParameters());
 		assertObjectEquals("{'200':{description:'OK'},'201':{description:'baz',headers:{bar:{description:'baz',type:'string'}}}}", s.getPaths().get("/{a}").get("post").getResponses());
 	}
 }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestInfoProvider.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestInfoProvider.java
index 34a6ea2..3f79a42 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestInfoProvider.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/BasicRestInfoProvider.java
@@ -12,14 +12,14 @@
 // ***************************************************************************************************************************
 package org.apache.juneau.rest;
 
-import static javax.servlet.http.HttpServletResponse.*;
-import static org.apache.juneau.dto.swagger.SwaggerBuilder.*;
 import static org.apache.juneau.internal.ReflectionUtils.*;
+import static org.apache.juneau.internal.StringUtils.*;
 
 import java.lang.reflect.Method;
 import java.util.*;
 import java.util.concurrent.*;
 
+import org.apache.juneau.*;
 import org.apache.juneau.dto.swagger.*;
 import org.apache.juneau.http.*;
 import org.apache.juneau.internal.*;
@@ -27,6 +27,7 @@ import org.apache.juneau.json.*;
 import org.apache.juneau.parser.*;
 import org.apache.juneau.rest.annotation.*;
 import org.apache.juneau.svl.*;
+import org.apache.juneau.utils.*;
 
 /**
  * Default implementation of {@link RestInfoProvider}.
@@ -46,13 +47,7 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 	private final String
 		siteName,
 		title,
-		description,
-		termsOfService,
-		contact,
-		license,
-		version,
-		tags,
-		externalDocs;
+		description;
 	private final ConcurrentHashMap<Locale,Swagger> swaggers = new ConcurrentHashMap<>();
 
 	/**
@@ -67,26 +62,14 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 		this.siteName = b.siteName;
 		this.title = b.title;
 		this.description = b.description;
-		this.termsOfService = b.termsOfService;
-		this.contact = b.contact;
-		this.license = b.license;
-		this.version = b.version;
-		this.tags = b.tags;
-		this.externalDocs = b.externalDocs;
 	}
 
 	private static final class Builder {
 		String
 			siteName,
 			title,
-			description,
-			termsOfService,
-			contact,
-			license,
-			version,
-			tags,
-			externalDocs;
-
+			description;
+		
 		Builder(RestContext context) {
 
 			LinkedHashMap<Class<?>,RestResource> restResourceAnnotationsParentFirst = findAnnotationsMapParentFirst(RestResource.class, context.getResource().getClass());
@@ -98,49 +81,11 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 					title = r.title();
 				if (! r.description().isEmpty())
 					description = r.description();
-				ResourceSwagger sr = r.swagger();
-				if (! sr.termsOfService().isEmpty())
-					termsOfService = sr.termsOfService();
-				if (! sr.contact().isEmpty())
-					contact = sr.contact();
-				if (! sr.license().isEmpty())
-					license = sr.license();
-				if (! sr.version().isEmpty())
-					version = sr.version();
-				if (! sr.tags().isEmpty())
-					tags = sr.tags();
-				if (! sr.externalDocs().isEmpty())
-					externalDocs = sr.externalDocs();
 			}
 		}
 	}
 
 	/**
-	 * Returns the localized Swagger from the file system.
-	 * 
-	 * <p>
-	 * Looks for a file called <js>"{ServletClass}_{locale}.json"</js> in the same package as this servlet and returns
-	 * it as a parsed {@link Swagger} object.
-	 * 
-	 * <p>
-	 * Returned objects are cached per-locale for later quick-lookup.
-	 * 
-	 * @param req The incoming HTTP request.
-	 * @return The parsed swagger object, or <jk>null</jk> if none could be found.
-	 * @throws Exception 
-	 * 	If swagger file was not valid JSON.
-	 */
-	public Swagger getSwaggerFromFile(RestRequest req) throws Exception {
-		Locale locale = req.getLocale();
-		Swagger s = swaggers.get(locale);
-		if (s == null) {
-			s = context.getClasspathResource(Swagger.class, MediaType.JSON, getClass().getSimpleName() + ".json", locale);
-			swaggers.putIfAbsent(locale, s == null ? Swagger.NULL : s);
-		}
-		return s == Swagger.NULL ? null : s;
-	}
-
-	/**
 	 * Returns the localized swagger for this REST resource.
 	 * 
 	 * <p>
@@ -155,68 +100,208 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 	@Override /* RestInfoProvider */
 	public Swagger getSwagger(RestRequest req) throws Exception {
 		
-		// If a file is defined, use that.
-		Swagger s = getSwaggerFromFile(req);
+		Locale locale = req.getLocale();
+		
+		Swagger s = swaggers.get(locale);
 		if (s != null)
 			return s;
 
-		s = swagger(
-			info(getTitle(req), getVersion(req))
-				.contact(getContact(req))
-				.license(getLicense(req))
-				.description(getDescription(req))
-				.termsOfService(getTermsOfService(req))
-			)
-			.consumes(getConsumes(req))
-			.produces(getProduces(req))
-			.tags(getTags(req))
-			.externalDocs(getExternalDocs(req));
+		VarResolverSession vr = req.getVarResolverSession();
+		JsonParser jp = JsonParser.DEFAULT;
+		MessageBundle mb = context.getMessages();
+		
+		ObjectMap om = context.getClasspathResource(ObjectMap.class, MediaType.JSON, getClass().getSimpleName() + ".json", locale);
+		if (om == null)
+			om = new ObjectMap();
+		
+		LinkedHashMap<Class<?>,RestResource> restResourceAnnotationsParentFirst = findAnnotationsMapParentFirst(RestResource.class, context.getResource().getClass());
+
+		for (RestResource r : restResourceAnnotationsParentFirst.values()) {
+			if (r.swagger().length > 0) {
+				try {
+					String json = vr.resolve(StringUtils.join(r.swagger(), '\n').trim());
+					if (! (json.startsWith("{") && json.endsWith("}")))
+						json = "{\n" + json + "\n}";
+					om.putAll(new ObjectMap(json));
+				} catch (ParseException e) {
+					throw new ParseException("Malformed swagger JSON encountered in @RestResource(swagger) on class "+context.getResource().getClass().getName()+".").initCause(e);
+				}
+			}
+		}
+
+		String title = this.title;
+		if (title == null)
+			title = mb.findFirstString(locale, "title");
+		if (title != null) 
+			getInfo(om).put("title", vr.resolve(title));
+
+		String description = this.description;
+		if (description == null)
+			description = mb.findFirstString(locale, "description");
+		if (description != null) 
+			getInfo(om).put("description", vr.resolve(description));
+		
+		String version = mb.findFirstString(locale, "version");
+		if (version != null) 
+			getInfo(om).put("version", vr.resolve(version));
+		
+		String contact = mb.findFirstString(locale, "contact");
+		if (contact != null) 
+			getInfo(om).put("contact", jp.parse(vr.resolve(contact), ObjectMap.class));
+		
+		String license = mb.findFirstString(locale, "license");
+		if (license != null) 
+			getInfo(om).put("license", jp.parse(vr.resolve(license), ObjectMap.class));
+		
+		String termsOfService = mb.findFirstString(locale, "termsOfService");
+		if (termsOfService != null) 
+			getInfo(om).put("termsOfService", vr.resolve(termsOfService));
+		
+		if (! om.containsKey("consumes")) {
+			List<MediaType> consumes = req.getContext().getConsumes();
+			if (! consumes.isEmpty())
+				om.put("consumes", consumes);
+		}
 
+		if (! om.containsKey("produces")) {
+			List<MediaType> produces = req.getContext().getProduces();
+			if (! produces.isEmpty())
+				om.put("produces", produces);
+		}
+			
+		String tags = mb.findFirstString(locale, "tags");
+		if (tags != null)
+			om.put("tags", jp.parse(vr.resolve(tags), ObjectList.class));
+
+		String externalDocs = mb.findFirstString(locale, "externalDocs");
+		if (externalDocs != null)
+			om.put("externalDocs", jp.parse(vr.resolve(externalDocs), ObjectMap.class));
+		
 		for (RestJavaMethod sm : context.getCallMethods().values()) {
 			if (sm.isRequestAllowed(req)) {
 				Method m = sm.method;
-				Operation o = operation()
-					.operationId(getMethodOperationId(m, req))
-					.description(getMethodDescription(m, req))
-					.tags(getMethodTags(m, req))
-					.summary(getMethodSummary(m, req))
-					.externalDocs(getMethodExternalDocs(m, req))
-					.parameters(getMethodParameters(m, req))
-					.responses(getMethodResponses(m, req));
+				RestMethod rm = m.getAnnotation(RestMethod.class);
+				String mn = m.getName(), cn = m.getClass().getName();
+				
+				ObjectMap mom = getOperation(om, sm.getPathPattern(), sm.getHttpMethod().toLowerCase());
+				
+				if (rm.swagger().length > 0) {
+					try {
+						String json = vr.resolve(StringUtils.join(rm.swagger(), '\n').trim());
+						if (! (json.startsWith("{") && json.endsWith("}")))
+							json = "{\n" + json + "\n}";
+						mom.putAll(new ObjectMap(json));
+					} catch (ParseException e) {
+						throw new ParseException("Malformed swagger JSON encountered in @RestMethod(swagger) on method "+mn+" on class "+cn+".").initCause(e);
+					}
+				}
 
-				if (isDeprecated(m, req))
-					o.deprecated(true);
+				mom.put("operationId", mn);
+				
+				String mDescription = rm.description();
+				if (mDescription.isEmpty())
+					mDescription = mb.findFirstString(locale, mn + ".description");
+				if (mDescription != null)
+					mom.put("description", vr.resolve(mDescription));
+				
+				String mTags = mb.findFirstString(locale, mn + ".tags");
+				if (mTags != null) {
+					mTags = vr.resolve(mTags);
+					if (StringUtils.isObjectList(mTags)) 
+						mom.put("tags", jp.parse(mTags, ArrayList.class, String.class));
+					else
+						mom.put("tags", Arrays.asList(StringUtils.split(mTags)));
+				}
 				
-				o.consumes(getMethodConsumes(m, req));
-				o.produces(getMethodProduces(m, req));
+				String mSummary = mb.findFirstString(locale, mn + ".summary");
+				if (mSummary != null)
+					mom.put("summary", vr.resolve(mSummary));
 
-				s.path(
-					sm.getPathPattern(),
-					sm.getHttpMethod().toLowerCase(),
-					o
-				);
+				String mExternalDocs = mb.findFirstString(locale, mn + ".externalDocs");
+				if (mExternalDocs != null) 
+					mom.put("externalDocs", jp.parse(vr.resolve(s), ObjectMap.class));
+				
+				Map<String,ObjectMap> paramMap = new LinkedHashMap<>();
+
+				ObjectList parameters = mom.getObjectList("parameters");
+				if (parameters != null) {
+					for (ObjectMap param : parameters.elements(ObjectMap.class)) {
+						String key = param.getString("in") + '.' + param.getString("name");
+						paramMap.put(key, param);
+					}
+				}
+			
+				String mParameters = mb.findFirstString(locale, mn + ".parameters");
+				if (mParameters != null) {
+					ObjectList ol = jp.parse(vr.resolve(mParameters), ObjectList.class);
+					for (ObjectMap param : ol.elements(ObjectMap.class)) {
+						String key = param.getString("in") + '.' + param.getString("name");
+						if (paramMap.containsKey(key))
+							paramMap.get(key).putAll(param);
+						else
+							paramMap.put(key, param);
+					}
+				}
+				
+				// Finally, look for parameters defined on method.
+				for (RestParam mp : context.getRestParams(m)) {
+					RestParamType in = mp.getParamType();
+					if (in != RestParamType.OTHER) {
+						String key = in.toString() + '.' + (in == RestParamType.BODY ? null : mp.getName());
+						ObjectMap param = new ObjectMap().append("in", in);
+						if (in != RestParamType.BODY)
+							param.append("name", mp.name);
+						if (paramMap.containsKey(key)) {
+							paramMap.get(key).putAll(param);
+						} else {
+							paramMap.put(key, param);
+						}
+					}
+				}
+				
+				if (! paramMap.isEmpty())
+					mom.put("parameters", paramMap.values());
+				
+				String mResponses = mb.findFirstString(locale, mn + ".responses");
+				if (mResponses != null) 
+					mom.put("responses", jp.parse(vr.resolve(mResponses), ObjectMap.class));
+
+				if (! mom.containsKey("consumes")) {
+					List<MediaType> mConsumes = req.getParsers().getSupportedMediaTypes();
+					if (! mConsumes.equals(om.get("consumes")))
+						mom.put("consumes", mConsumes);
+				}
+	
+				if (! mom.containsKey("produces")) {
+					List<MediaType> mProduces = req.getSerializers().getSupportedMediaTypes();
+					if (! mProduces.equals(om.get("produces")))
+						mom.put("produces", mProduces);
+				}
 			}
 		}
 		
+		s = jp.parse(vr.resolve(om.toString()), Swagger.class);
+		swaggers.put(locale, s);
+		
 		return s;
 	}
+	
+	private ObjectMap getInfo(ObjectMap om) {
+		if (! om.containsKey("info"))
+			om.put("info", new ObjectMap());
+		return om.getObjectMap("info");
+	}
 
-	/**
-	 * Returns the localized operation ID of the specified java method.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own operation ID.
-	 * 
-	 * <p>
-	 * The default implementation simply returns the Java method name.
-	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
-	 * @param req The current request.
-	 * @return The localized operation ID of the method, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public String getMethodOperationId(Method method, RestRequest req) throws Exception {
-		return method.getName();
+	private ObjectMap getOperation(ObjectMap om, String path, String httpMethod) {
+		if (! om.containsKey("paths"))
+			om.put("paths", new ObjectMap());
+		om = om.getObjectMap("paths");
+		if (! om.containsKey(path))
+			om.put(path, new ObjectMap());
+		om = om.getObjectMap(path);
+		if (! om.containsKey(httpMethod))
+			om.put(httpMethod, new ObjectMap());
+		return om.getObjectMap(httpMethod);
 	}
 
 	/**
@@ -266,13 +351,13 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 		VarResolverSession vr = req.getVarResolverSession();
 
 		String s = method.getAnnotation(RestMethod.class).summary();
-		if (s.isEmpty())
-			s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".summary");
-		if (s != null)
-			return vr.resolve(s);
+		if (s.isEmpty()) {
+			Operation o = getSwaggerOperation(method, req);
+			if (o != null)
+				s = o.getSummary();
+		}
 		
-		Operation o = getSwaggerOperationFromFile(method, req);
-		return o == null ? null : o.getSummary();
+		return isEmpty(s) ? null : vr.resolve(s);
 	}
 
 	/**
@@ -322,1107 +407,182 @@ public class BasicRestInfoProvider implements RestInfoProvider {
 		VarResolverSession vr = req.getVarResolverSession();
 		
 		String s = method.getAnnotation(RestMethod.class).description();
-		if (s.isEmpty())
-			s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".description");
-		if (s != null)
-			return vr.resolve(s);
-		
-		Operation o = getSwaggerOperationFromFile(method, req);
-		return o == null ? null : o.getDescription();
-	}
-
-	/**
-	 * Returns the localized Swagger tags for this Java method.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own tags.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link MethodSwagger#tags() @MethodSwagger.tags()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(tags=<js>"foo,bar,baz"</js>)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(tags=<js>"$L{myLocalizedTags}"</js>)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 		</p>
-	 * 	<li>Localized string from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].[javaMethodName].tags</ck>
-	 * 			<li><ck>[javaMethodName].tags</ck>
-	 * 		</ol>
-	 * 		<br>Value can be a comma-delimited list or JSON array.
-	 * 		<br>Value can contain any SVL variables defined on the {@link MethodSwagger#tags() @MethodSwagger.tags()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Comma-delimited list</cc>
-	 * 	<ck>MyClass.myMethod.tags</ck> = <cv>foo, bar, baz</cv>
-	 * 	
-	 * 	<cc>// JSON array</cc>
-	 * 	<ck>MyClass.myMethod.tags</ck> = <cv>["foo", "bar", "baz"]</cv>
-	 * 
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.myMethod.description</ck> = <cv>$C{MyStrings/MyClass.myMethod.tags}</cv>
-	 * 		</p>
-	 * </ol>
-	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
-	 * @param req The current request.
-	 * @return The localized tags of the method, or <jk>null</jk> if none were found.
-	 * @throws Exception 
-	 */
-	public List<String> getMethodTags(Method method, RestRequest req) throws Exception {
-		JsonParser p = JsonParser.DEFAULT;
-		VarResolverSession vr = req.getVarResolverSession();
-		
-		String s = method.getAnnotation(RestMethod.class).swagger().tags();
-		if (s.isEmpty())
-			s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".tags");
-		if (s != null) {
-			s = vr.resolve(s);
-			if (StringUtils.isObjectList(s)) 
-				return p.parse(s, ArrayList.class, String.class);
-			return Arrays.asList(StringUtils.split(s));
+		if (s.isEmpty()) {
+			Operation o = getSwaggerOperation(method, req);
+			if (o != null)
+				s = o.getDescription();
 		}
-
-		Operation o = getSwaggerOperationFromFile(method, req);
-		return o == null ? null : o.getTags();
+		
+		return isEmpty(s) ? null : vr.resolve(s);
 	}
 
 	/**
-	 * Returns the localized external documentation of the specified java method on this servlet.
+	 * Returns the localized site name of this REST resource.
 	 * 
 	 * <p>
-	 * Subclasses can override this method to provide their own external documentation.
+	 * Subclasses can override this method to provide their own site name.
 	 * 
 	 * <p>
 	 * The default implementation returns the value from the following locations (whichever matches first):
 	 * <ol class='spaced-list'>
-	 * 	<li>{@link MethodSwagger#externalDocs() @MethodSwagger.externalDocs()} annotation.
+	 * 	<li>{@link RestResource#siteName() @RestResource.siteName()} annotation on this class, and then any parent classes.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(externalDocs=<js>"{description:'Find more info here',url:'https://swagger.io'}"</js>)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Direct value</jc>
+	 * 	<ja>@RestResource</ja>(siteName=<js>"My Site"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(externalDocs=<js>"$L{myLocalizedExternalDocs}"</js>)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Pulled from some other location</jc>
+	 * 	<ja>@RestResource</ja>(siteName=<js>"$L{myLocalizedSiteName}"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 		</p>
-	 * 	<li>Localized string from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
+	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
 	 * 		on the resource class, then any parent classes.
 	 * 		<ol>
-	 * 			<li><ck>[ClassName].[javaMethodName].externalDocs</ck>
-	 * 			<li><ck>[javaMethodName].externalDocs</ck>
+	 * 			<li><ck>[ClassName].siteName</ck>
+	 * 			<li><ck>siteName</ck>
 	 * 		</ol>
-	 * 		<br>Value is a JSON representation of a {@link ExternalDocumentation} object.
-	 * 		<br>Value can contain any SVL variables defined on the {@link MethodSwagger#externalDocs() @MethodSwagger.externalDocs()} annotation.
+	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#siteName() @RestResource.siteName()} annotation.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
 	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.myMethod.externalDocs</ck> = <cv>{description:"Find more info here",url:"https://swagger.io"}</js>
+	 * 	<ck>MyClass.siteName</ck> = <cv>My Site</cv>
 	 * 	
 	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.myMethod.externalDocs</ck> = <cv>$C{MyStrings/MyClass.myMethod.externalDocs}</cv>
+	 * 	<ck>MyClass.siteName</ck> = <cv>$C{MyStrings/MyClass.siteName}</cv>
 	 * 		</p>
 	 * </ol>
 	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
 	 * @param req The current request.
-	 * @return The localized external documentation of the method, or <jk>null</jk> if none was found.
+	 * @return The localized site name of this REST resource, or <jk>null</jk> if none was found.
 	 * @throws Exception 
 	 */
-	public ExternalDocumentation getMethodExternalDocs(Method method, RestRequest req) throws Exception {
-		JsonParser p = JsonParser.DEFAULT;
+	@Override /* RestInfoProvider */
+	public String getSiteName(RestRequest req) throws Exception {
 		VarResolverSession vr = req.getVarResolverSession();
-		
-		String s = method.getAnnotation(RestMethod.class).swagger().externalDocs();
-		if (s.isEmpty())
-			s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".externalDocs");
-		if (s != null) 
-			return p.parse(vr.resolve(s), ExternalDocumentation.class);
-
-		Operation o = getSwaggerOperationFromFile(method, req);
-		return o == null ? null : o.getExternalDocs();
+		if (siteName != null)
+			return vr.resolve(siteName);
+		String siteName = context.getMessages().findFirstString(req.getLocale(), "siteName");
+		if (siteName != null)
+			return vr.resolve(siteName);
+		return null;
 	}
-	
+
 	/**
-	 * Returns the localized parameter info for the specified java method.
+	 * Returns the localized title of this REST resource.
 	 * 
 	 * <p>
-	 * Subclasses can override this method to provide their own parameter info.
+	 * Subclasses can override this method to provide their own title.
 	 * 
 	 * <p>
 	 * The default implementation returns the value from the following locations (whichever matches first):
 	 * <ol class='spaced-list'>
-	 * 	<li>Operation information from swagger file.
-	 * 	<li>{@link MethodSwagger#parameters() @MethodSwagger.parameters()} annotation.
+	 * 	<li>{@link RestResource#title() @RestResource.siteName()} annotation on this class, and then any parent classes.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			parameters={
-	 * 				<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"a"</js>, description=<js>"The 'a' attribute"</js>)
-	 * 			}
-	 * 		)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Direct value</jc>
+	 * 	<ja>@RestResource</ja>(title=<js>"My Resource"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			parameters={
-	 * 				<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"a"</js>, description=<js>"$L{myLocalizedParamADescription}"</js>)
-	 * 			}
-	 * 		)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Pulled from some other location</jc>
+	 * 	<ja>@RestResource</ja>(title=<js>"$L{myLocalizedTitle}"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 		</p>
 	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
 	 * 		on the resource class, then any parent classes.
 	 * 		<ol>
-	 * 			<li><ck>[ClassName].[javaMethodName].parameters</ck>
-	 * 			<li><ck>[javaMethodName].parameters</ck>
+	 * 			<li><ck>[ClassName].title</ck>
+	 * 			<li><ck>title</ck>
 	 * 		</ol>
-	 * 		<br>Value is a JSON representation of a <code>{@link ParameterInfo}[]</code> object.
-	 * 		<br>Value can contain any SVL variables defined on the {@link MethodSwagger#parameters() @MethodSwagger.parameters()} annotation.
+	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#title() @RestResource.title()} annotation.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
 	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.myMethod.parameters</ck> = <cv>[{name:"a",in:"path",description:"The ''a'' attribute"}]</cv>
+	 * 	<ck>MyClass.title</ck> = <cv>My Resource</cv>
 	 * 	
 	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.myMethod.parameters</ck> = <cv>$C{MyStrings/MyClass.myMethod.parameters}</cv>
+	 * 	<ck>MyClass.title</ck> = <cv>$C{MyStrings/MyClass.title}</cv>
 	 * 		</p>
-	 * 	<li>Information gathered directly from the parameters on the Java method.
+	 * 	<li><ck>/info/title</ck> entry in swagger file.
 	 * </ol>
 	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
 	 * @param req The current request.
-	 * @return The localized parameter info of the method, or <jk>null</jk> if none was found.
+	 * @return The localized title of this REST resource, or <jk>null</jk> if none was found.
 	 * @throws Exception 
 	 */
-	public List<ParameterInfo> getMethodParameters(Method method, RestRequest req) throws Exception {
-		
-		Operation o = getSwaggerOperationFromFile(method, req);
-		if (o != null && o.getParameters() != null)
-			return o.getParameters();
-
+	@Override /* RestInfoProvider */
+	public String getTitle(RestRequest req) throws Exception {
 		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		Map<String,ParameterInfo> m = new TreeMap<>();
-
-		// First parse @RestMethod.parameters() annotation.
-		for (org.apache.juneau.rest.annotation.Parameter v : method.getAnnotation(RestMethod.class).swagger().parameters()) {
-			String in = vr.resolve(v.in());
-			ParameterInfo p = parameterInfo(in, vr.resolve(v.name()));
-
-			if (! v.description().isEmpty())
-				p.description(vr.resolve(v.description()));
-			if (v.required())
-				p.required(v.required());
-
-			if ("body".equals(in)) {
-				if (! v.schema().isEmpty())
-					p.schema(jp.parse(vr.resolve(v.schema()), SchemaInfo.class));
-			} else {
-				if (v.allowEmptyValue())
-					p.allowEmptyValue(v.allowEmptyValue());
-				if (! v.collectionFormat().isEmpty())
-					p.collectionFormat(vr.resolve(v.collectionFormat()));
-				if (! v._default().isEmpty())
-					p._default(vr.resolve(v._default()));
-				if (! v.format().isEmpty())
-					p.format(vr.resolve(v.format()));
-				if (! v.items().isEmpty())
-					p.items(jp.parse(vr.resolve(v.items()), Items.class));
-				p.type(vr.resolve(v.type()));
-			}
-			m.put(p.getIn() + '.' + p.getName(), p);
-		}
-
-		// Next, look in resource bundle.
-		String s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".parameters");
-		if (s != null) {
-			for (ParameterInfo pi : jp.parse(vr.resolve(s), ParameterInfo[].class)) {
-				String key = pi.getIn() + '.' + pi.getName();
-				ParameterInfo p = m.get(key);
-				if (p == null)
-					m.put(key, pi);
-				else 
-					p.copyFrom(pi);
-			}
-		}
-
-		// Finally, look for parameters defined on method.
-		for (RestParam mp : context.getRestParams(method)) {
-			RestParamType in = mp.getParamType();
-			if (in != RestParamType.OTHER) {
-				String k2 = in.toString() + '.' + (in == RestParamType.BODY ? null : mp.getName());
-				ParameterInfo p = m.get(k2);
-				if (p == null) {
-					p = parameterInfoStrict(in.toString(), mp.getName());
-					m.put(k2, p);
-				}
-			}
-		}
-		
-		return m.isEmpty() ? null : new ArrayList<>(m.values());
+		if (title != null)
+			return vr.resolve(title);
+		String title = context.getMessages().findFirstString(req.getLocale(), "title");
+		if (title != null)
+			return vr.resolve(title);
+		Swagger s = getSwagger(req);
+		if (s != null && s.getInfo() != null)
+			return s.getInfo().getTitle();
+		return null;
 	}
 
 	/**
-	 * Returns the localized response info for the specified java method.
+	 * Returns the localized description of this REST resource.
 	 * 
 	 * <p>
-	 * Subclasses can override this method to provide their own parameter info.
+	 * Subclasses can override this method to provide their own description.
 	 * 
 	 * <p>
 	 * The default implementation returns the value from the following locations (whichever matches first):
 	 * <ol class='spaced-list'>
-	 * 	<li>Operation information from swagger file.
-	 * 	<li>{@link MethodSwagger#responses() @MethodSwagger.responses()} annotation.
+	 * 	<li>{@link RestResource#description() @RestResource.description()} annotation on this class, and then any parent classes.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			responses={
-	 * 				<ja>@Response</ja>(
-	 * 					value=302,
-	 * 					description=<js>"Thing wasn't found here"</js>,
-	 * 					headers={
-	 * 						<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"The place to find the thing"</js>)
-	 * 					}
-	 * 				)
-	 * 			}
-	 * 		)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Direct value</jc>
+	 * 	<ja>@RestResource</ja>(description=<js>"My Resource"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			responses={
-	 * 				<ja>@Response</ja>(
-	 * 					value=302,
-	 * 					description=<js>"Thing wasn't found here"</js>,
-	 * 					headers={
-	 * 						<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"$L{myLocalizedResponseDescription}"</js>)
-	 * 					}
-	 * 				)
-	 * 			}
-	 * 		)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
+	 * 	<jc>// Pulled from some other location</jc>
+	 * 	<ja>@RestResource</ja>(description=<js>"$L{myLocalizedDescription}"</js>)
+	 * 	<jk>public class</jk> MyResource {...}
 	 * 		</p>
 	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
 	 * 		on the resource class, then any parent classes.
 	 * 		<ol>
-	 * 			<li><ck>[ClassName].[javaMethodName].responses</ck>
-	 * 			<li><ck>[javaMethodName].responses</ck>
+	 * 			<li><ck>[ClassName].description</ck>
+	 * 			<li><ck>description</ck>
 	 * 		</ol>
-	 * 		<br>Value is a JSON representation of a <code>Map&lt;Integer,{@link ResponseInfo}&gt;</code> object.
-	 * 		<br>Value can contain any SVL variables defined on the {@link MethodSwagger#responses() @MethodSwagger.responses()} annotation.
+	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#description() @RestResource.description()} annotation.
 	 * 		<h5 class='figure'>Examples:</h5>
 	 * 		<p class='bcode'>
 	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.myMethod.responses</ck> = <cv>{302:{description:'Thing wasn''t found here',headers={Location:{description:"The place to find the thing"}}}</cv>
+	 * 	<ck>MyClass.description</ck> = <cv>My Resource</cv>
 	 * 	
 	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.myMethod.responses</ck> = <cv>$C{MyStrings/MyClass.myMethod.responses}</cv>
+	 * 	<ck>MyClass.description</ck> = <cv>$C{MyStrings/MyClass.description}</cv>
 	 * 		</p>
-	 * 	<li>Information gathered directly from the parameters on the Java method.
+	 * 	<li><ck>/info/description</ck> entry in swagger file.
 	 * </ol>
 	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
 	 * @param req The current request.
-	 * @return The localized response info of the method, or <jk>null</jk> if none was found.
+	 * @return The localized description of this REST resource, or <jk>null</jk> if none was was found.
 	 * @throws Exception 
 	 */
-	@SuppressWarnings("unchecked")
-	public Map<Integer,ResponseInfo> getMethodResponses(Method method, RestRequest req) throws Exception {
-		
-		Operation o = getSwaggerOperationFromFile(method, req);
-		if (o != null && o.getResponses() != null)
-			return o.getResponses();
-
+	@Override /* RestInfoProvider */
+	public String getDescription(RestRequest req) throws Exception {
 		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		Map<Integer,ResponseInfo> m = new TreeMap<>();
-		Map<String,HeaderInfo> m2 = new TreeMap<>();
-
-		// First parse @RestMethod.parameters() annotation.
-		for (Response r : method.getAnnotation(RestMethod.class).swagger().responses()) {
-			int httpCode = r.value();
-			String description = r.description().isEmpty() ? RestUtils.getHttpResponseText(r.value()) : vr.resolve(r.description());
-			ResponseInfo r2 = responseInfo(description);
-
-			if (r.headers().length > 0) {
-				for (org.apache.juneau.rest.annotation.Parameter v : r.headers()) {
-					HeaderInfo h = headerInfoStrict(vr.resolve(v.type()));
-					if (! v.collectionFormat().isEmpty())
-						h.collectionFormat(vr.resolve(v.collectionFormat()));
-					if (! v._default().isEmpty())
-						h._default(vr.resolve(v._default()));
-					if (! v.description().isEmpty())
-						h.description(vr.resolve(v.description()));
-					if (! v.format().isEmpty())
-						h.format(vr.resolve(v.format()));
-					if (! v.items().isEmpty())
-						h.items(jp.parse(vr.resolve(v.items()), Items.class));
-					r2.header(v.name(), h);
-					m2.put(httpCode + '.' + v.name(), h);
-				}
-			}
-			m.put(httpCode, r2);
-		}
-
-		// Next, look in resource bundle.
-		String s = context.getMessages().findFirstString(req.getLocale(), method.getName() + ".responses");
-		if (s != null) {
-			for (Map.Entry<Integer,ResponseInfo> e : ((Map<Integer,ResponseInfo>)jp.parse(vr.resolve(s), Map.class, Integer.class, ResponseInfo.class)).entrySet()) {
-				Integer httpCode = e.getKey();
-				ResponseInfo ri = e.getValue();
-
-				ResponseInfo r = m.get(httpCode);
-				if (r == null)
-					m.put(httpCode, ri);
-				else
-					r.copyFrom(ri);
-			}
-		}
-
-		return m.isEmpty() ? null : m;
+		if (description != null)
+			return vr.resolve(description);
+		String description = context.getMessages().findFirstString(req.getLocale(), "description");
+		if (description != null)
+			return vr.resolve(description);
+		Swagger s = getSwagger(req);
+		if (s != null && s.getInfo() != null)
+			return s.getInfo().getDescription();
+		return null;
 	}
 
-	/**
-	 * Returns the supported <code>Accept</code> types the specified Java method.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own produces info.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link RestMethod#produces() @RestMethod.supportedAcceptTypes()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(supportedAcceptTypes={<js>"text/json"</js>})
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(supportedAcceptTypes={<js>"$C{mySupportedProduces}"</js>})
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 		</p>
-	 * 	<li>Media types defined on the parsers associated with the method.
-	 * </ol>
-	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
-	 * @param req The current request.
-	 * @return The supported <code>Accept</code> types of the method, or <jk>null</jk> if none was found 
-	 * 	or the list of media types match those of the parent resource class.
-	 * @throws Exception 
-	 */
-	public List<MediaType> getMethodProduces(Method method, RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		String[] s = method.getAnnotation(RestMethod.class).produces();
-		if (s.length > 0)
-			return Arrays.asList(MediaType.forStrings(vr.resolve(s)));
-		List<MediaType> l = req.getSerializers().getSupportedMediaTypes();
-		return (l.equals(context.getProduces())  ? null : l);
-	}
-	
-	/**
-	 * Returns the supported <code>Content-Type</code> types the specified Java method.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link RestMethod#consumes() @RestMethod.supportedContentTypes()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ja>@RestMethod</ja>(supportedContentTypes={<js>"text/json"</js>})
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ja>@RestMethod</ja>(supportedContentTypes={<js>"$C{mySupportedConsumes}"</js>})
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 		</p>
-	 * 	<li>Media types defined on the serializers associated with the method.
-	 * </ol>
-	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
-	 * @param req The current request.
-	 * @return The supported <code>Content-Type</code> types of the method, or <jk>null</jk> if none was found 
-	 * 	or the list of media types match those of the parent resource class.
-	 * @throws Exception 
-	 */
-	public List<MediaType> getMethodConsumes(Method method, RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		String[] s = method.getAnnotation(RestMethod.class).consumes();
-		if (s.length > 0)
-			return Arrays.asList(MediaType.forStrings(vr.resolve(s)));
-		List<MediaType> l = req.getParsers().getSupportedMediaTypes();
-		return (l.equals(context.getConsumes())  ? null : l);
-	}
-
-	/**
-	 * Returns whether the specified method is deprecated
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following location:
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link MethodSwagger#deprecated() @MethodSwagger.deprecated()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			deprecated=<jk>true</jk>
-	 * 		)
-	 * 	)
-	 * 	<jk>public</jk> Object myMethod() {...}
-	 * 		</p>
-	 * </ol>
-	 * 
-	 * @param method The Java method annotated with {@link RestMethod @RestMethod}.
-	 * @param req The current request.
-	 * @return <jk>true</jk> if the method is deprecated.
-	 * @throws Exception 
-	 */
-	public boolean isDeprecated(Method method, RestRequest req) throws Exception {
-		return method.getAnnotation(RestMethod.class).swagger().deprecated();
-	}
-
-	/**
-	 * Returns the localized site name of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own site name.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link RestResource#siteName() @RestResource.siteName()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(siteName=<js>"My Site"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(siteName=<js>"$L{myLocalizedSiteName}"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].siteName</ck>
-	 * 			<li><ck>siteName</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#siteName() @RestResource.siteName()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.siteName</ck> = <cv>My Site</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.siteName</ck> = <cv>$C{MyStrings/MyClass.siteName}</cv>
-	 * 		</p>
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return The localized site name of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	@Override /* RestInfoProvider */
-	public String getSiteName(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		if (siteName != null)
-			return vr.resolve(siteName);
-		String siteName = context.getMessages().findFirstString(req.getLocale(), "siteName");
-		if (siteName != null)
-			return vr.resolve(siteName);
-		return null;
-	}
-
-	/**
-	 * Returns the localized title of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own title.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link RestResource#title() @RestResource.siteName()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(title=<js>"My Resource"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(title=<js>"$L{myLocalizedTitle}"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].title</ck>
-	 * 			<li><ck>title</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#title() @RestResource.title()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.title</ck> = <cv>My Resource</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.title</ck> = <cv>$C{MyStrings/MyClass.title}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/title</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return The localized title of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	@Override /* RestInfoProvider */
-	public String getTitle(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		if (title != null)
-			return vr.resolve(title);
-		String title = context.getMessages().findFirstString(req.getLocale(), "title");
-		if (title != null)
-			return vr.resolve(title);
-		Swagger s = getSwaggerFromFile(req);
-		if (s != null && s.getInfo() != null)
-			return s.getInfo().getTitle();
-		return null;
-	}
-
-	/**
-	 * Returns the localized description of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own description.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link RestResource#description() @RestResource.description()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(description=<js>"My Resource"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(description=<js>"$L{myLocalizedDescription}"</js>)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].description</ck>
-	 * 			<li><ck>description</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link RestResource#description() @RestResource.description()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.description</ck> = <cv>My Resource</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.description</ck> = <cv>$C{MyStrings/MyClass.description}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/description</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return The localized description of this REST resource, or <jk>null</jk> if none was was found.
-	 * @throws Exception 
-	 */
-	@Override /* RestInfoProvider */
-	public String getDescription(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		if (description != null)
-			return vr.resolve(description);
-		String description = context.getMessages().findFirstString(req.getLocale(), "description");
-		if (description != null)
-			return vr.resolve(description);
-		Swagger s = getSwaggerFromFile(req);
-		if (s != null && s.getInfo() != null)
-			return s.getInfo().getDescription();
-		return null;
-	}
-
-	/**
-	 * Returns the localized contact information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own contact information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#contact() @ResourceSwagger.contact()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(contact=<js>"{name:'John Smith',email:'john.smith@foo.bar'}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(contact=<js>"$C{MyStrings/MyClass.myContactInfo}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].contact</ck>
-	 * 			<li><ck>contact</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#contact() @ResourceSwagger.contact()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.contact</ck> = <cv>{name:"John Smith",email:"john.smith@foo.bar"}</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.contact</ck> = <cv>$C{MyStrings/MyClass.myContactInfo}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/contact</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized contact information of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public Contact getContact(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		try {
-			if (contact != null)
-				return jp.parse(vr.resolve(contact), Contact.class);
-			String contact = context.getMessages().findFirstString(req.getLocale(), "contact");
-			if (contact != null)
-				return jp.parse(vr.resolve(contact), Contact.class);
-			Swagger s = getSwaggerFromFile(req);
-			if (s != null && s.getInfo() != null)
-				return s.getInfo().getContact();
-			return null;
-		} catch (ParseException e) {
-			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
-		}
-	}
-
-	/**
-	 * Returns the localized license information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own license information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#license() @ResourceSwagger.license()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(license=<js>"$C{MyStrings/MyClass.myLicenseInfo}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].license</ck>
-	 * 			<li><ck>license</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#license() @ResourceSwagger.license()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.license</ck> = <cv>{name:"Apache 2.0",url:"http://www.apache.org/licenses/LICENSE-2.0.html"}</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.license</ck> = <cv>$C{MyStrings/MyClass.myLicenseInfo}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/license</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized license information of this REST resource, or <jk>null</jk> if none was found found.
-	 * @throws Exception 
-	 */
-	public License getLicense(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		try {
-			if (license != null)
-				return jp.parse(vr.resolve(license), License.class);
-			String license = context.getMessages().findFirstString(req.getLocale(), "license");
-			if (license != null)
-				return jp.parse(vr.resolve(license), License.class);
-			Swagger s = getSwaggerFromFile(req);
-			if (s != null && s.getInfo() != null)
-				return s.getInfo().getLicense();
-			return null;
-		} catch (ParseException e) {
-			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
-		}
-	}
-
-	/**
-	 * Returns the terms-of-service information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own terms-of-service information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#termsOfService() @ResourceSwagger.termsOfService()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(termsOfService=<js>"You're on your own"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(termsOfService=<js>"$C{MyStrings/MyClass.myTermsOfService}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].termsOfService</ck>
-	 * 			<li><ck>termsOfService</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#termsOfService() @ResourceSwagger.termsOfService()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.termsOfService</ck> = <cv>You''re on your own</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.termsOfService</ck> = <cv>$C{MyStrings/MyClass.myTermsOfService}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/termsOfService</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized terms-of-service of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public String getTermsOfService(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		if (termsOfService != null)
-			return vr.resolve(termsOfService);
-		String termsOfService = context.getMessages().findFirstString(req.getLocale(), "termsOfService");
-		if (termsOfService != null)
-			return vr.resolve(termsOfService);
-		Swagger s = getSwaggerFromFile(req);
-		if (s != null && s.getInfo() != null)
-			return s.getInfo().getTermsOfService();
-		return null;
-	}
-
-	/**
-	 * Returns the version information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own version information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#version() @ResourceSwagger.version()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(version=<js>"2.0"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(version=<js>"$C{MyStrings/MyClass.myVersion}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].version</ck>
-	 * 			<li><ck>version</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#version() @ResourceSwagger.version()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.version</ck> = <cv>2.0</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.version</ck> = <cv>$C{MyStrings/MyClass.myVersion}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/version</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized version of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public String getVersion(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		if (version != null)
-			return vr.resolve(version);
-		String version = context.getMessages().findFirstString(req.getLocale(), "version");
-		if (version != null)
-			return vr.resolve(version);
-		Swagger s = getSwaggerFromFile(req);
-		if (s != null && s.getInfo() != null)
-			return s.getInfo().getVersion();
-		return null;
-	}
-
-	/**
-	 * Returns the supported <code>Content-Type</code> request headers for the REST resource.
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#version() @ResourceSwagger.version()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(version=<js>"2.0"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(version=<js>"$C{MyStrings/MyClass.myVersion}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].version</ck>
-	 * 			<li><ck>version</ck>
-	 * 		</ol>
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#version() @ResourceSwagger.version()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.version</ck> = <cv>2.0</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.version</ck> = <cv>$C{MyStrings/MyClass.myVersion}</cv>
-	 * 		</p>
-	 * 	<li><ck>/info/version</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The supported <code>Content-Type</code> request headers of the REST resource, or <jk>null</jk> if none were found.
-	 * @throws Exception 
-	 */
-	public List<MediaType> getConsumes(RestRequest req) throws Exception {
-		List<MediaType> l = req.getContext().getConsumes();
-		return l.isEmpty() ? null : l;
-	}
-	
-	/**
-	 * Returns the supported <code>Accept</code> request headers for the REST resource.
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The supported <code>Accept</code> request headers of the REST resource, or <jk>null</jk> if none were found.
-	 * @throws Exception 
-	 */
-	public List<MediaType> getProduces(RestRequest req) throws Exception {
-		List<MediaType> l = req.getContext().getProduces();
-		return l.isEmpty() ? null : l;
-	}
-
-	/**
-	 * Returns the version information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own version information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#tags() @ResourceSwagger.tags()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(tags=<js>"foo,bar,baz"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(tags=<js>"$C{MyStrings/MyClass.myTags}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].tags</ck>
-	 * 			<li><ck>tags</ck>
-	 * 		</ol>
-	 * 		<br>Value is either a comma-delimited list or a JSON array.
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#tags() @ResourceSwagger.tags()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Comma-delimited list</cc>
-	 * 	<ck>MyClass.tags</ck> = <cv>foo,bar,baz</cv>
-	 * 	
-	 * 	<cc>// JSON array</cc>
-	 * 	<ck>MyClass.tags</ck> = <cv>["foo","bar","baz"]</cv>
-	 * 
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.tags</ck> = <cv>$C{MyStrings/MyClass.myTags}</cv>
-	 * 		</p>
-	 * 	<li><ck>tags</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized tags of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public List<Tag> getTags(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		try {
-			if (tags != null)
-				return jp.parse(vr.resolve(tags), ArrayList.class, Tag.class);
-			String tags = context.getMessages().findFirstString(req.getLocale(), "tags");
-			if (tags != null)
-				return jp.parse(vr.resolve(tags), ArrayList.class, Tag.class);
-			Swagger s = getSwaggerFromFile(req);
-			if (s != null && s.getTags() != null)
-				return s.getTags();
-			return null;
-		} catch (Exception e) {
-			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
-		}
-	}
-
-	/**
-	 * Returns the version information of this REST resource.
-	 * 
-	 * <p>
-	 * Subclasses can override this method to provide their own version information.
-	 * 
-	 * <p>
-	 * The default implementation returns the value from the following locations (whichever matches first):
-	 * <ol class='spaced-list'>
-	 * 	<li>{@link ResourceSwagger#externalDocs() @ResourceSwagger.externalDocs()} annotation on this class, and then any parent classes.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<jc>// Direct value</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(externalDocs=<js>"{url:'http://juneau.apache.org'}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 	
-	 * 	<jc>// Pulled from some other location</jc>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@ResourceSwagger</ja>(externalDocs=<js>"$C{MyStrings/MyClass.myExternalDocs}"</js>)
-	 * 	)
-	 * 	<jk>public class</jk> MyResource {...}
-	 * 		</p>
-	 * 	<li>Localized strings from resource bundle identified by {@link RestResource#messages() @RestResource.messages()}
-	 * 		on the resource class, then any parent classes.
-	 * 		<ol>
-	 * 			<li><ck>[ClassName].externalDocs</ck>
-	 * 			<li><ck>externalDocs</ck>
-	 * 		</ol>
-	 * 		<br>Value is a JSON objec representation of a {@link ExternalDocumentation} object.
-	 * 		<br>Value can contain any SVL variables defined on the {@link ResourceSwagger#externalDocs() @ResourceSwagger.externalDocs()} annotation.
-	 * 		<h5 class='figure'>Examples:</h5>
-	 * 		<p class='bcode'>
-	 * 	<cc>// Direct value</cc>
-	 * 	<ck>MyClass.externalDocs</ck> = <cv>{url:"http://juneau.apache.org"}</cv>
-	 * 	
-	 * 	<cc>// Pulled from some other location</cc>
-	 * 	<ck>MyClass.externalDocs</ck> = <cv>$C{MyStrings/MyClass.myExternalDocs}</cv>
-	 * 		</p>
-	 * 	<li><ck>externalDocs</ck> entry in swagger file.
-	 * </ol>
-	 * 
-	 * @param req The current request.
-	 * @return
-	 * 	The localized external documentation of this REST resource, or <jk>null</jk> if none was found.
-	 * @throws Exception 
-	 */
-	public ExternalDocumentation getExternalDocs(RestRequest req) throws Exception {
-		VarResolverSession vr = req.getVarResolverSession();
-		JsonParser jp = JsonParser.DEFAULT;
-		try {
-			if (externalDocs != null)
-				return jp.parse(vr.resolve(externalDocs), ExternalDocumentation.class);
-			String externalDocs = context.getMessages().findFirstString(req.getLocale(), "externalDocs");
-			if (externalDocs != null)
-				return jp.parse(vr.resolve(externalDocs), ExternalDocumentation.class);
-			Swagger s = getSwaggerFromFile(req);
-			if (s != null)
-				return s.getExternalDocs();
-			return null;
-		} catch (Exception e) {
-			throw new RestException(SC_INTERNAL_SERVER_ERROR, e);
-		}
-	}
-	
-	private Operation getSwaggerOperationFromFile(Method method, RestRequest req) throws Exception {
+	private Operation getSwaggerOperation(Method method, RestRequest req) throws Exception {
 
-		Swagger s = getSwaggerFromFile(req);
+		Swagger s = getSwagger(req);
 		if (s != null) {
 			Map<String,Map<String,Operation>> sp = s.getPaths();
 			if (sp != null) {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
index e6c1aaa..d483bfa 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -1251,7 +1251,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * 
 	 * @param name The name of the resource (i.e. the value normally passed to {@link Class#getResourceAsStream(String)}.
 	 * @param resolveVars
-	 * 	If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter @Parameter} variables will be
+	 * 	If <jk>true</jk>, any SVL variables will be
 	 * 	resolved by the variable resolver returned by {@link #getVarResolverSession()}.
 	 * 	<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * @param mediaType The value to set as the <js>"Content-Type"</js> header for this object.
@@ -1274,7 +1274,7 @@ public final class RestRequest extends HttpServletRequestWrapper {
 	 * 
 	 * @param name The name of the resource (i.e. the value normally passed to {@link Class#getResourceAsStream(String)}.
 	 * @param resolveVars
-	 * 	If <jk>true</jk>, any {@link org.apache.juneau.rest.annotation.Parameter @Parameter} variables will be
+	 * 	If <jk>true</jk>, any SVL variables will be
 	 * 	resolved by the variable resolver returned by {@link #getVarResolverSession()}.
 	 * 	<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * @return A new reader resource, or <jk>null</jk> if resource could not be found.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
deleted file mode 100644
index b1169d5..0000000
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
+++ /dev/null
@@ -1,210 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
-// * with the License.  You may obtain a copy of the License at                                                              *
-// *                                                                                                                         *
-// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
-// *                                                                                                                         *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
-// * specific language governing permissions and limitations under the License.                                              *
-// ***************************************************************************************************************************
-package org.apache.juneau.rest.annotation;
-
-import org.apache.juneau.rest.*;
-
-/**
- * Extended annotation for {@link RestMethod#swagger() RestMethod.swagger()}.
- * 
- * <h5 class='section'>See Also:</h5>
- * <ul>
- * 	<li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; juneau-rest-server &gt; OPTIONS Pages</a>
- * </ul>
- */
-public @interface MethodSwagger {
-
-	/**
-	 * Optional deprecated flag for the exposed API.
-	 * 
-	 * <p>
-	 * Used to populate the Swagger deprecated field.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			deprecated=<jk>true</jk>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <h5 class='section'>Notes:</h5>
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Corresponds to the swagger field <code>/paths/{path}/{method}/deprecated</code>.
-	 * </ul>
-	 * 
-	 * <h5 class='section'>See Also:</h5>
-	 * <ul>
-	 * 	<li class='jm'>{@link BasicRestInfoProvider#isDeprecated(java.lang.reflect.Method, RestRequest) BasicRestInfoProvider.isDeprecated(Method,RestRequest)}
-	 * </ul>
-	 */
-	boolean deprecated() default false;
-
-	/**
-	 * Optional external documentation information for the exposed API.
-	 * 
-	 * <p>
-	 * Used to populate the Swagger external documentation field.
-	 * 
-	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		description: string,
-	 * 		url: string
-	 * 	}
-	 * </p>
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			<js>"{url:'http://juneau.apache.org'}"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <h5 class='section'>Notes:</h5>
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Supports <a class="doclink" href="../../../../../overview-summary.html#DefaultRestSvlVariables">initialization-time and request-time variables</a> 
-	 * 		(e.g. <js>"$L{my.localized.variable}"</js>).
-	 * 	<li>
-	 * 		Corresponds to the swagger field <code>/paths/{path}/{method}/externalDocs</code>.
-	 * </ul>
-	 * 
-	 * <h5 class='section'>See Also:</h5>
-	 * <ul>
-	 * 	<li class='jm'>{@link BasicRestInfoProvider#getMethodExternalDocs(java.lang.reflect.Method, RestRequest) BasicRestInfoProvider.getMethodExternalDocs(Method,RestRequest)}
-	 * </ul>
-	 */
-	String externalDocs() default "";
-
-	/**
-	 * Optional parameter descriptions.
-	 * 
-	 * <p>
-	 * This annotation is provided for documentation purposes and is used to populate the method <js>"parameters"</js>
-	 * column on the Swagger page.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		name=<jsf>POST</jsf>, path=<js>"/{a}"</js>,
-	 * 		description=<js>"This is my method."</js>,
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			parameters={
-	 * 				<ja>@Parameter</ja>(in=<js>"path"</js>, name=<js>"a"</js>, description=<js>"The 'a' attribute"</js>),
-	 * 				<ja>@Parameter</ja>(in=<js>"query"</js>, name=<js>"b"</js>, description=<js>"The 'b' parameter"</js>, required=<jk>true</jk>),
-	 * 				<ja>@Parameter</ja>(in=<js>"body"</js>, description=<js>"The HTTP content"</js>),
-	 * 				<ja>@Parameter</ja>(in=<js>"header"</js>, name=<js>"D"</js>, description=<js>"The 'D' header"</js>),
-	 * 			}
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <h5 class='section'>Notes:</h5>
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Supports <a class="doclink" href="../../../../../overview-summary.html#DefaultRestSvlVariables">initialization-time and request-time variables</a> 
-	 * 		(e.g. <js>"$L{my.localized.variable}"</js>).
-	 * 	<li>
-	 * 		Corresponds to the swagger field <code>/paths/{path}/{method}/parameters</code>.
-	 * </ul>
-	 * 
-	 * <h5 class='section'>See Also:</h5>
-	 * <ul>
-	 * 	<li class='jm'>{@link BasicRestInfoProvider#getMethodParameters(java.lang.reflect.Method, RestRequest) BasicRestInfoProvider.getMethodParameters(Method,RestRequest)}
-	 * </ul>
-	 */
-	Parameter[] parameters() default {};
-
-	/**
-	 * Optional output description.
-	 * 
-	 * <p>
-	 * This annotation is provided for documentation purposes and is used to populate the method <js>"responses"</js>
-	 * column on the Swagger page.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		name=<jsf>GET</jsf>, path=<js>"/"</js>,
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			responses={
-	 * 				<ja>@Response</ja>(200),
-	 * 				<ja>@Response</ja>(
-	 * 					value=302,
-	 * 					description=<js>"Thing wasn't found here"</js>,
-	 * 					headers={
-	 * 						<ja>@Parameter</ja>(name=<js>"Location"</js>, description=<js>"The place to find the thing"</js>)
-	 * 					}
-	 * 				)
-	 * 			}
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <h5 class='section'>Notes:</h5>
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Supports <a class="doclink" href="../../../../../overview-summary.html#DefaultRestSvlVariables">initialization-time and request-time variables</a> 
-	 * 		(e.g. <js>"$L{my.localized.variable}"</js>).
-	 * 	<li>
-	 * 		Corresponds to the swagger field <code>/paths/{path}/{method}/responses</code>.
-	 * </ul>
-	 * 
-	 * <h5 class='section'>See Also:</h5>
-	 * <ul>
-	 * 	<li class='jm'>{@link BasicRestInfoProvider#getMethodResponses(java.lang.reflect.Method, RestRequest) BasicRestInfoProvider.getMethodResponses(Method,RestRequest)}
-	 * </ul>
-	 */
-	Response[] responses() default {};
-
-	/**
-	 * Optional tagging information for the exposed API.
-	 * 
-	 * <p>
-	 * Used to populate the Swagger tags field.
-	 * 
-	 * <p>
-	 * A comma-delimited list of tags for API documentation control.
-	 * <br>Tags can be used for logical grouping of operations by resources or any other qualifier.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			tags=<js>"foo,bar"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <h5 class='section'>Notes:</h5>
-	 * <ul class='spaced-list'>
-	 * 	<li>
-	 * 		Supports <a class="doclink" href="../../../../../overview-summary.html#DefaultRestSvlVariables">initialization-time and request-time variables</a> 
-	 * 		(e.g. <js>"$L{my.localized.variable}"</js>).
-	 * 	<li>
-	 * 		Corresponds to the swagger field <code>/paths/{path}/{method}/tags</code>.
-	 * </ul>
-	 * 
-	 * <h5 class='section'>See Also:</h5>
-	 * <ul>
-	 * 	<li class='jm'>{@link BasicRestInfoProvider#getMethodTags(java.lang.reflect.Method, RestRequest) BasicRestInfoProvider.getMethodTags(Method,RestRequest)}
-	 * </ul>
-	 */
-	String tags() default "";
-}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Parameter.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
deleted file mode 100644
index 0ba0e07..0000000
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
+++ /dev/null
@@ -1,213 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
-// * with the License.  You may obtain a copy of the License at                                                              *
-// *                                                                                                                         *
-// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
-// *                                                                                                                         *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
-// * specific language governing permissions and limitations under the License.                                              *
-// ***************************************************************************************************************************
-package org.apache.juneau.rest.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * Annotation used in conjunction with {@link MethodSwagger#parameters() @MethodSwagger.parameters()} to identify 
- * content and header descriptions on specific method requests.
- * 
- * <h5 class='section'>Example:</h5>
- * <p class='bcode'>
- * 	<ja>@RestMethod</ja>(
- * 		name=<js>"*"</js>,
- * 		swagger=@MethodSwagger(
- * 			parameters={
- * 				<ja>@Parameter</ja>(in=<js>"header"</js>, name=<js>"Range"</js>, description=<js>"$L{ContentRange.description}"</js>)
- * 			}
- * 		)
- * 	)
- * 	<jk>public void</jk> doAnything(RestRequest req, RestResponse res, <ja>@Method</ja> String method) {
- * 		...
- * 	}
- * </p>
- * 
- * <h5 class='section'>See Also:</h5>
- * <ul>
- * 	<li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; juneau-rest-server &gt; OPTIONS Pages</a>
- * </ul>
- */
-@Documented
-@Target(PARAMETER)
-@Retention(RUNTIME)
-@Inherited
-public @interface Parameter {
-
-	/**
-	 * Declares the value of the parameter that the server will use if none is provided.
-	 * 
-	 * <p>
-	 * For example a "count" to control the number of results per page might default to 100 if not supplied by the
-	 * client in the request.
-	 * (Note: "default" has no meaning for required parameters.)
-	 * See <a class="doclink" href="http://json-schema.org/latest/json-schema-validation.html#anchor101">
-	 * http://json-schema.org/latest/json-schema-validation.html#anchor101</a>.
-	 * Unlike JSON Schema this value MUST conform to the defined <code>type</code> for this parameter.
-	 */
-	String _default() default "";
-
-	/**
-	 * Sets the ability to pass empty-valued parameters.
-	 * 
-	 * <p>
-	 * This is valid only for either <code>query</code> or <code>formData</code> parameters and allows you to send a
-	 * parameter with a name only or an empty value.
-	 * Default value is <jk>false</jk>.
-	 */
-	boolean allowEmptyValue() default false;
-
-	/**
-	 * Determines the format of the array if type array is used.
-	 * 
-	 * <p>
-	 * Possible values are:
-	 * <ul>
-	 * 	<li><js>"csv"</js> - comma separated values <js>"foo,bar"</js>.
-	 * 	<li><js>"ssv"</js> - space separated values <js>"foo bar"</js>.
-	 * 	<li><js>"tsv"</js> - tab separated values <js>"foo\tbar"</js>.
-	 * 	<li><js>"pipes"</js> - pipe separated values <js>"foo|bar"</js>.
-	 * 	<li><js>"multi"</js> - corresponds to multiple parameter instances instead of multiple values for a single
-	 * 		instance <js>"foo=bar&amp;foo=baz"</js>.
-	 * 		This is valid only for parameters <code>in</code> <js>"query"</js> or <js>"formData"</js>.
-	 * </ul>
-	 * Default value is <js>"csv"</js>.
-	 */
-	String collectionFormat() default "";
-
-	/**
-	 * Parameter description (e.g. <js>"Indicates the range returned when Range header is present in the request"</js>).
-	 * 
-	 * <p>
-	 * A brief description of the parameter.
-	 * This could contain examples of use.
-	 * <a class="doclink" href="https://help.github.com/articles/github-flavored-markdown">GFM syntax</a> can be used
-	 * for rich text representation.
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or
-	 * <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>).
-	 */
-	String description() default "";
-
-	/**
-	 * The extending format for the previously mentioned <code>type</code>.
-	 * 
-	 * <p>
-	 * See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further
-	 * details.
-	 */
-	String format() default "";
-
-	/**
-	 * The location of the parameter.
-	 * 
-	 * <p>
-	 * Possible values are:
-	 * <ul>
-	 * 	<li><js>"query"</js>
-	 * 	<li><js>"header"</js>
-	 * 	<li><js>"path"</js>
-	 * 	<li><js>"formData"</js>
-	 * 	<li><js>"body"</js>
-	 * </ul>
-	 */
-	String in() default "";
-
-	/**
-	 * Required if <code>type</code> is <js>"array"</js>.
-	 * 
-	 * <p>
-	 * Describes the type of items in the array.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		parameters={
-	 * 			<ja>@Parameter</ja>(
-	 * 				in=<js>"header"</js>,
-	 * 				name=<js>"Foo"</js>,
-	 * 				type=<js>"array"</js>,
-	 * 				items=<js>"{type:'string',collectionFormat:'csv'}"</js>)
-	 * 		}
-	 * 	)
-	 * 	<jk>public void</jk> doAnything() {
-	 * </p>
-	 * 
-	 * <p>
-	 * See <a class="doclink" href="http://swagger.io/specification/#itemsObject">Items Object</a> for further details.
-	 */
-	String items() default "";
-
-	/**
-	 * The name of the parameter (e.g. <js>"Content-Range"</js>).
-	 * 
-	 * <p>
-	 * Parameter names are case sensitive.
-	 * If <code>in</code> is <js>"path"</js>, the name field MUST correspond to the associated path segment from the
-	 * <code>path</code> field in the <a class="doclink"
-	 * href="http://swagger.io/specification/#pathsObject">Paths Object</a>.
-	 * See <a class="doclink" href="http://swagger.io/specification/#pathTemplating">Path Templating</a> for further
-	 * information.
-	 * For all other cases, the name corresponds to the parameter name used based on the <code>in</code> property.
-	 */
-	String name() default "";
-
-	/**
-	 * Determines whether this parameter is mandatory.
-	 * 
-	 * <p>
-	 * If the parameter is <code>in</code> <js>"path"</js>, this property is required and its value MUST be <jk>true</jk>.
-	 * Otherwise, the property MAY be included and its default value is <jk>false</jk>.
-	 */
-	boolean required() default false;
-
-	/**
-	 * The schema defining the type used for the body parameter.
-	 * 
-	 * <p>
-	 * Only applicable for <code>in</code> of type <js>"body"</js>.
-	 * 
-	 * <p>
-	 * The schema is a JSON object specified <a class="doclink" href="http://swagger.io/specification/#schemaObject">here</a>.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		parameters={
-	 * 			<ja>@Parameter</ja>(
-	 * 				in=<js>"header"</js>,
-	 * 				name=<js>"Foo"</js>,
-	 * 				schema=<js>"{format:'string',title:'Foo header',description:'Header that contains the Foo value.'}"</js>)
-	 * 		}
-	 * 	)
-	 * 	<jk>public void</jk> doAnything() {
-	 * </p>
-	 */
-	String schema() default "";
-
-	/**
-	 * The type of the parameter.
-	 * 
-	 * <p>
-	 * The value MUST be one of <js>"string"</js>, <js>"number"</js>, <js>"integer"</js>, <js>"boolean"</js>,
-	 * <js>"array"</js> or <js>"file"</js>.
-	 * If type is <js>"file"</js>, the consumes MUST be either <js>"multipart/form-data"</js>,
-	 * <js>"application/x-www-form-urlencoded"</js> or both and the parameter MUST be in <js>"formData"</js>.
-	 */
-	String type() default "string";
-}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
deleted file mode 100644
index 31b5624..0000000
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
+++ /dev/null
@@ -1,333 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
-// * with the License.  You may obtain a copy of the License at                                                              *
-// *                                                                                                                         *
-// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
-// *                                                                                                                         *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
-// * specific language governing permissions and limitations under the License.                                              *
-// ***************************************************************************************************************************
-package org.apache.juneau.rest.annotation;
-
-import org.apache.juneau.config.vars.*;
-import org.apache.juneau.rest.vars.*;
-import org.apache.juneau.svl.vars.*;
-
-/**
- * Extended annotation for {@link RestResource#swagger() @RestResource.swagger()}.
- * 
- * <h5 class='section'>See Also:</h5>
- * <ul>
- * 	<li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; juneau-rest-server &gt; OPTIONS pages</a>
- * </ul>
- */
-public @interface ResourceSwagger {
-
-	/**
-	 * Optional contact information for the exposed API.
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger contact field and to display on HTML pages.
-	 * 
-	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		name: string,
-	 * 		url: string,
-	 * 		email: string
-	 * 	}
-	 * </p>
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>contact</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"contact = {name:'John Smith',email:'john.smith@foo.bar'}"</js> or
-	 * <js>"MyServlet.contact = {name:'John Smith',email:'john.smith@foo.bar'}"</js>).
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			contact=<js>"{name:'John Smith',email:'john.smith@foo.bar'}"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/info/contact</code>.
-	 */
-	String contact() default "";
-
-	/**
-	 * Optional external documentation information for the exposed API.
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger external documentation field and to display on HTML pages.
-	 * 
-	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		description: string,
-	 * 		url: string
-	 * 	}
-	 * </p>
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>externalDocs</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"externalDocs = {url:'http://juneau.apache.org'}"</js> or
-	 * <js>"MyServlet.externalDocs = {url:'http://juneau.apache.org'}"</js>).
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			externalDocs=<js>"{url:'http://juneau.apache.org'}"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/tags</code>.
-	 */
-	String externalDocs() default "";
-
-	/**
-	 * Optional license information for the exposed API.
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger license field and to display on HTML pages.
-	 * 
-	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		name: string,
-	 * 		url: string
-	 * 	}
-	 * </p>
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>license</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js> or
-	 * <js>"MyServlet.license = {name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>).
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/info/license</code>.
-	 */
-	String license() default "";
-
-	/**
-	 * Optional tagging information for the exposed API.
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger tags field and to display on HTML pages.
-	 * 
-	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	[
-	 * 		{
-	 * 			name: string,
-	 * 			description: string,
-	 * 			externalDocs: {
-	 * 				description: string,
-	 * 				url: string
-	 * 			}
-	 * 		}
-	 * 	]
-	 * </p>
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>tags</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"tags = [{name:'Foo',description:'Foobar'}]"</js> or
-	 * <js>"MyServlet.tags = [{name:'Foo',description:'Foobar'}]"</js>).
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestResource</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			tags=<js>"[{name:'Foo',description:'Foobar'}]"</js>
-	 * 		)
-	 * 	)
-	 * </p>
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/tags</code>.
-	 */
-	String tags() default "";
-	
-	/**
-	 * Optional servlet terms-of-service for this API.
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger terms-of-service field.
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>termsOfService</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"termsOfService = foo"</js> or <js>"MyServlet.termsOfService = foo"</js>).
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/info/termsOfService</code>.
-	 */
-	String termsOfService() default "";
-
-	/**
-	 * Provides the version of the application API (not to be confused with the specification version).
-	 * 
-	 * <p>
-	 * It is used to populate the Swagger version field and to display on HTML pages.
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>version</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"version = 2.0"</js> or <js>"MyServlet.version = 2.0"</js>).
-	 * 
-	 * <p>
-	 * Value can contain any of the following variables:  
-	 * {@link ConfigVar $C} 
-	 * {@link CoalesceVar $CO}
-	 * {@link EnvVariablesVar $E} 
-	 * {@link FileVar $F} 
-	 * {@link ServletInitParamVar $I},
-	 * {@link IfVar $IF}
-	 * {@link LocalizationVar $L}
-	 * {@link RequestAttributeVar $RA} 
-	 * {@link RequestFormDataVar $RF} 
-	 * {@link RequestHeaderVar $RH} 
-	 * {@link RequestPathVar $RP} 
-	 * {@link RequestQueryVar $RQ} 
-	 * {@link RequestVar $R} 
-	 * {@link SystemPropertiesVar $S}
-	 * {@link SerializedRequestAttrVar $SA}
-	 * {@link SwitchVar $SW}
-	 * {@link UrlVar $U}
-	 * {@link UrlEncodeVar $UE}
-	 * {@link WidgetVar $W}
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/info/version</code>.
-	 */
-	String version() default "";
-}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Response.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Response.java
deleted file mode 100644
index 6aab540..0000000
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Response.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
-// * with the License.  You may obtain a copy of the License at                                                              *
-// *                                                                                                                         *
-// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
-// *                                                                                                                         *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
-// * specific language governing permissions and limitations under the License.                                              *
-// ***************************************************************************************************************************
-package org.apache.juneau.rest.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.rest.*;
-
-/**
- * Annotation used in conjunction with {@link MethodSwagger#responses() @MethodSwagger.responses()} to identify possible responses by the method.
- * 
- * <h5 class='section'>Example:</h5>
- * <p class='bcode'>
- * 	<ja>@RestMethod</ja>(
- * 		name=<js>"*"</js>,
- * 		swagger=@ResourceSwagger(
- * 			responses={
- * 				<ja>@Response</ja>(value=200,description=<js>"Everything was great."</js>),
- * 				<ja>@Response</ja>(value=404,description=<js>"File was not found."</js>)
- * 				<ja>@Response</ja>(500),
- * 			}
- * 		)
- * 	)
- * 	<jk>public void</jk> doAnything(RestRequest req, RestResponse res, <ja>@Method</ja> String method) {
- * 		...
- * 	}
- * </p>
- * 
- * <h5 class='section'>See Also:</h5>
- * <ul>
- * 	<li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server.OptionsPages">Overview &gt; juneau-rest-server &gt; OPTIONS pages</a>
- * </ul>
- */
-@Documented
-@Target(PARAMETER)
-@Retention(RUNTIME)
-@Inherited
-public @interface Response {
-
-	/**
-	 * Optional description.
-	 * 
-	 * <p>
-	 * The default value pulls the description from the <code>description</code> entry in the servlet resource bundle.
-	 * (e.g. <js>"myMethod.res.[code].description = foo"</js> or
-	 * <js>"MyServlet.myMethod.res.[code].description = foo"</js>).
-	 * 
-	 * <p>
-	 * This field can contain variables (e.g. "$L{my.localized.variable}").
-	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
-	 * 
-	 * <p>
-	 * Corresponds to the swagger field <code>/paths/{path}/{method}/responses/{code}/description</code>.
-	 */
-	String description() default "";
-
-	/**
-	 * Optional response headers.
-	 * 
-	 * <p>
-	 * Response variables can also be defined in the servlet resource bundle.
-	 * (e.g. <js>"myMethod.res.[code].[category].[name] = foo"</js> or
-	 * <js>"MyServlet.myMethod.res.[code].[category].[name] = foo"</js>).
-	 */
-	Parameter[] headers() default {};
-
-	/**
-	 * A definition of the response structure.
-	 * 
-	 * <p>
-	 * It can be a primitive, an array or an object.
-	 * If this field does not exist, it means no content is returned as part of the response.
-	 * As an extension to the <a class="doclink" href="http://swagger.io/specification/#schemaObject">Schema Object</a>,
-	 * its root type value may also be <js>"file"</js>.
-	 * This SHOULD be accompanied by a relevant produces mime-type.
-	 * 
-	 * <h5 class='section'>Example:</h5>
-	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		name=<js>"*"</js>,
-	 * 		swagger=@MethodSwagger(
-	 * 			responses={
-	 * 				<ja>@Response</ja>(value=200,schema=<js>"{type:'string',description:'A serialized Person bean.'}"</js>),
-	 * 			}
-	 * 		)
-	 * </p>
-	 */
-	String schema() default "";
-
-	/**
-	 * HTTP response code.
-	 */
-	int value();
-}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
index bef4796..1461deb 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestMethod.java
@@ -737,7 +737,40 @@ public @interface RestMethod {
 	String[] consumes() default {};
 
 	/**
+	/**
 	 * Provides swagger-specific metadata on this method.
+	 * 
+	 * <p>
+	 * Used to populate the auto-generated OPTIONS swagger documentation.
+	 * 
+	 * <p>
+	 * The format of this annotation is JSON when all individual parts are concatenated.
+	 * <br>The starting and ending <js>'{'</js>/<js>'}'</js> characters around the entire value are optional.
+	 * 
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(
+	 * 		name=<jsf>PUT</jsf>, 
+	 * 		path=<js>"/{propertyName}"</js>,
+	 * 
+	 * 		<jc>// Swagger info.</jc>
+	 * 		swagger={
+	 * 			<js>"parameters:["</js>,
+	 * 				<js>"{name:'propertyName',in:'path',description:'The system property name.'},"</js>,
+	 * 				<js>"{in:'body',description:'The new system property value.'}"</js>,
+	 * 			<js>"],"</js>,
+	 * 			<js>"responses:{"</js>,
+	 * 				<js>"302: {headers:{Location:{description:'The root URL of this resource.'}}},"</js>,
+	 * 				<js>"403: {description:'User is not an admin.'}"</js>,
+	 * 			<js>"}"</js>
+	 * 		}
+	 * 	)
+	 * </p>
+	 * 
+	 * <h5 class='section'>See Also:</h5>
+	 * <ul>
+	 * 	<li class='jm'>{@link RestInfoProvider#getSwagger(RestRequest)}
+	 * </ul>
 	 */
-	MethodSwagger swagger() default @MethodSwagger;
+	String[] swagger() default {};
 }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
index 37973e6..f85a549 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestResource.java
@@ -839,20 +839,24 @@ public @interface RestResource {
 	 * <p>
 	 * Used to populate the auto-generated OPTIONS swagger documentation.
 	 * 
+	 * <p>
+	 * The format of this annotation is JSON when all individual parts are concatenated.
+	 * <br>The starting and ending <js>'{'</js>/<js>'}'</js> characters around the entire value are optional.
+	 * 
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		path=<js>"/addressBook"</js>,
 	 * 
 	 * 		<jc>// Swagger info.</jc>
-	 * 		swagger=<ja>@ResourceSwagger</ja>(
-	 * 			contact=<js>"{name:'John Smith',email:'john@smith.com'}"</js>,
-	 * 			license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>,
-	 * 			version=<js>"2.0"</js>,
-	 * 			termsOfService=<js>"You're on your own."</js>,
-	 * 			tags=<js>"[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}]"</js>,
-	 * 			externalDocs=<js>"{description:'Home page',url:'http://juneau.apache.org'}"</js>
-	 * 		)
+	 * 		swagger={
+	 * 			<js>"contact:{name:'John Smith',email:'john@smith.com'},"</js>,
+	 * 			<js>"license:{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'},"</js>,
+	 * 			<js>"version:'2.0',</js>,
+	 * 			<js>"termsOfService:'You are on your own.',"</js>,
+	 * 			<js>"tags:[{name:'Java',description:'Java utility',externalDocs:{description:'Home page',url:'http://juneau.apache.org'}}],"</js>,
+	 * 			<js>"externalDocs:{description:'Home page',url:'http://juneau.apache.org'}"</js>
+	 * 		}
 	 * 	)
 	 * </p>
 	 * 
@@ -861,7 +865,7 @@ public @interface RestResource {
 	 * 	<li class='jm'>{@link RestInfoProvider#getSwagger(RestRequest)}
 	 * </ul>
 	 */
-	ResourceSwagger swagger() default @ResourceSwagger;
+	String[] swagger() default {};
 
 	/**
 	 * Optional servlet title.

-- 
To stop receiving notification emails like this one, please contact
jamesbognar@apache.org.

Mime
View raw message