juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [1/2] juneau git commit: Javadoc updates.
Date Fri, 12 Jan 2018 02:02:31 GMT
Repository: juneau
Updated Branches:
  refs/heads/master bb3766038 -> 7a5905446


http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-doc/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index e2c8d9a..903684b 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -2365,24 +2365,33 @@
 		
 		<jc>// Must provide a no-arg constructor!</jc>
 		<jk>public</jk> AddressFilter() {
-			properties(<js>"street,city,state"</js>);  <jc>// The properties we want exposed.</jc>
+			includeProperties(<js>"street,city,state"</js>);  <jc>// The properties we want exposed.</jc>
 		}
 	}	
 				</p>		
 				<p>
-					Bean filters are added to serializers and parsers using the <code>beanFilters(Object...)</code> method.
-					<br>For example:
+					Bean filters are added to serializers and parsers using the following:
+				</p>
+				<ul>
+					<li class='jf'>{@link org.apache.juneau.BeanContext#BEAN_beanFilters}
+					<li class='jm'>{@link org.apache.juneau.BeanContextBuilder#beanFilters(Object...)}
+				</ul>
+				<p>
+					For example:
 				</p>
 				<p class='bcode'>			
 	<jc>// Create a new JSON serializer and associate a bean filter with it.</jc>
-	WriterSerializer s = JsonSerializer.<jsm>create</jsm>().beanFilters(AddressFilter.<jk>class</jk>).build();
+	WriterSerializer s = JsonSerializer
+		.<jsm>create</jsm>()
+		.beanFilters(AddressFilter.<jk>class</jk>)
+		.build();
 				</p>
 				<p>
 					Note that if you use the annotation, you do NOT need to set anything on the serializers/parsers.
 					<br>The annotations will be detected and bean filters will automatically be created for them.
 				</p>
 				<p>
-					The <code>beanFilter(Class...)</code> method also allows you to pass in interfaces.
+					The {@link org.apache.juneau.BeanContextBuilder#beanFilters(Object...)} method also allows you to pass in interfaces.
 					<br>Any class that's not a subclass of {@link org.apache.juneau.transform.BeanFilterBuilder} get interpreted 
 					as bean interface classes.
 					<br>These cause bean implementations of those interfaces to only expose the properties defined on the 
@@ -2398,11 +2407,18 @@
 	
 	<jc>// Our bean implementation.</jc>
 	<jk>public class</jk> Address <jk>implements</jk> AddressInterface {
-		...
+		<jk>public</jk> String getStreet() {...};
+		<jk>public</jk> String getCity() {...};
+		<jk>public</jk> String getState() {...};
+		<jk>public</jk> String getCountry() {...};
 	}
 	
 	<jc>// Create a new JSON serializer that only exposes street,city,state on Address bean.</jc>
-	WriterSerializer s = JsonSerializer.<jsm>create</jsm>().beanFilters(AddressInterface.<jk>class</jk>).build();
+	<jc>// The 'country' field will be ignored.</jc>
+	WriterSerializer s = JsonSerializer
+		.<jsm>create</jsm>()
+		.beanFilters(AddressInterface.<jk>class</jk>)
+		.build();
 				</p>			
 			</div>
 
@@ -2423,7 +2439,7 @@
 		<jk>public</jk> String <jf>foo</jf>=<js>"foo"</js>;
 	}
 
-	<jc>// Subclass 1</jc>
+	<jc>// Subclass</jc>
 	<jk>public class</jk> MyClassBar <jk>extends</jk> MyClass {
 		<jk>public</jk> String <jf>bar</jf>=<js>"bar"</js>;
 	}
@@ -2445,8 +2461,12 @@
 					When serialized, the serialized bean will only include properties defined on the parent class.
 				</p>
 				<p class='bcode'>
-	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = JsonSerializer.<jsm>create</jsm>().simple().beanFilters(MyBeanFilter.<jk>class</jk>).build();
+	WriterSerializer s = JsonSerializer
+		.<jsm>create</jsm>()
+		.simple()
+		.beanFilters(MyBeanFilter.<jk>class</jk>)
+		.build();
+		
 	MyClass c = <jk>new</jk> MyClassBar();
 	String json = s.serialize(p);  <jc>// Prints "{foo:'foo'}"</jc>
 				</p>	
@@ -2454,6 +2474,7 @@
 					The equivalent can be done through an annotation on the parent class, which applies to all child classes:
 				</p>
 				<p class='bcode'>
+	<jc>// All subclasses of MyClass should only show the 'foo' property.</jc>
 	<ja>@Bean</ja>(interfaceClass=MyClass.<jk>class</jk>)
 	<jk>public abstract class</jk> MyClass {
 		<jk>public</jk> String <jf>foo</jf>=<js>"foo"</js>;
@@ -2463,6 +2484,7 @@
 					The annotation can also be applied on the individual child classes, like so...
 				</p>
 				<p class='bcode'>
+	<jc>// Only serialize 'foo' property from parent class.</jc>
 	<ja>@Bean</ja>(interfaceClass=MyClass.<jk>class</jk>)
 	<jk>public class</jk> MyClassBar <jk>extends</jk> MyClass {
 		<jk>public</jk> String <jf>bar</jf>=<js>"bar"</js>;
@@ -2475,9 +2497,16 @@
 					passing in <code>MyClass.<jk>class</jk></code> to the serializer, like so:
 				</p>
 				<p class='bcode'>
-	<jc>// Serialize to JSON</jc>
-	WriterSerializer s = JsonSerializer.<jsm>create</jsm>().beanFilters(MyClass.<jk>class</jk>).build();
+	WriterSerializer s = JsonSerializer
+		.<jsm>create</jsm>()
+		.beanFilters(MyClass.<jk>class</jk>)  <jc>Shortcut!</jc>
+		.build();
 				</p>
+				<p>
+					The {@link org.apache.juneau.transform.BeanFilterBuilder#stopClass(Class)} method and 
+					{@link org.apache.juneau.annotation.Bean#stopClass() @Bean.stopClass()} annotation are equivalent,
+					but filters from the other direction.
+					<br>(i.e. filter out properties found on parent classes and interfaces)
 			</div>
 
 			<!-- =================================================================================================== -->

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/FormData.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/FormData.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/FormData.java
index 7b38884..4548d4b 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/FormData.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/FormData.java
@@ -62,17 +62,9 @@ import org.apache.juneau.rest.*;
 public @interface FormData {
 
 	/**
-	 * FORM parameter name.
-	 */
-	String name() default "";
-
-	/**
-	 * A synonym for {@link #name()}.
-	 *
-	 * <p>
-	 * Allows you to use shortened notation if you're only specifying the name.
+	 * The default value for this form-data parameter if it's not present in the request.
 	 */
-	String value() default "";
+	String def() default "";
 
 	/**
 	 * Specify <jk>true</jk> if using multi-part parameters to represent collections and arrays.
@@ -89,6 +81,11 @@ public @interface FormData {
 	boolean multipart() default false;
 
 	/**
+	 * FORM parameter name.
+	 */
+	String name() default "";
+
+	/**
 	 * Specifies the {@link HttpPartParser} class used for parsing values from strings.
 	 *
 	 * <p>
@@ -98,7 +95,10 @@ public @interface FormData {
 	Class<? extends HttpPartParser> parser() default HttpPartParser.Null.class;
 
 	/**
-	 * The default value for this form-data parameter if it's not present in the request.
+	 * A synonym for {@link #name()}.
+	 *
+	 * <p>
+	 * Allows you to use shortened notation if you're only specifying the name.
 	 */
-	String def() default "";
+	String value() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Header.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Header.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Header.java
index 3e038f2..0ee9a8b 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Header.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Header.java
@@ -48,22 +48,14 @@ import org.apache.juneau.httppart.*;
 public @interface Header {
 
 	/**
-	 * HTTP header name.
-	 */
-	String name() default "";
-
-	/**
-	 * A synonym for {@link #name()}.
-	 *
-	 * <p>
-	 * Allows you to use shortened notation if you're only specifying the name.
+	 * The default value for this header if it's not present in the request.
 	 */
-	String value() default "";
+	String def() default "";
 
 	/**
-	 * The default value for this header if it's not present in the request.
+	 * HTTP header name.
 	 */
-	String def() default "";
+	String name() default "";
 
 	/**
 	 * Specifies the {@link HttpPartParser} class used for parsing values from strings.
@@ -73,4 +65,12 @@ public @interface Header {
 	 * <br>You can use {@link SimplePartParser} to parse POJOs that are directly convertible from <code>Strings</code>.
 	 */
 	Class<? extends HttpPartParser> parser() default HttpPartParser.Null.class;
+
+	/**
+	 * A synonym for {@link #name()}.
+	 *
+	 * <p>
+	 * Allows you to use shortened notation if you're only specifying the name.
+	 */
+	String value() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
index 3f4c39d..587ea5a 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java
@@ -77,21 +77,20 @@ import org.apache.juneau.rest.widget.*;
 public @interface HtmlDoc {
 
 	/**
-	 * Sets the HTML header section contents.
+	 * Sets the HTML aside section contents.
 	 *
 	 * <p>
 	 * The format of this value is HTML.
 	 *
 	 * <p>
-	 * The page header normally contains the title and description, but this value can be used to override the contents
-	 * to be whatever you want.
+	 * The aside section typically floats on the right side of the page.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			header={
-	 * 				<js>"&lt;p&gt;This is my REST interface&lt;/p&gt;"</js>
+	 * 			aside={
+	 * 				<js>"&lt;p&gt;Custom aside content&lt;/p&gt;"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -100,46 +99,40 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
-	 * 		A value of <js>"NONE"</js> can be used to force no header.
-	 * 	<li>
 	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
+	 * 		A value of <js>"NONE"</js> can be used to force no value.
+	 * 	<li>
 	 * 		Multiple values are combined with newlines into a single string.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#header(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#aside(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
-	 * 		parent class if not overridden.
+	 * 		parent class.
 	 * 	<li>
 	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] header() default {};
+	String[] aside() default {};
 
 	/**
-	 * Sets the links in the HTML nav section.
+	 * Sets the HTML footer section contents.
 	 *
 	 * <p>
-	 * The value is an array of strings with two possible values:
-	 * <ul>
-	 * 	<li>A key-value pair representing a hyperlink label and href:
-	 * 		<br><js>"google: http://google.com"</js>
-	 * 	<li>Arbitrary HTML.
-	 * </ul>
+	 * The format of this value is HTML.
 	 *
 	 * <p>
-	 * The page links are positioned immediately under the title and text.
+	 * The footer section typically floats on the bottom of the page.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			navlinks={
-	 * 				<js>"up: request:/.."</js>,
-	 * 				<js>"options: servlet:/?method=OPTIONS"</js>
+	 * 			footer={
+	 * 				<js>"&lt;p&gt;Custom footer content&lt;/p&gt;"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -153,30 +146,22 @@ public @interface HtmlDoc {
 	 * 	<li>
 	 * 		A value of <js>"NONE"</js> can be used to force no value.
 	 * 	<li>
-	 * 		This field can also use URIs of any support type in {@link UriResolver}.
+	 * 		Multiple values are combined with newlines into a single string.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#navlinks(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#footer(Object[])} methods.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
 	 * 		parent class.
 	 * 	<li>
-	 * 		The parent links can be included by adding the literal <js>"INHERIT"</js> as a value.
-	 * 		<br>Use the syntax <js>"key[index]: value"</js> or <js>"[index]: value"</js> to specify an index location
-	 * 		to place a link inside the list of parent links.
+	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] navlinks() default {};
+	String[] footer() default {};
 
 	/**
-	 * Sets the HTML nav section contents.
-	 *
-	 * <p>
-	 * The format of this value is HTML.
-	 *
-	 * <p>
-	 * The nav section of the page contains the links.
+	 * Adds arbitrary content to the HTML <xt>&lt;head&gt;</xt> element on the page.
 	 *
 	 * <p>
 	 * The format of this value is HTML.
@@ -185,8 +170,12 @@ public @interface HtmlDoc {
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			nav={
-	 * 				<js>"&lt;p&gt;Custom nav content&lt;/p&gt;"</js>
+	 * 			head={
+	 * 				<jc>// Add a shortcut link in the browser tab</jc>
+	 * 				<js>"<link rel='icon' href='$U{servlet:/htdocs/mypageicon.ico}'>"</js>,
+	 *
+	 * 				<jc>// Reload the page every 5 seconds </jc>
+	 * 				<js>"<meta http-equiv='refresh' content='5'>"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -195,42 +184,39 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
-	 * 		When a value is specified, the {@link #navlinks()} value will be ignored.
-	 * 	<li>
 	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
 	 * 		A value of <js>"NONE"</js> can be used to force no value.
 	 * 	<li>
-	 * 		Multiple values are combined with newlines into a single string.
+	 * 		The head content from the parent can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#nav(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#head(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
 	 * 		parent class.
-	 * 	<li>
-	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] nav() default {};
+	String[] head() default {};
 
 	/**
-	 * Sets the HTML aside section contents.
+	 * Sets the HTML header section contents.
 	 *
 	 * <p>
 	 * The format of this value is HTML.
 	 *
 	 * <p>
-	 * The aside section typically floats on the right side of the page.
+	 * The page header normally contains the title and description, but this value can be used to override the contents
+	 * to be whatever you want.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			aside={
-	 * 				<js>"&lt;p&gt;Custom aside content&lt;/p&gt;"</js>
+	 * 			header={
+	 * 				<js>"&lt;p&gt;This is my REST interface&lt;/p&gt;"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -239,40 +225,43 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
+	 * 		A value of <js>"NONE"</js> can be used to force no header.
+	 * 	<li>
 	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
-	 * 		A value of <js>"NONE"</js> can be used to force no value.
-	 * 	<li>
 	 * 		Multiple values are combined with newlines into a single string.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#aside(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#header(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
-	 * 		parent class.
+	 * 		parent class if not overridden.
 	 * 	<li>
 	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] aside() default {};
+	String[] header() default {};
 
 	/**
-	 * Sets the HTML footer section contents.
+	 * Sets the HTML nav section contents.
 	 *
 	 * <p>
 	 * The format of this value is HTML.
 	 *
 	 * <p>
-	 * The footer section typically floats on the bottom of the page.
+	 * The nav section of the page contains the links.
+	 *
+	 * <p>
+	 * The format of this value is HTML.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			footer={
-	 * 				<js>"&lt;p&gt;Custom footer content&lt;/p&gt;"</js>
+	 * 			nav={
+	 * 				<js>"&lt;p&gt;Custom nav content&lt;/p&gt;"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -281,6 +270,8 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
+	 * 		When a value is specified, the {@link #navlinks()} value will be ignored.
+	 * 	<li>
 	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
@@ -288,7 +279,7 @@ public @interface HtmlDoc {
 	 * 	<li>
 	 * 		Multiple values are combined with newlines into a single string.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#footer(Object[])} methods.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#nav(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
@@ -298,21 +289,29 @@ public @interface HtmlDoc {
 	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] footer() default {};
+	String[] nav() default {};
 
 	/**
-	 * Sets the HTML CSS style section contents.
+	 * Sets the links in the HTML nav section.
 	 *
 	 * <p>
-	 * The format of this value is CSS.
+	 * The value is an array of strings with two possible values:
+	 * <ul>
+	 * 	<li>A key-value pair representing a hyperlink label and href:
+	 * 		<br><js>"google: http://google.com"</js>
+	 * 	<li>Arbitrary HTML.
+	 * </ul>
+	 *
+	 * <p>
+	 * The page links are positioned immediately under the title and text.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			style={
-	 * 				<js>".red{color:red;}"</js>,
-	 * 				<js>".blue{color:blue;}"</js>
+	 * 			navlinks={
+	 * 				<js>"up: request:/.."</js>,
+	 * 				<js>"options: servlet:/?method=OPTIONS"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -326,37 +325,48 @@ public @interface HtmlDoc {
 	 * 	<li>
 	 * 		A value of <js>"NONE"</js> can be used to force no value.
 	 * 	<li>
-	 * 		Multiple values are combined with newlines into a single string.
+	 * 		This field can also use URIs of any support type in {@link UriResolver}.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#style(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#navlinks(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
 	 * 		parent class.
 	 * 	<li>
-	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
+	 * 		The parent links can be included by adding the literal <js>"INHERIT"</js> as a value.
+	 * 		<br>Use the syntax <js>"key[index]: value"</js> or <js>"[index]: value"</js> to specify an index location
+	 * 		to place a link inside the list of parent links.
 	 * </ul>
 	 */
-	String[] style() default {};
+	String[] navlinks() default {};
 
 	/**
-	 * Sets the CSS URL in the HTML CSS style section.
-	 *
-	 * <p>
-	 * The format of this value is a URL.
+	 * Specifies the text to display when serializing an empty array or collection.
+	 */
+	String noResultsMessage() default "no results";
+
+	/**
+	 * Shorthand method for forcing the rendered HTML content to be no-wrap.
 	 *
 	 * <p>
-	 * Specifies the URL to the stylesheet to add as a link in the style tag in the header.
+	 * This only applies to the rendered data portion of the page.
+	 */
+	boolean nowrap() default false;
+
+	/**
+	 * Sets the HTML script section contents.
 	 *
 	 * <p>
-	 * The format of this value is CSS.
+	 * The format of this value is Javascript.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			stylesheet=<js>"http://someOtherHost/stealTheir.css"</js>
+	 * 			script={
+	 * 				<js>"alert('Hello!')"</js>
+	 * 			}
 	 * 		)
 	 * 	)
 	 * </p>
@@ -364,32 +374,38 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
-	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols
-	 * 		defined by {@link UriResolver}.
+	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#stylesheet(Object[])} method.
+	 * 		A value of <js>"NONE"</js> can be used to force no value.
+	 * 	<li>
+	 * 		Multiple values are combined with newlines into a single string.
+	 * 	<li>
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#script(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
 	 * 		On servlet/resource classes, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the
 	 * 		parent class.
+	 * 	<li>
+	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] stylesheet() default {};
+	String[] script() default {};
 
 	/**
-	 * Sets the HTML script section contents.
+	 * Sets the HTML CSS style section contents.
 	 *
 	 * <p>
-	 * The format of this value is Javascript.
+	 * The format of this value is CSS.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			script={
-	 * 				<js>"alert('Hello!')"</js>
+	 * 			style={
+	 * 				<js>".red{color:red;}"</js>,
+	 * 				<js>".blue{color:blue;}"</js>
 	 * 			}
 	 * 		)
 	 * 	)
@@ -405,7 +421,7 @@ public @interface HtmlDoc {
 	 * 	<li>
 	 * 		Multiple values are combined with newlines into a single string.
 	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#script(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#style(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
@@ -415,25 +431,25 @@ public @interface HtmlDoc {
 	 * 		The parent value can be included by adding the literal <js>"INHERIT"</js> as a value.
 	 * </ul>
 	 */
-	String[] script() default {};
+	String[] style() default {};
 
 	/**
-	 * Adds arbitrary content to the HTML <xt>&lt;head&gt;</xt> element on the page.
+	 * Sets the CSS URL in the HTML CSS style section.
 	 *
 	 * <p>
-	 * The format of this value is HTML.
+	 * The format of this value is a URL.
+	 *
+	 * <p>
+	 * Specifies the URL to the stylesheet to add as a link in the style tag in the header.
+	 *
+	 * <p>
+	 * The format of this value is CSS.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestResource</ja>(
 	 * 		htmldoc=<ja>@HtmlDoc</ja>(
-	 * 			head={
-	 * 				<jc>// Add a shortcut link in the browser tab</jc>
-	 * 				<js>"<link rel='icon' href='$U{servlet:/htdocs/mypageicon.ico}'>"</js>,
-	 *
-	 * 				<jc>// Reload the page every 5 seconds </jc>
-	 * 				<js>"<meta http-equiv='refresh' content='5'>"</js>
-	 * 			}
+	 * 			stylesheet=<js>"http://someOtherHost/stealTheir.css"</js>
 	 * 		)
 	 * 	)
 	 * </p>
@@ -441,14 +457,11 @@ public @interface HtmlDoc {
 	 * <h6 class='topic'>Other Notes</h6>
 	 * <ul class='spaced-list'>
 	 * 	<li>
-	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+	 * 		This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>) and can use URL protocols
+	 * 		defined by {@link UriResolver}.
 	 * 		<br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 * 	<li>
-	 * 		A value of <js>"NONE"</js> can be used to force no value.
-	 * 	<li>
-	 * 		The head content from the parent can be included by adding the literal <js>"INHERIT"</js> as a value.
-	 * 	<li>
-	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#head(Object[])} method.
+	 * 		The programmatic equivalent to this annotation is the {@link HtmlDocBuilder#stylesheet(Object[])} method.
 	 * 	<li>
 	 * 		On methods, this value is inherited from the <ja>@HtmlDoc</ja> annotation on the servlet/resource class.
 	 * 	<li>
@@ -456,20 +469,7 @@ public @interface HtmlDoc {
 	 * 		parent class.
 	 * </ul>
 	 */
-	String[] head() default {};
-
-	/**
-	 * Shorthand method for forcing the rendered HTML content to be no-wrap.
-	 *
-	 * <p>
-	 * This only applies to the rendered data portion of the page.
-	 */
-	boolean nowrap() default false;
-
-	/**
-	 * Specifies the text to display when serializing an empty array or collection.
-	 */
-	String noResultsMessage() default "no results";
+	String[] stylesheet() default {};
 
 	/**
 	 * Specifies the template class to use for rendering the HTML page.

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/MethodSwagger.java
----------------------------------------------------------------------
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
index 8500286..19fb015 100644
--- 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
@@ -20,31 +20,21 @@ import org.apache.juneau.rest.*;
 public @interface MethodSwagger {
 
 	/**
-	 * Optional external documentation information for the exposed API.
-	 *
-	 * <p>
-	 * Used to populate the Swagger external documentation field.
+	 * Optional deprecated flag for the exposed API.
 	 *
 	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		description: string,
-	 * 		url: string
-	 * 	}
-	 * </p>
+	 * Used to populate the Swagger deprecated field.
 	 *
 	 * <p>
-	 * The default value pulls the description from the <code>(className.?)[javaMethodName].externalDocs</code> entry in
+	 * The default value pulls the description from the <code>(className.?)[javaMethodName].deprecated</code> entry in
 	 * the servlet resource bundle.
-	 * (e.g. <js>"MyClass.myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js> or
-	 * <js>"myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js>).
+	 * (e.g. <js>"MyClass.myMethod.deprecated = true"</js> or <js>"myMethod.deprecated = foo,bar"</js>).
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestMethod</ja>(
 	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			<js>"{url:'http://juneau.apache.org'}"</js>
+	 * 			deprecated=<jk>true</jk>
 	 * 		)
 	 * 	)
 	 * </p>
@@ -54,59 +44,36 @@ public @interface MethodSwagger {
 	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
 	 * <p>
-	 * Corresponds to the swagger field <code>/paths/{path}/{method}/externalDocs</code>.
+	 * Corresponds to the swagger field <code>/paths/{path}/{method}/deprecated</code>.
 	 */
-	String externalDocs() default "";
+	boolean deprecated() default false;
 
 	/**
-	 * Optional tagging information for the exposed API.
-	 *
-	 * <p>
-	 * Used to populate the Swagger tags field.
+	 * Optional external documentation information for the exposed API.
 	 *
 	 * <p>
-	 * A comma-delimited list of tags for API documentation control.
-	 * Tags can be used for logical grouping of operations by resources or any other qualifier.
+	 * Used to populate the Swagger external documentation field.
 	 *
 	 * <p>
-	 * The default value pulls the description from the <code>(className.?)[javaMethodName].tags</code> entry in the
-	 * servlet resource bundle.
-	 * (e.g. <js>"MyClass.myMethod.tags = foo,bar"</js> or <js>"myMethod.tags = foo,bar"</js>).
-	 *
-	 * <h5 class='section'>Example:</h5>
+	 * A simplified JSON string with the following fields:
 	 * <p class='bcode'>
-	 * 	<ja>@RestMethod</ja>(
-	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			tags=<js>"foo,bar"</js>
-	 * 		)
-	 * 	)
+	 * 	{
+	 * 		description: string,
+	 * 		url: string
+	 * 	}
 	 * </p>
 	 *
 	 * <p>
-	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
-	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
-	 *
-	 * <p>
-	 * Corresponds to the swagger field <code>/paths/{path}/{method}/tags</code>.
-	 */
-	String tags() default "";
-
-	/**
-	 * Optional deprecated flag for the exposed API.
-	 *
-	 * <p>
-	 * Used to populate the Swagger deprecated field.
-	 *
-	 * <p>
-	 * The default value pulls the description from the <code>(className.?)[javaMethodName].deprecated</code> entry in
+	 * The default value pulls the description from the <code>(className.?)[javaMethodName].externalDocs</code> entry in
 	 * the servlet resource bundle.
-	 * (e.g. <js>"MyClass.myMethod.deprecated = true"</js> or <js>"myMethod.deprecated = foo,bar"</js>).
+	 * (e.g. <js>"MyClass.myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js> or
+	 * <js>"myMethod.externalDocs = {url:'http://juneau.apache.org'}"</js>).
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
 	 * 	<ja>@RestMethod</ja>(
 	 * 		swagger=<ja>@MethodSwagger</ja>(
-	 * 			deprecated=<jk>true</jk>
+	 * 			<js>"{url:'http://juneau.apache.org'}"</js>
 	 * 		)
 	 * 	)
 	 * </p>
@@ -116,9 +83,9 @@ public @interface MethodSwagger {
 	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
 	 * <p>
-	 * Corresponds to the swagger field <code>/paths/{path}/{method}/deprecated</code>.
+	 * Corresponds to the swagger field <code>/paths/{path}/{method}/externalDocs</code>.
 	 */
-	boolean deprecated() default false;
+	String externalDocs() default "";
 
 	/**
 	 * Optional parameter descriptions.
@@ -211,4 +178,37 @@ public @interface MethodSwagger {
 	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 */
 	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.
+	 * Tags can be used for logical grouping of operations by resources or any other qualifier.
+	 *
+	 * <p>
+	 * The default value pulls the description from the <code>(className.?)[javaMethodName].tags</code> entry in the
+	 * servlet resource bundle.
+	 * (e.g. <js>"MyClass.myMethod.tags = foo,bar"</js> or <js>"myMethod.tags = foo,bar"</js>).
+	 *
+	 * <h5 class='section'>Example:</h5>
+	 * <p class='bcode'>
+	 * 	<ja>@RestMethod</ja>(
+	 * 		swagger=<ja>@MethodSwagger</ja>(
+	 * 			tags=<js>"foo,bar"</js>
+	 * 		)
+	 * 	)
+	 * </p>
+	 *
+	 * <p>
+	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
+	 *
+	 * <p>
+	 * Corresponds to the swagger field <code>/paths/{path}/{method}/tags</code>.
+	 */
+	String tags() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Parameter.java
----------------------------------------------------------------------
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
index 0df125f..80ab366 100644
--- 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
@@ -43,33 +43,45 @@ import java.lang.annotation.*;
 public @interface Parameter {
 
 	/**
-	 * The location of the parameter.
+	 * Declares the value of the parameter that the server will use if none is provided.
 	 *
 	 * <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>
+	 * 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 in() default "";
+	String _default() default "";
 
 	/**
-	 * The name of the parameter (e.g. <js>"Content-Range"</js>).
+	 * Sets the ability to pass empty-valued parameters.
 	 *
 	 * <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.
+	 * 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>.
 	 */
-	String name() default "";
+	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>).
@@ -88,22 +100,34 @@ public @interface Parameter {
 	String description() default "";
 
 	/**
-	 * Determines whether this parameter is mandatory.
+	 * The extending format for the previously mentioned <code>type</code>.
 	 *
 	 * <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>.
+	 * See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further
+	 * details.
 	 */
-	boolean required() default false;
+	String format() default "";
 
 	/**
-	 * The schema defining the type used for the body parameter.
+	 * The location of the parameter.
 	 *
 	 * <p>
-	 * Only applicable for <code>in</code> of type <js>"body"</js>.
+	 * 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>
-	 * The schema is a JSON object specified <a class="doclink" href="http://swagger.io/specification/#schemaObject">here</a>.
+	 * Describes the type of items in the array.
 	 *
 	 * <h5 class='section'>Example:</h5>
 	 * <p class='bcode'>
@@ -112,49 +136,49 @@ public @interface Parameter {
 	 * 			<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>)
+	 * 				type=<js>"array"</js>,
+	 * 				items=<js>"{type:'string',collectionFormat:'csv'}"</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>.
+	 * See <a class="doclink" href="http://swagger.io/specification/#itemsObject">Items Object</a> for further details.
 	 */
-	String type() default "string";
+	String items() default "";
 
 	/**
-	 * The extending format for the previously mentioned <code>type</code>.
+	 * The name of the parameter (e.g. <js>"Content-Range"</js>).
 	 *
 	 * <p>
-	 * See <a class="doclink" href="http://swagger.io/specification/#dataTypeFormat">Data Type Formats</a> for further
-	 * details.
+	 * 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 format() default "";
+	String name() default "";
 
 	/**
-	 * Sets the ability to pass empty-valued parameters.
+	 * Determines whether this parameter is mandatory.
 	 *
 	 * <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>.
+	 * 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 allowEmptyValue() default false;
+	boolean required() default false;
 
 	/**
-	 * Required if <code>type</code> is <js>"array"</js>.
+	 * The schema defining the type used for the body parameter.
 	 *
 	 * <p>
-	 * Describes the type of items in the array.
+	 * 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'>
@@ -163,46 +187,22 @@ public @interface Parameter {
 	 * 			<ja>@Parameter</ja>(
 	 * 				in=<js>"header"</js>,
 	 * 				name=<js>"Foo"</js>,
-	 * 				type=<js>"array"</js>,
-	 * 				items=<js>"{type:'string',collectionFormat:'csv'}"</js>)
+	 * 				schema=<js>"{format:'string',title:'Foo header',description:'Header that contains the Foo value.'}"</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 "";
-
-	/**
-	 * 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 "";
+	String schema() default "";
 
 	/**
-	 * Declares the value of the parameter that the server will use if none is provided.
+	 * The type of the parameter.
 	 *
 	 * <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.
+	 * 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 _default() default "";
+	String type() default "string";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Path.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Path.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Path.java
index cd08438..b3dc143 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Path.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Path.java
@@ -81,14 +81,6 @@ public @interface Path {
 	 * Optional if the attributes are specified in the same order as in the URL path pattern.
 	 */
 	String name() default "";
-
-	/**
-	 * A synonym for {@link #name()}.
-	 *
-	 * <p>
-	 * Allows you to use shortened notation if you're only specifying the name.
-	 */
-	String value() default "";
 	
 	/**
 	 * Specifies the {@link HttpPartParser} class used for parsing values from strings.
@@ -98,4 +90,12 @@ public @interface Path {
 	 * <br>You can use {@link SimplePartParser} to parse POJOs that are directly convertible from <code>Strings</code>.
 	 */
 	Class<? extends HttpPartParser> parser() default HttpPartParser.Null.class;
+
+	/**
+	 * A synonym for {@link #name()}.
+	 *
+	 * <p>
+	 * Allows you to use shortened notation if you're only specifying the name.
+	 */
+	String value() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Query.java
----------------------------------------------------------------------
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Query.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Query.java
index 2d2aa54..3f10875 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Query.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Query.java
@@ -58,17 +58,9 @@ import org.apache.juneau.rest.*;
 public @interface Query {
 
 	/**
-	 * URL query parameter name.
-	 */
-	String name() default "";
-
-	/**
-	 * A synonym for {@link #name()}.
-	 *
-	 * <p>
-	 * Allows you to use shortened notation if you're only specifying the name.
+	 * The default value for this query parameter if it's not present in the request.
 	 */
-	String value() default "";
+	String def() default "";
 
 	/**
 	 * Specify <jk>true</jk> if using multi-part parameters to represent collections and arrays.
@@ -85,6 +77,11 @@ public @interface Query {
 	boolean multipart() default false;
 
 	/**
+	 * URL query parameter name.
+	 */
+	String name() default "";
+
+	/**
 	 * Specifies the {@link HttpPartParser} class used for parsing values from strings.
 	 *
 	 * <p>
@@ -93,9 +90,11 @@ public @interface Query {
 	 */
 	Class<? extends HttpPartParser> parser() default HttpPartParser.Null.class;
 
-
 	/**
-	 * The default value for this query parameter if it's not present in the request.
+	 * A synonym for {@link #name()}.
+	 *
+	 * <p>
+	 * Allows you to use shortened notation if you're only specifying the name.
 	 */
-	String def() default "";
+	String value() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/ResourceSwagger.java
----------------------------------------------------------------------
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
index 442ec42..f536ba2 100644
--- 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
@@ -18,28 +18,6 @@ import org.apache.juneau.rest.*;
  * Extended annotation for {@link RestResource#swagger() @RestResource.swagger()}.
  */
 public @interface ResourceSwagger {
-	/**
-	 * 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>
-	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
-	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
-	 *
-	 * <p>
-	 * Corresponds to the swagger field <code>/info/termsOfService</code>.
-	 *
-	 * <p>
-	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTermsOfService(RestRequest)}
-	 * method.
-	 */
-	String termsOfService() default "";
 
 	/**
 	 * Optional contact information for the exposed API.
@@ -84,67 +62,87 @@ public @interface ResourceSwagger {
 	String contact() default "";
 
 	/**
-	 * Optional license information for the exposed API.
+	 * Optional external documentation information for the exposed API.
 	 *
 	 * <p>
-	 * It is used to populate the Swagger license field and to display on HTML pages.
+	 * 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'>
 	 * 	{
-	 * 		name: string,
+	 * 		description: 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>).
+	 * 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>(
-	 * 			license=<js>"{name:'Apache 2.0',url:'http://www.apache.org/licenses/LICENSE-2.0.html'}"</js>
+	 * 			externalDocs=<js>"{url:'http://juneau.apache.org'}"</js>
 	 * 		)
 	 * 	)
 	 * </p>
 	 *
 	 * <p>
 	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
-	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
+	 * See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
 	 * <p>
-	 * Corresponds to the swagger field <code>/info/license</code>.
+	 * Corresponds to the swagger field <code>/tags</code>.
 	 *
 	 * <p>
-	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getLicense(RestRequest)} method.
+	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)}
+	 * method.
 	 */
-	String license() default "";
+	String externalDocs() default "";
 
 	/**
-	 * Provides the version of the application API (not to be confused with the specification version).
+	 * Optional license information for the exposed API.
 	 *
 	 * <p>
-	 * It is used to populate the Swagger version field and to display on HTML pages.
+	 * It is used to populate the Swagger license 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>).
+	 * 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>
 	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
 	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
 	 * <p>
-	 * Corresponds to the swagger field <code>/info/version</code>.
+	 * Corresponds to the swagger field <code>/info/license</code>.
 	 *
 	 * <p>
-	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getVersion(RestRequest)} method.
+	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getLicense(RestRequest)} method.
 	 */
-	String version() default "";
+	String license() default "";
 
 	/**
 	 * Optional tagging information for the exposed API.
@@ -192,46 +190,49 @@ public @interface ResourceSwagger {
 	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTags(RestRequest)} method.
 	 */
 	String tags() default "";
-
+	
 	/**
-	 * Optional external documentation information for the exposed API.
+	 * Optional servlet terms-of-service for this API.
 	 *
 	 * <p>
-	 * It is used to populate the Swagger external documentation field and to display on HTML pages.
+	 * It is used to populate the Swagger terms-of-service field.
 	 *
 	 * <p>
-	 * A simplified JSON string with the following fields:
-	 * <p class='bcode'>
-	 * 	{
-	 * 		description: string,
-	 * 		url: string
-	 * 	}
-	 * </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>
-	 * 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>).
+	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
+	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
-	 * <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>
+	 * Corresponds to the swagger field <code>/info/termsOfService</code>.
+	 *
+	 * <p>
+	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getTermsOfService(RestRequest)}
+	 * method.
+	 */
+	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>
 	 * This field can contain variables (e.g. <js>"$L{my.localized.variable}"</js>).
-	 * See {@link RestContext#getVarResolver()} for the list of supported variables.
+	 * <br>See {@link RestContext#getVarResolver()} for the list of supported variables.
 	 *
 	 * <p>
-	 * Corresponds to the swagger field <code>/tags</code>.
+	 * Corresponds to the swagger field <code>/info/version</code>.
 	 *
 	 * <p>
-	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getExternalDocs(RestRequest)}
-	 * method.
+	 * The programmatic equivalent to this annotation is the {@link RestInfoProvider#getVersion(RestRequest)} method.
 	 */
-	String externalDocs() default "";
+	String version() default "";
 }

http://git-wip-us.apache.org/repos/asf/juneau/blob/7a590544/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Response.java
----------------------------------------------------------------------
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
index 5d7f964..9ef71ad 100644
--- 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
@@ -46,11 +46,6 @@ import org.apache.juneau.rest.*;
 public @interface Response {
 
 	/**
-	 * HTTP response code.
-	 */
-	int value();
-
-	/**
 	 * Optional description.
 	 *
 	 * <p>
@@ -68,6 +63,16 @@ public @interface Response {
 	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>
@@ -91,12 +96,7 @@ public @interface Response {
 	String schema() 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>).
+	 * HTTP response code.
 	 */
-	Parameter[] headers() default {};
+	int value();
 }


Mime
View raw message