Skip to content

Commit c5be2e9

Browse files
committed
added @inherited annotations per #611
1 parent a20994d commit c5be2e9

File tree

11 files changed

+22
-45
lines changed

11 files changed

+22
-45
lines changed

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/Api.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421

2522
/**
@@ -34,6 +31,7 @@
3431
*/
3532
@Target(ElementType.TYPE)
3633
@Retention(RetentionPolicy.RUNTIME)
34+
@Inherited
3735
public @interface Api {
3836
/**
3937
* The 'path' that is going to be used to host the API Declaration of the

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiImplicitParam.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Represents a single parameter in an API Operation.
@@ -36,6 +33,7 @@
3633
*/
3734
@Target(ElementType.METHOD)
3835
@Retention(RetentionPolicy.RUNTIME)
36+
@Inherited
3937
public @interface ApiImplicitParam {
4038
/**
4139
* Name of the parameter.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiImplicitParams.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* A wrapper to allow a list of multiple {@link com.wordnik.swagger.annotations.ApiImplicitParam} objects.
@@ -28,6 +25,7 @@
2825
*/
2926
@Target(ElementType.METHOD)
3027
@Retention(RetentionPolicy.RUNTIME)
28+
@Inherited
3129
public @interface ApiImplicitParams {
3230
/**
3331
* A list of {@link com.wordnik.swagger.annotations.ApiImplicitParam}s available to the API operation.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiModel.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Provides additional information about Swagger models.
@@ -29,6 +26,7 @@
2926
*/
3027
@Target({ElementType.TYPE})
3128
@Retention(RetentionPolicy.RUNTIME)
29+
@Inherited
3230
public @interface ApiModel {
3331
/**
3432
* Provide an alternative name for the model.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiModelProperty.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Adds and manipulates data of a model property.
2623
*/
2724
@Target({ElementType.METHOD, ElementType.FIELD})
2825
@Retention(RetentionPolicy.RUNTIME)
26+
@Inherited
2927
public @interface ApiModelProperty {
3028
/**
3129
* A brief description of this property.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiOperation.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Describes an operation or typically a HTTP method against a specific path.
@@ -29,6 +26,7 @@
2926
*/
3027
@Target(ElementType.METHOD)
3128
@Retention(RetentionPolicy.RUNTIME)
29+
@Inherited
3230
public @interface ApiOperation {
3331
/**
3432
* Corresponds to the `summary` field of the operation.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiParam.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Adds additional meta-data for operation parameters.
@@ -28,6 +25,7 @@
2825
*/
2926
@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
3027
@Retention(RetentionPolicy.RUNTIME)
28+
@Inherited
3129
public @interface ApiParam {
3230
/**
3331
* The parameter name.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiResponse.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
23-
19+
import java.lang.annotation.*;
2420

2521
/**
2622
* Describes a possible response of an operation.
@@ -42,6 +38,7 @@
4238
*/
4339
@Target(ElementType.METHOD)
4440
@Retention(RetentionPolicy.RUNTIME)
41+
@Inherited
4542
public @interface ApiResponse {
4643
/**
4744
* The HTTP status code of the response.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/ApiResponses.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* A wrapper to allow a list of multiple {@link com.wordnik.swagger.annotations.ApiResponse} objects.
@@ -31,6 +28,7 @@
3128
*/
3229
@Target(ElementType.METHOD)
3330
@Retention(RetentionPolicy.RUNTIME)
31+
@Inherited
3432
public @interface ApiResponses {
3533
/**
3634
* A list of {@link com.wordnik.swagger.annotations.ApiResponse}s provided by the API operation.

modules/swagger-annotations/src/main/java/com/wordnik/swagger/annotations/Authorization.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
package com.wordnik.swagger.annotations;
1818

19-
import java.lang.annotation.ElementType;
20-
import java.lang.annotation.Retention;
21-
import java.lang.annotation.RetentionPolicy;
22-
import java.lang.annotation.Target;
19+
import java.lang.annotation.*;
2320

2421
/**
2522
* Declares an authorization scheme to be used on a resource or an operation.
@@ -35,6 +32,7 @@
3532
*/
3633
@Target(ElementType.METHOD)
3734
@Retention(RetentionPolicy.RUNTIME)
35+
@Inherited
3836
public @interface Authorization {
3937
/**
4038
* The name of the authorization scheme to be used on this resource/operation.

0 commit comments

Comments
 (0)