1 package io.swagger.v3.oas.annotations.extensions;
2
3 import java.lang.annotation.Repeatable;
4 import java.lang.annotation.Retention;
5 import java.lang.annotation.RetentionPolicy;
6 import java.lang.annotation.Target;
7
8 import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
9 import static java.lang.annotation.ElementType.TYPE;
10 import static java.lang.annotation.ElementType.FIELD;
11 import static java.lang.annotation.ElementType.METHOD;
12 import static java.lang.annotation.ElementType.PARAMETER;
13
14 /**
15  * An optionally named list of extension properties.
16  *
17  * @see <a target="_new" href="https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#specificationExtensions">Specification extensions (OpenAPI specification)</a>
18  */

19 @Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})
20 @Retention(RetentionPolicy.RUNTIME)
21 @Repeatable(Extensions.class)
22 public @interface Extension {
23
24     /**
25      * An option name for these extensions.
26      *
27      * @return an option name for these extensions - will be prefixed with "x-"
28      */

29     String name() default "";
30
31     /**
32      * The extension properties.
33      *
34      * @return the actual extension properties
35      * @see ExtensionProperty
36      */

37     ExtensionProperty[] properties();
38 }