Skip to content

Commit b4fbe3f

Browse files
committed
Merge branch 'develop_2.0'
2 parents 400662d + 91b29e0 commit b4fbe3f

File tree

227 files changed

+5126
-2777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+5126
-2777
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ You need the following installed and available in your $PATH:
5151
* Jackson 2.4.2 or greater
5252

5353

54-
### To build from source (currently 1.5.0)
54+
### To build from source (currently 1.5.1-SNAPSHOT)
5555
```
5656
# first time building locally
5757
mvn -N

modules/swagger-annotations/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<parent>
55
<groupId>io.swagger</groupId>
66
<artifactId>swagger-project</artifactId>
7-
<version>1.5.0</version>
7+
<version>1.5.1</version>
88
<relativePath>../..</relativePath>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111
<groupId>io.swagger</groupId>
1212
<artifactId>swagger-annotations</artifactId>
13-
<version>1.5.0</version>
13+
<version>1.5.1</version>
1414
<packaging>bundle</packaging>
1515
<name>swagger-annotations</name>
1616

modules/swagger-annotations/src/main/java/io/swagger/annotations/Api.java

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25-
2625
/**
2726
* Marks a class as a Swagger resource.
28-
* <p>
27+
* <p/>
2928
* By default, Swagger-Core will only include and introspect only classes that are annotated
3029
* with {@code @Api} and will ignore other resources (JAX-RS endpoints, Servlets and
3130
* so on).
@@ -36,13 +35,13 @@
3635
public @interface Api {
3736
/**
3837
* Implicitly sets a tag for the operations, legacy support (read description).
39-
* <p>
38+
* <p/>
4039
* In swagger-core 1.3.X, this was used as the 'path' that is to host the API Declaration of the
4140
* resource. This is no longer relevant in swagger-core 1.5.X.
42-
* <p>
41+
* <p/>
4342
* If {@link #tags()} is <i>not</i> used, this value will be used to set the tag for the operations described by this
4443
* resource. Otherwise, the value will be ignored.
45-
* <p>
44+
* <p/>
4645
* The leading / (if exists) will be removed.
4746
*
4847
* @return tag name for operations under this resource, unless {@link #tags()} is defined.
@@ -52,12 +51,11 @@
5251
/**
5352
* A list of tags for API documentation control.
5453
* Tags can be used for logical grouping of operations by resources or any other qualifier.
55-
* <p>
54+
* <p/>
5655
* A non-empty value will override the value provided in {@link #value()}.
5756
*
58-
* @since 1.5.2-M1
59-
*
6057
* @return a string array of tag values
58+
* @since 1.5.2-M1
6159
*/
6260
String[] tags() default "";
6361

@@ -84,11 +82,11 @@
8482

8583
/**
8684
* Corresponds to the `produces` field of the operations under this resource.
87-
* <p>
85+
* <p/>
8886
* Takes in comma-separated values of content types.
8987
* For example, "application/json, application/xml" would suggest the operations
9088
* generate JSON and XML output.
91-
* <p>
89+
* <p/>
9290
* For JAX-RS resources, this would automatically take the value of the {@code @Produces}
9391
* annotation if such exists. It can also be used to override the {@code @Produces} values
9492
* for the Swagger documentation.
@@ -99,11 +97,11 @@
9997

10098
/**
10199
* Corresponds to the `consumes` field of the operations under this resource.
102-
* <p>
100+
* <p/>
103101
* Takes in comma-separated values of content types.
104102
* For example, "application/json, application/xml" would suggest the operations
105103
* accept JSON and XML input.
106-
* <p>
104+
* <p/>
107105
* For JAX-RS resources, this would automatically take the value of the {@code @Consumes}
108106
* annotation if such exists. It can also be used to override the {@code @Consumes} values
109107
* for the Swagger documentation.
@@ -114,7 +112,7 @@
114112

115113
/**
116114
* Sets specific protocols (schemes) for the operations under this resource.
117-
* <p>
115+
* <p/>
118116
* Comma-separated values of the available protocols. Possible values: http, https, ws, wss.
119117
*
120118
* @return the protocols supported by the operations under the resource.
@@ -123,13 +121,12 @@
123121

124122
/**
125123
* Corresponds to the `security` field of the Operation Object.
126-
* <p>
124+
* <p/>
127125
* Takes in a list of the authorizations (security requirements) for the operations under this resource.
128126
* This may be overridden by specific operations.
129127
*
130-
* @see Authorization
131-
*
132128
* @return an array of authorizations required by the server, or a single, empty authorization value if not set.
129+
* @see Authorization
133130
*/
134131
Authorization[] authorizations() default @Authorization(value = "");
135132

modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiImplicitParam.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323

2424
/**
2525
* Represents a single parameter in an API Operation.
26-
* <p>
26+
* <p/>
2727
* While {@link ApiParam} is bound to a JAX-RS parameter,
2828
* method or field, this allows you to manually define a parameter in a fine-tuned manner.
2929
* This is the only way to define parameters when using Servlets or other non-JAX-RS
3030
* environments.
31-
* <p>
31+
* <p/>
3232
* This annotation must be used as a value of {@link ApiImplicitParams}
3333
* in order to be parsed.
3434
*
@@ -39,7 +39,7 @@
3939
public @interface ApiImplicitParam {
4040
/**
4141
* Name of the parameter.
42-
* <p>
42+
* <p/>
4343
* For proper Swagger functionality, follow these rules when naming your parameters based on {@link #paramType()}:
4444
* <ol>
4545
* <li>If {@code paramType} is "path", the name should be the associated section in the path.</li>
@@ -62,7 +62,7 @@
6262

6363
/**
6464
* Limits the acceptable values for this parameter.
65-
* <p>
65+
* <p/>
6666
* There are three ways to describe the allowable values:
6767
* <ol>
6868
* <li>To set a list of values, provide a comma-separated list.
@@ -79,14 +79,14 @@
7979

8080
/**
8181
* Specifies if the parameter is required or not.
82-
* <p>
82+
* <p/>
8383
* Path parameters should always be set as required.
8484
*/
8585
boolean required() default false;
8686

8787
/**
8888
* Allows for filtering a parameter from the API documentation.
89-
*<p>
89+
* <p/>
9090
* See io.swagger.core.filter.SwaggerSpecFilter for further details.
9191
*/
9292
String access() default "";
@@ -98,14 +98,14 @@
9898

9999
/**
100100
* The data type of the parameter.
101-
* <p>
101+
* <p/>
102102
* This can be the class name or a primitive.
103103
*/
104104
String dataType() default "";
105105

106106
/**
107107
* The parameter type of the parameter.
108-
*
108+
* <p/>
109109
* Valid values are {@code path}, {@code query}, {@code body}, {@code header} or {@code form}.
110110
*/
111111
String paramType() default "";

modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* Provides additional information about Swagger models.
27-
* <p>
27+
* <p/>
2828
* Classes will be introspected automatically as they are used as types in operations,
2929
* but you may want to manipulate the structure of the models.
3030
*/
@@ -34,7 +34,7 @@
3434
public @interface ApiModel {
3535
/**
3636
* Provide an alternative name for the model.
37-
* <p>
37+
* <p/>
3838
* By default, the class name is used.
3939
*/
4040
String value() default "";
@@ -51,7 +51,7 @@
5151

5252
/**
5353
* Supports model inheritance and polymorphism.
54-
* <p>
54+
* <p/>
5555
* This is the name of the field used as a discriminator. Based on this field,
5656
* it would be possible to assert which sub type needs to be used.
5757
*/

modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiModelProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
/**
4343
* Limits the acceptable values for this parameter.
44-
* <p>
44+
* <p/>
4545
* There are three ways to describe the allowable values:
4646
* <ol>
4747
* <li>To set a list of values, provide a comma-separated list.
@@ -68,7 +68,7 @@
6868

6969
/**
7070
* The data type of the parameter.
71-
* <p>
71+
* <p/>
7272
* This can be the class name or a primitive. The value will override the data type as read from the class
7373
* property.
7474
*/

modules/swagger-annotations/src/main/java/io/swagger/annotations/ApiOperation.java

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Describes an operation or typically a HTTP method against a specific path.
26-
* <p>
26+
* <p/>
2727
* Operations with equivalent paths are grouped in a single Operation Object.
2828
* A combination of a HTTP method and a path creates a unique operation.
2929
*/
@@ -32,22 +32,22 @@
3232
public @interface ApiOperation {
3333
/**
3434
* Corresponds to the `summary` field of the operation.
35-
* <p>
35+
* <p/>
3636
* Provides a brief description of this operation. Should be 120 characters or less
3737
* for proper visibility in Swagger-UI.
3838
*/
3939
String value();
4040

4141
/**
4242
* Corresponds to the 'notes' field of the operation.
43-
* <p>
43+
* <p/>
4444
* A verbose description of the operation.
4545
*/
4646
String notes() default "";
4747

4848
/**
4949
* A list of tags for API documentation control.
50-
* <p>
50+
* <p/>
5151
* Tags can be used for logical grouping of operations by resources or any other qualifier.
5252
* A non-empty value will override the value received from {@link Api#value()} or {@link Api#tags()}
5353
* for this operation.
@@ -58,21 +58,21 @@
5858

5959
/**
6060
* The response type of the operation.
61-
* <p>
61+
* <p/>
6262
* In JAX-RS applications, the return type of the method would automatically be used, unless it is
6363
* {@code javax.ws.rs.core.Response}. In that case, the operation return type would default to `void`
6464
* as the actual response type cannot be known.
65-
* <p>
65+
* <p/>
6666
* Setting this property would override any automatically-derived data type.
67-
* <p>
67+
* <p/>
6868
* If the value used is a class representing a primitive ({@code Integer}, {@code Long}, ...)
6969
* the corresponding primitive type will be used.
7070
*/
7171
Class<?> response() default Void.class;
7272

7373
/**
7474
* Declares a container wrapping the response.
75-
* <p>
75+
* <p/>
7676
* Valid values are "List", "Set" or "Map". Any other value will be ignored.
7777
*/
7878
String responseContainer() default "";
@@ -86,14 +86,14 @@
8686

8787
/**
8888
* Corresponds to the `method` field as the HTTP method used.
89-
* <p>
89+
* <p/>
9090
* If not stated, in JAX-RS applications, the following JAX-RS annotations would be scanned
9191
* and used: {@code @GET}, {@code @HEAD}, {@code @POST}, {@code @PUT}, {@code @DELETE} and {@code @OPTIONS}.
9292
* Note that even though not part of the JAX-RS specification, if you create and use the {@code @PATCH} annotation,
9393
* it will also be parsed and used. If the httpMethod property is set, it will override the JAX-RS annotation.
94-
* <p>
94+
* <p/>
9595
* For Servlets, you must specify the HTTP method manually.
96-
* <p>
96+
* <p/>
9797
* Acceptable values are "GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS" and "PATCH".
9898
*/
9999
String httpMethod() default "";
@@ -105,19 +105,19 @@
105105

106106
/**
107107
* Corresponds to the `operationId` field.
108-
* <p>
108+
* <p/>
109109
* The operationId is used by third-party tools to uniquely identify this operation. In Swagger 2.0, this is
110110
* no longer mandatory and if not provided will remain empty.
111111
*/
112112
String nickname() default "";
113113

114114
/**
115115
* Corresponds to the `produces` field of the operation.
116-
* <p>
116+
* <p/>
117117
* Takes in comma-separated values of content types.
118118
* For example, "application/json, application/xml" would suggest this operation
119119
* generates JSON and XML output.
120-
* <p>
120+
* <p/>
121121
* For JAX-RS resources, this would automatically take the value of the {@code @Produces}
122122
* annotation if such exists. It can also be used to override the {@code @Produces} values
123123
* for the Swagger documentation.
@@ -126,11 +126,11 @@
126126

127127
/**
128128
* Corresponds to the `consumes` field of the operation.
129-
* <p>
129+
* <p/>
130130
* Takes in comma-separated values of content types.
131131
* For example, "application/json, application/xml" would suggest this API Resource
132132
* accepts JSON and XML input.
133-
* <p>
133+
* <p/>
134134
* For JAX-RS resources, this would automatically take the value of the {@code @Consumes}
135135
* annotation if such exists. It can also be used to override the {@code @Consumes} values
136136
* for the Swagger documentation.
@@ -139,22 +139,20 @@
139139

140140
/**
141141
* Sets specific protocols (schemes) for this operation.
142-
* <p>
142+
* <p/>
143143
* Comma-separated values of the available protocols. Possible values: http, https, ws, wss.
144144
*
145145
* @return the protocols supported by the operations under the resource.
146146
*/
147147
String protocols() default "";
148148

149-
150149
/**
151150
* Corresponds to the `security` field of the Operation Object.
152-
* <p>
151+
* <p/>
153152
* Takes in a list of the authorizations (security requirements) for this operation.
154153
*
155-
* @see Authorization
156-
*
157154
* @return an array of authorizations required by the server, or a single, empty authorization value if not set.
155+
* @see Authorization
158156
*/
159157
Authorization[] authorizations() default @Authorization(value = "");
160158

@@ -172,7 +170,7 @@
172170

173171
/**
174172
* The HTTP status code of the response.
175-
* <p>
173+
* <p/>
176174
* The value should be one of the formal <a target="_blank" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP Status Code Definitions</a>.
177175
*/
178176
int code() default 200;

0 commit comments

Comments
 (0)