Skip to content

Commit

Permalink
Extensions support
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Feb 1, 2018
1 parent f93d41f commit b08677e
Show file tree
Hide file tree
Showing 40 changed files with 1,443 additions and 245 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -51,4 +53,11 @@
**/
String url() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.swagger.v3.oas.annotations;

import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.servers.Server;
Expand Down Expand Up @@ -73,4 +74,11 @@
* @return the external documentation for this API.
*/
ExternalDocumentation externalDocs() default @ExternalDocumentation;

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import io.swagger.v3.oas.annotations.enums.Explode;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.enums.ParameterStyle;
import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.ExampleObject;
Expand Down Expand Up @@ -157,4 +158,11 @@
* @return an example of the parameter
**/
String example() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.swagger.v3.oas.annotations.callbacks;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
Expand Down Expand Up @@ -59,4 +60,11 @@
**/
Operation[] operation() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.info;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
Expand Down Expand Up @@ -51,4 +53,11 @@
**/
String email() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.info;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -74,4 +76,11 @@
**/
String version() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.info;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
Expand Down Expand Up @@ -44,4 +46,11 @@
**/
String url() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.swagger.v3.oas.annotations.links;

import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.servers.Server;

import java.lang.annotation.ElementType;
Expand Down Expand Up @@ -83,4 +84,11 @@
**/
Server server() default @Server;

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.swagger.v3.oas.annotations.media;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -55,4 +57,11 @@
* @return boolean - whether items in an array are unique or repeating
**/
boolean uniqueItems() default false;

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.media;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -75,4 +77,11 @@
*/
Encoding[] encoding() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.swagger.v3.oas.annotations.media;

import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.headers.Header;

import java.lang.annotation.Inherited;
Expand Down Expand Up @@ -81,4 +82,11 @@
*/
Header[] headers() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.media;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand Down Expand Up @@ -60,4 +62,11 @@
**/
String externalValue() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package io.swagger.v3.oas.annotations.media;

import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
Expand Down Expand Up @@ -290,4 +291,11 @@
* An array of the sub types inheriting from this model.
*/
Class<?>[] subTypes() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.swagger.v3.oas.annotations.parameters;

import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.media.Content;

import java.lang.annotation.ElementType;
Expand Down Expand Up @@ -57,4 +58,11 @@
**/
boolean required() default false;

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.swagger.v3.oas.annotations.responses;

import io.swagger.v3.oas.annotations.extensions.Extension;
import io.swagger.v3.oas.annotations.headers.Header;
import io.swagger.v3.oas.annotations.links.Link;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -77,4 +78,11 @@
**/
Content[] content() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.responses;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand All @@ -38,4 +40,11 @@
**/
ApiResponse[] value() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.security;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down Expand Up @@ -56,4 +58,11 @@
**/
OAuthScope[] scopes() default {};

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.swagger.v3.oas.annotations.security;

import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down Expand Up @@ -56,4 +58,11 @@
**/
OAuthFlow authorizationCode() default @OAuthFlow();

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.extensions.Extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
Expand Down Expand Up @@ -95,4 +96,11 @@
**/
String openIdConnectUrl() default "";

/**
* The list of optional extensions
*
* @return an optional array of extensions
*/
Extension[] extensions() default {};

}
Loading

0 comments on commit b08677e

Please sign in to comment.