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 4e4da1f Javadocs.
4e4da1f is described below
commit 4e4da1f1e93e715110271a96cdc96e43a75c2d10
Author: JamesBognar <[email protected]>
AuthorDate: Mon Jun 11 22:31:09 2018 -0400
Javadocs.
---
.../org/apache/juneau/rest/annotation/Body.java | 9 +-
.../apache/juneau/rest/annotation/FormData.java | 131 ++++++++++++--------
.../org/apache/juneau/rest/annotation/Header.java | 117 +++++++++---------
.../org/apache/juneau/rest/annotation/Path.java | 118 ++++++++++--------
.../org/apache/juneau/rest/annotation/Query.java | 135 ++++++++++++---------
.../apache/juneau/rest/util/AnnotationUtils.java | 7 +-
.../rest/annotation/HeaderAnnotationTest.java | 14 ---
.../juneau/rest/annotation/PathAnnotationTest.java | 14 ---
8 files changed, 301 insertions(+), 244 deletions(-)
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Body.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Body.java
index 8738abb..9e33dab 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Body.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Body.java
@@ -169,7 +169,7 @@ import org.apache.juneau.jsonschema.*;
public @interface Body {
//=================================================================================================================
- // Attributes common to all ParameterInfos
+ // Attributes common to all Swagger Parameter objects
//=================================================================================================================
/**
@@ -212,8 +212,7 @@ public @interface Body {
* <mk>required</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <p>
- * Determines whether this parameter is mandatory.
- * <br>The property MAY be included and its default value is false.
+ * Determines whether the body is mandatory. The default value is
<jk>false</jk>.
*
* <h5 class='section'>Examples:</h5>
* <p class='bcode'>
@@ -276,6 +275,10 @@ public @interface Body {
*/
Schema schema() default @Schema;
+
//=================================================================================================================
+ // Other
+
//=================================================================================================================
+
/**
* TODO
*
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 eabd800..1c42387 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
@@ -82,9 +82,22 @@ public @interface FormData {
boolean multipart() default false;
/**
+ * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ *
+ * <p>
+ * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
+ * <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;
+
+
//=================================================================================================================
+ // Attributes common to all Swagger Parameter objects
+
//=================================================================================================================
+
+ /**
* FORM parameter name.
*
- * Required. The name of the parameter. Parameter names are case
sensitive.
+ * Required. The name of the parameter.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
@@ -112,22 +125,17 @@ public @interface FormData {
String value() default "";
/**
- * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <p>
- * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
- * <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;
-
- /**
- * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ * A brief description of the parameter. This could contain examples of
use.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
* The format is plain text.
* <br>Multiple lines are concatenated with newlines.
+ * <br>TODO - Future support for <a
href='https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown'>MarkDown</a>.
* <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>).
@@ -138,6 +146,9 @@ public @interface FormData {
/**
* <mk>required</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines whether this parameter is mandatory. The default value is
<jk>false</jk>.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
@@ -149,22 +160,35 @@ public @interface FormData {
*/
String required() default "";
+
//=================================================================================================================
+ // Attributes specific to parameters other than body
+
//=================================================================================================================
+
/**
* <mk>type</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The type of the parameter.
+ *
+ * <p>
+ * Note that per the Swagger specification, this value is required and
must be a simple type (e.g. <js>"string"</js>, <js>"number"</js>...).
+ * <br>However, Juneau allows for arbitrarily-complex POJOs such as
beans in form parameters using UON notation, this attribute can be left off in
lieu of a {@link #schema()}
+ * attribute.
+ *
+ * <p>
+ * The possible values are:
+ * <ul>
+ * <li><js>"string"</js>
+ * <li><js>"number"</js>
+ * <li><js>"integer"</js>
+ * <li><js>"boolean"</js>
+ * <li><js>"array"</js>
+ * <li><js>"file"</js>
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The possible values are:
- * <ul>
- * <li><js>"string"</js>
- * <li><js>"number"</js>
- * <li><js>"integer"</js>
- * <li><js>"boolean"</js>
- * <li><js>"array"</js>
- * <li><js>"file"</js>
- * </ul>
- * <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>).
* </ul>
@@ -179,6 +203,10 @@ public @interface FormData {
/**
* <mk>format</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The extending format for the previously mentioned <a
href='https://swagger.io/specification/v2/#parameterType'>type</a>.
+ * See <a
href='https://swagger.io/specification/v2/#dataTypeFormat'>Data Type
Formats</a> for further details.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
@@ -187,21 +215,36 @@ public @interface FormData {
* Supports <a class="doclink"
href="../../../../../overview-summary.html#DefaultRestSvlVariables">initialization-time
and request-time variables</a>
* (e.g. <js>"$L{my.localized.variable}"</js>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String format() default "";
/**
+ * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ *
+ * <p>
+ * Sets the ability to pass empty-valued parameters.
+ * <br>This is valid only for either query or formData parameters and
allows you to send a parameter with a name only or an empty value.
+ *
+ * <h5 class='section'>Notes:</h5>
+ * <ul class='spaced-list'>
+ * <li>
+ * The format is boolean.
+ * <li>
+ * Default value is <jk>false</jk>.
+ * <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>).
+ * </ul>
+ */
+ String allowEmptyValue() default "";
+
+ /**
* <mk>pattern</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is a regular expression according to the
ECMA 262 regular expression dialect.
* <li>
* This string SHOULD be a valid regular expression.
* <li>
@@ -214,18 +257,20 @@ public @interface FormData {
/**
* <mk>collectionFormat</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines the format of the array if type array is used.
+ * <br>Possible values are:
+ * <ul>
+ * <li><js>"csv"</js> (default) - Comma-separated values (e.g.
<js>"foo,bar"</js>).
+ * <li><js>"ssv"</js> - Space-separated values (e.g. <js>"foo
bar"</js>).
+ * <li><js>"tsv"</js> - Tab-separated values (e.g.
<js>"foo\tbar"</js>).
+ * <li><js>"pipes</js> - Pipe-separated values (e.g.
<js>"foo|bar"</js>).
+ * <li><js>"multi"</js> - Corresponds to multiple parameter
instances instead of multiple values for a single instance (e.g.
<js>"foo=bar&foo=baz"</js>).
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The possible value are:
- * <ul>
- * <li><js>"csv"</js>
- * <li><js>"ssv"</js>
- * <li><js>"tsv"</js>
- * <li><js>"pipes"</js>
- * <li><js>"multi"</js>
- * </ul>
- * <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>).
* </ul>
@@ -238,7 +283,7 @@ public @interface FormData {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -252,7 +297,7 @@ public @interface FormData {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -331,20 +376,6 @@ public @interface FormData {
String minItems() default "";
/**
- * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
- *
- * <h5 class='section'>Notes:</h5>
- * <ul class='spaced-list'>
- * <li>
- * The format is boolean.
- * <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>).
- * </ul>
- */
- String allowEmptyValue() default "";
-
- /**
* <mk>exclusiveMaximum</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
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 be540a4..a7f9ba0 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
@@ -55,6 +55,19 @@ import org.apache.juneau.rest.*;
public @interface Header {
/**
+ * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ *
+ * <p>
+ * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
+ * <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;
+
+
//=================================================================================================================
+ // Attributes common to all Swagger Parameter objects
+
//=================================================================================================================
+
+ /**
* HTTP header name.
*/
String name() default "";
@@ -77,22 +90,17 @@ public @interface Header {
String value() default "";
/**
- * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <p>
- * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
- * <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;
-
- /**
- * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ * A brief description of the parameter. This could contain examples of
use.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
* The format is plain text.
* <br>Multiple lines are concatenated with newlines.
+ * <br>TODO - Future support for <a
href='https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown'>MarkDown</a>.
* <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>).
@@ -103,6 +111,9 @@ public @interface Header {
/**
* <mk>required</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines whether this parameter is mandatory. The default value is
<jk>false</jk>.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
@@ -114,49 +125,56 @@ public @interface Header {
*/
String required() default "";
+
//=================================================================================================================
+ // Attributes specific to parameters other than body
+
//=================================================================================================================
+
/**
* <mk>type</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The type of the parameter.
+ *
+ * <p>
+ * Note that per the Swagger specification, this value is required and
must be a simple type (e.g. <js>"string"</js>, <js>"number"</js>...).
+ * <br>However, Juneau allows for arbitrarily-complex POJOs such as
beans in form parameters using UON notation, this attribute can be left off in
lieu of a {@link #schema()}
+ * attribute.
+ *
+ * <p>
+ * The possible values are:
+ * <ul>
+ * <li><js>"string"</js>
+ * <li><js>"number"</js>
+ * <li><js>"integer"</js>
+ * <li><js>"boolean"</js>
+ * <li><js>"array"</js>
+ * <li><js>"file"</js>
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The possible values are:
- * <ul>
- * <li><js>"string"</js>
- * <li><js>"number"</js>
- * <li><js>"integer"</js>
- * <li><js>"boolean"</js>
- * <li><js>"array"</js>
- * <li><js>"file"</js>
- * </ul>
- * <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>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String type() default "";
/**
* <mk>format</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The extending format for the previously mentioned <a
href='https://swagger.io/specification/v2/#parameterType'>type</a>.
+ * See <a
href='https://swagger.io/specification/v2/#dataTypeFormat'>Data Type
Formats</a> for further details.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is plain-text.
* <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>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String format() default "";
@@ -166,7 +184,7 @@ public @interface Header {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is a regular expression according to the
ECMA 262 regular expression dialect.
* <li>
* This string SHOULD be a valid regular expression.
* <li>
@@ -179,20 +197,19 @@ public @interface Header {
/**
* <mk>collectionFormat</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines the format of the array if type array is used.
+ * <br>Possible values are:
+ * <ul>
+ * <li><js>"csv"</js> (default) - Comma-separated values (e.g.
<js>"foo,bar"</js>).
+ * <li><js>"ssv"</js> - Space-separated values (e.g. <js>"foo
bar"</js>).
+ * <li><js>"tsv"</js> - Tab-separated values (e.g.
<js>"foo\tbar"</js>).
+ * <li><js>"pipes</js> - Pipe-separated values (e.g.
<js>"foo|bar"</js>).
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
- * <li>
- * The possible value are:
- * <ul>
- * <li><js>"csv"</js>
- * <li><js>"ssv"</js>
- * <li><js>"tsv"</js>
- * <li><js>"pipes"</js>
- * <li><js>"multi"</js>
- * </ul>
- * <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>).
* </ul>
@@ -205,7 +222,7 @@ public @interface Header {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -219,7 +236,7 @@ public @interface Header {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -298,20 +315,6 @@ public @interface Header {
String minItems() default "";
/**
- * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
- *
- * <h5 class='section'>Notes:</h5>
- * <ul class='spaced-list'>
- * <li>
- * The format is boolean.
- * <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>).
- * </ul>
- */
- String allowEmptyValue() default "";
-
- /**
* <mk>exclusiveMaximum</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
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 8f394ce..812c0a9 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
@@ -46,6 +46,19 @@ import org.apache.juneau.rest.*;
public @interface Path {
/**
+ * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ *
+ * <p>
+ * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
+ * <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;
+
+
//=================================================================================================================
+ // Attributes common to all Swagger Parameter objects
+
//=================================================================================================================
+
+ /**
* URL path variable name.
*
* <p>
@@ -86,22 +99,17 @@ public @interface Path {
String value() default "";
/**
- * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <p>
- * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
- * <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;
-
- /**
- * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ * A brief description of the parameter. This could contain examples of
use.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
* The format is plain text.
* <br>Multiple lines are concatenated with newlines.
+ * <br>TODO - Future support for <a
href='https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown'>MarkDown</a>.
* <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>).
@@ -109,51 +117,57 @@ public @interface Path {
*/
String[] description() default {};
+
//=================================================================================================================
+ // Attributes specific to parameters other than body
+
//=================================================================================================================
+
/**
* <mk>type</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The type of the parameter.
+ *
+ * <p>
+ * Note that per the Swagger specification, this value is required and
must be a simple type (e.g. <js>"string"</js>, <js>"number"</js>...).
+ * <br>However, Juneau allows for arbitrarily-complex POJOs such as
beans in form parameters using UON notation, this attribute can be left off in
lieu of a {@link #schema()}
+ * attribute.
+ *
+ * <p>
+ * The possible values are:
+ * <ul>
+ * <li><js>"string"</js>
+ * <li><js>"number"</js>
+ * <li><js>"integer"</js>
+ * <li><js>"boolean"</js>
+ * <li><js>"array"</js>
+ * <li><js>"file"</js>
+ * </ul>
+ *
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
- * <li>
- * The possible values are:
- * <ul>
- * <li><js>"string"</js>
- * <li><js>"number"</js>
- * <li><js>"integer"</js>
- * <li><js>"boolean"</js>
- * <li><js>"array"</js>
- * <li><js>"file"</js>
- * </ul>
- * <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>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String type() default "";
/**
* <mk>format</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The extending format for the previously mentioned <a
href='https://swagger.io/specification/v2/#parameterType'>type</a>.
+ * See <a
href='https://swagger.io/specification/v2/#dataTypeFormat'>Data Type
Formats</a> for further details.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is plain-text.
* <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>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String format() default "";
@@ -163,7 +177,7 @@ public @interface Path {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is a regular expression according to the
ECMA 262 regular expression dialect.
* <li>
* This string SHOULD be a valid regular expression.
* <li>
@@ -174,12 +188,34 @@ public @interface Path {
String pattern() default "";
/**
+ * <mk>collectionFormat</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ *
+ * <p>
+ * Determines the format of the array if type array is used.
+ * <br>Possible values are:
+ * <ul>
+ * <li><js>"csv"</js> (default) - Comma-separated values (e.g.
<js>"foo,bar"</js>).
+ * <li><js>"ssv"</js> - Space-separated values (e.g. <js>"foo
bar"</js>).
+ * <li><js>"tsv"</js> - Tab-separated values (e.g.
<js>"foo\tbar"</js>).
+ * <li><js>"pipes</js> - Pipe-separated values (e.g.
<js>"foo|bar"</js>).
+ * </ul>
+ *
+ * <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>).
+ * </ul>
+ */
+ String collectionFormat() default "";
+
+ /**
* <mk>maximum</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -193,7 +229,7 @@ public @interface Path {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -244,20 +280,6 @@ public @interface Path {
String minLength() default "";
/**
- * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
- *
- * <h5 class='section'>Notes:</h5>
- * <ul class='spaced-list'>
- * <li>
- * The format is boolean.
- * <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>).
- * </ul>
- */
- String allowEmptyValue() default "";
-
- /**
* <mk>exclusiveMaximum</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
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 532ba93..f2af59e 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
@@ -78,6 +78,19 @@ public @interface Query {
boolean multipart() default false;
/**
+ * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ *
+ * <p>
+ * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
+ * <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;
+
+
//=================================================================================================================
+ // Attributes common to all Swagger Parameter objects
+
//=================================================================================================================
+
+ /**
* URL query parameter name.
*
* Required. The name of the parameter. Parameter names are case
sensitive.
@@ -108,22 +121,17 @@ public @interface Query {
String value() default "";
/**
- * Specifies the {@link HttpPartParser} class used for parsing values
from strings.
+ * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <p>
- * The default value for this parser is inherited from the
servlet/method which defaults to {@link UonPartParser}.
- * <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;
-
- /**
- * <mk>description</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ * A brief description of the parameter. This could contain examples of
use.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
* The format is plain text.
* <br>Multiple lines are concatenated with newlines.
+ * <br>TODO - Future support for <a
href='https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown'>MarkDown</a>.
* <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>).
@@ -134,6 +142,9 @@ public @interface Query {
/**
* <mk>required</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines whether this parameter is mandatory. The default value is
<jk>false</jk>.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
@@ -145,24 +156,35 @@ public @interface Query {
*/
String required() default "";
+
//=================================================================================================================
+ // Attributes specific to parameters other than body
+
//=================================================================================================================
+
/**
* <mk>type</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The type of the parameter.
+ *
+ * <p>
+ * Note that per the Swagger specification, this value is required and
must be a simple type (e.g. <js>"string"</js>, <js>"number"</js>...).
+ * <br>However, Juneau allows for arbitrarily-complex POJOs such as
beans in form parameters using UON notation, this attribute can be left off in
lieu of a {@link #schema()}
+ * attribute.
+ *
+ * <p>
+ * The possible values are:
+ * <ul>
+ * <li><js>"string"</js>
+ * <li><js>"number"</js>
+ * <li><js>"integer"</js>
+ * <li><js>"boolean"</js>
+ * <li><js>"array"</js>
+ * <li><js>"file"</js>
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
- * <li>
- * The possible values are:
- * <ul>
- * <li><js>"string"</js>
- * <li><js>"number"</js>
- * <li><js>"integer"</js>
- * <li><js>"boolean"</js>
- * <li><js>"array"</js>
- * <li><js>"file"</js>
- * </ul>
- * <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>).
* </ul>
@@ -177,29 +199,48 @@ public @interface Query {
/**
* <mk>format</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * The extending format for the previously mentioned <a
href='https://swagger.io/specification/v2/#parameterType'>type</a>.
+ * See <a
href='https://swagger.io/specification/v2/#dataTypeFormat'>Data Type
Formats</a> for further details.
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is plain-text.
* <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>).
* </ul>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul class='doctree'>
- * <li class='link'><a class='doclink'
href='https://swagger.io/specification/#dataTypes'>Swagger specification >
Data Types</a>
- * </ul>
*/
String format() default "";
/**
+ * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
+ *
+ * <p>
+ * Sets the ability to pass empty-valued parameters.
+ * <br>This is valid only for either query or formData parameters and
allows you to send a parameter with a name only or an empty value.
+ *
+ * <h5 class='section'>Notes:</h5>
+ * <ul class='spaced-list'>
+ * <li>
+ * The format is boolean.
+ * <li>
+ * Default value is <jk>false</jk>.
+ * <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>).
+ * </ul>
+ */
+ String allowEmptyValue() default "";
+
+ /**
* <mk>pattern</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
+ * The format is a regular expression according to the
ECMA 262 regular expression dialect.
* <li>
* This string SHOULD be a valid regular expression.
* <li>
@@ -212,20 +253,20 @@ public @interface Query {
/**
* <mk>collectionFormat</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
+ * <p>
+ * Determines the format of the array if type array is used.
+ * <br>Possible values are:
+ * <ul>
+ * <li><js>"csv"</js> (default) - Comma-separated values (e.g.
<js>"foo,bar"</js>).
+ * <li><js>"ssv"</js> - Space-separated values (e.g. <js>"foo
bar"</js>).
+ * <li><js>"tsv"</js> - Tab-separated values (e.g.
<js>"foo\tbar"</js>).
+ * <li><js>"pipes</js> - Pipe-separated values (e.g.
<js>"foo|bar"</js>).
+ * <li><js>"multi"</js> - Corresponds to multiple parameter
instances instead of multiple values for a single instance (e.g.
<js>"foo=bar&foo=baz"</js>).
+ * </ul>
+ *
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is plain text.
- * <li>
- * The possible value are:
- * <ul>
- * <li><js>"csv"</js>
- * <li><js>"ssv"</js>
- * <li><js>"tsv"</js>
- * <li><js>"pipes"</js>
- * <li><js>"multi"</js>
- * </ul>
- * <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>).
* </ul>
@@ -238,7 +279,7 @@ public @interface Query {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -252,7 +293,7 @@ public @interface Query {
* <h5 class='section'>Notes:</h5>
* <ul class='spaced-list'>
* <li>
- * The format is numeric.
+ * The format is a JSON number.
* <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>).
@@ -331,20 +372,6 @@ public @interface Query {
String minItems() default "";
/**
- * <mk>allowEmptyValue</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
- *
- * <h5 class='section'>Notes:</h5>
- * <ul class='spaced-list'>
- * <li>
- * The format is boolean.
- * <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>).
- * </ul>
- */
- String allowEmptyValue() default "";
-
- /**
* <mk>exclusiveMaximum</mk> field of the Swagger <a class="doclink"
href="https://swagger.io/specification/v2/#parameterObject">Parameter</a>
object.
*
* <h5 class='section'>Notes:</h5>
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/AnnotationUtils.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/AnnotationUtils.java
index e8a3b46..5c9cf72 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/AnnotationUtils.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/util/AnnotationUtils.java
@@ -257,12 +257,12 @@ public class AnnotationUtils {
.appendSkipEmpty("type", a.type())
.appendSkipEmpty("format", a.format())
.appendSkipEmpty("pattern", a.pattern())
+ .appendSkipEmpty("collectionFormat",
a.collectionFormat())
.appendSkipEmpty("maximum", a.maximum())
.appendSkipEmpty("minimum", a.minimum())
.appendSkipEmpty("multipleOf", a.multipleOf())
.appendSkipEmpty("maxLength", a.maxLength())
.appendSkipEmpty("minLength", a.minLength())
- .appendSkipEmpty("allowEmptyValue", a.allowEmptyValue())
.appendSkipEmpty("exclusiveMaximum",
a.exclusiveMaximum())
.appendSkipEmpty("exclusiveMinimum",
a.exclusiveMinimum())
.appendSkipEmpty("schema",
merge(om.getObjectMap("schema"), a.schema()))
@@ -333,7 +333,6 @@ public class AnnotationUtils {
.appendSkipEmpty("minLength", a.minLength())
.appendSkipEmpty("maxItems", a.maxItems())
.appendSkipEmpty("minItems", a.minItems())
- .appendSkipEmpty("allowEmptyValue", a.allowEmptyValue())
.appendSkipEmpty("exclusiveMaximum",
a.exclusiveMaximum())
.appendSkipEmpty("exclusiveMinimum",
a.exclusiveMinimum())
.appendSkipEmpty("uniqueItems", a.uniqueItems())
@@ -417,7 +416,7 @@ public class AnnotationUtils {
empty(a.description(), a._default(), a._enum(),
a.example(), a.api())
&& empty(
a.name(), a.value(), a.required(), a.type(),
a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(),
a.multipleOf(), a.maxLength(),
- a.minLength(), a.maxItems(), a.minItems(),
a.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()
+ a.minLength(), a.maxItems(), a.minItems(),
a.exclusiveMaximum(), a.exclusiveMinimum(), a.uniqueItems()
)
&& empty(a.schema())
&& empty(a.items());
@@ -599,7 +598,7 @@ public class AnnotationUtils {
empty(a.description(), a._enum(), a.example(), a.api())
&& empty(
a.name(), a.value(), a.type(), a.format(),
a.pattern(), a.maximum(), a.minimum(), a.multipleOf(), a.maxLength(),
- a.minLength(), a.allowEmptyValue(),
a.exclusiveMaximum(), a.exclusiveMinimum()
+ a.minLength(), a.exclusiveMaximum(),
a.exclusiveMinimum()
)
&& empty(a.schema());
}
diff --git
a/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/HeaderAnnotationTest.java
b/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/HeaderAnnotationTest.java
index 9e8d4eb..016d952 100644
---
a/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/HeaderAnnotationTest.java
+++
b/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/HeaderAnnotationTest.java
@@ -57,7 +57,6 @@ public class HeaderAnnotationTest {
@Header(
name="H",
_default="a",
- allowEmptyValue="true",
collectionFormat="A",
description={"a","b"},
exclusiveMaximum="true",
@@ -89,7 +88,6 @@ public class HeaderAnnotationTest {
name="H",
api={
"default:'a',",
- "allowEmptyValue:'true',",
"collectionFormat:'A',",
"description:'a\nb',",
"exclusiveMaximum:'true',",
@@ -122,7 +120,6 @@ public class HeaderAnnotationTest {
name="H",
api={
"default:'b',",
- "allowEmptyValue:'false',",
"collectionFormat:'b',",
"description:'b\nc',",
"exclusiveMaximum:'false',",
@@ -145,7 +142,6 @@ public class HeaderAnnotationTest {
"schema:{type:'b'}"
},
_default="a",
- allowEmptyValue="true",
collectionFormat="A",
description={"a","b"},
exclusiveMaximum="true",
@@ -188,7 +184,6 @@ public class HeaderAnnotationTest {
public void sa01_Header_onPojo_basic() throws Exception {
ParameterInfo x = getSwagger(new
SA()).getPaths().get("/basic").get("get").getParameter("header", "H");
assertObjectEquals("'a'", x.getDefault());
- assertEquals(true, x.getAllowEmptyValue());
assertEquals("A", x.getCollectionFormat());
assertEquals("a\nb", x.getDescription());
assertEquals(true, x.getExclusiveMaximum());
@@ -214,7 +209,6 @@ public class HeaderAnnotationTest {
public void sa02_Header_onPojo_api() throws Exception {
ParameterInfo x = getSwagger(new
SA()).getPaths().get("/api").get("get").getParameter("header", "H");
assertObjectEquals("'a'", x.getDefault());
- assertEquals(true, x.getAllowEmptyValue());
assertEquals("A", x.getCollectionFormat());
assertEquals("a\nb", x.getDescription());
assertEquals(true, x.getExclusiveMaximum());
@@ -240,7 +234,6 @@ public class HeaderAnnotationTest {
public void sa03_Header_onPojo_mixed() throws Exception {
ParameterInfo x = getSwagger(new
SA()).getPaths().get("/mixed").get("get").getParameter("header", "H");
assertObjectEquals("'a'", x.getDefault());
- assertEquals(true, x.getAllowEmptyValue());
assertEquals("A", x.getCollectionFormat());
assertEquals("a\nb", x.getDescription());
assertEquals(true, x.getExclusiveMaximum());
@@ -373,7 +366,6 @@ public class HeaderAnnotationTest {
minLength="1",
maxItems="1",
minItems="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
uniqueItems="true",
@@ -401,7 +393,6 @@ public class HeaderAnnotationTest {
"minLength:'1',",
"maxItems:'1',",
"minItems:'1',",
- "allowEmptyValue:'true',",
"exclusiveMaximum:'true',",
"exclusiveMinimum:'true',",
"uniqueItems:'true',",
@@ -430,7 +421,6 @@ public class HeaderAnnotationTest {
"minLength:'2',",
"maxItems:'2',",
"minItems:'2',",
- "allowEmptyValue:'false',",
"exclusiveMaximum:'false',",
"exclusiveMinimum:'false',",
"uniqueItems:'false',",
@@ -452,7 +442,6 @@ public class HeaderAnnotationTest {
minLength="1",
maxItems="1",
minItems="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
uniqueItems="true",
@@ -492,7 +481,6 @@ public class HeaderAnnotationTest {
assertObjectEquals("1", x.getMinLength());
assertObjectEquals("1", x.getMaxItems());
assertObjectEquals("1", x.getMinItems());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("true", x.getUniqueItems());
@@ -518,7 +506,6 @@ public class HeaderAnnotationTest {
assertObjectEquals("1", x.getMinLength());
assertObjectEquals("1", x.getMaxItems());
assertObjectEquals("1", x.getMinItems());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("true", x.getUniqueItems());
@@ -544,7 +531,6 @@ public class HeaderAnnotationTest {
assertObjectEquals("1", x.getMinLength());
assertObjectEquals("1", x.getMaxItems());
assertObjectEquals("1", x.getMinItems());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("true", x.getUniqueItems());
diff --git
a/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/PathAnnotationTest.java
b/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/PathAnnotationTest.java
index 7e12106..3445de6 100644
---
a/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/PathAnnotationTest.java
+++
b/juneau-rest/juneau-rest-server/src/test/java/org/apache/juneau/rest/annotation/PathAnnotationTest.java
@@ -312,7 +312,6 @@ public class PathAnnotationTest {
multipleOf="1",
maxLength="1",
minLength="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
schema=@Schema(type="a"),
@@ -337,7 +336,6 @@ public class PathAnnotationTest {
"multipleOf:'1',",
"maxLength:'1',",
"minLength:'1',",
- "allowEmptyValue:'true',",
"exclusiveMaximum:'true',",
"exclusiveMinimum:'true',",
"schema:{type:'a'},",
@@ -363,7 +361,6 @@ public class PathAnnotationTest {
"multipleOf:'2',",
"maxLength:'2',",
"minLength:'2',",
- "allowEmptyValue:'false',",
"exclusiveMaximum:'false',",
"exclusiveMinimum:'false',",
"schema:{type:'b'},",
@@ -379,7 +376,6 @@ public class PathAnnotationTest {
multipleOf="1",
maxLength="1",
minLength="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
schema=@Schema(type="a"),
@@ -417,7 +413,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
@@ -437,7 +432,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
@@ -457,7 +451,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
@@ -573,7 +566,6 @@ public class PathAnnotationTest {
multipleOf="1",
maxLength="1",
minLength="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
schema=@Schema(type="a"),
@@ -594,7 +586,6 @@ public class PathAnnotationTest {
"multipleOf:'1',",
"maxLength:'1',",
"minLength:'1',",
- "allowEmptyValue:'true',",
"exclusiveMaximum:'true',",
"exclusiveMinimum:'true',",
"schema:{type:'a'},",
@@ -616,7 +607,6 @@ public class PathAnnotationTest {
"multipleOf:'2',",
"maxLength:'2',",
"minLength:'2',",
- "allowEmptyValue:'false',",
"exclusiveMaximum:'false',",
"exclusiveMinimum:'false',",
"schema:{type:'b'},",
@@ -632,7 +622,6 @@ public class PathAnnotationTest {
multipleOf="1",
maxLength="1",
minLength="1",
- allowEmptyValue="true",
exclusiveMaximum="true",
exclusiveMinimum="true",
schema=@Schema(type="a"),
@@ -659,7 +648,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
@@ -678,7 +666,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
@@ -697,7 +684,6 @@ public class PathAnnotationTest {
assertObjectEquals("1", x.getMultipleOf());
assertObjectEquals("1", x.getMaxLength());
assertObjectEquals("1", x.getMinLength());
- assertObjectEquals("true", x.getAllowEmptyValue());
assertObjectEquals("true", x.getExclusiveMaximum());
assertObjectEquals("true", x.getExclusiveMinimum());
assertObjectEquals("{type:'a'}", x.getSchema());
--
To stop receiving notification emails like this one, please contact
[email protected].