1 package io.swagger.v3.oas.annotations.media;
2
3 import java.lang.annotation.Inherited;
4 import java.lang.annotation.Repeatable;
5 import java.lang.annotation.Retention;
6 import java.lang.annotation.RetentionPolicy;
7 import java.lang.annotation.Target;
8
9 import static java.lang.annotation.ElementType.ANNOTATION_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 import static java.lang.annotation.ElementType.TYPE;
14
15 /**
16  * The annotation may be used to define properties for an Object Schema
17  *
18  * @see Schema
19  *
20  * @since 2.1.8
21  **/

22 @Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})
23 @Retention(RetentionPolicy.RUNTIME)
24 @Inherited
25 @Repeatable(SchemaProperties.class)
26 public @interface SchemaProperty {
27     /**
28      * The name.
29      *
30      * @return the name
31      **/

32     String name() default "";
33
34     /**
35      * The schema of the property.
36      *
37      * @return the schema
38      **/

39     Schema schema() default @Schema();
40
41     /**
42      * The schema of the array.
43      *
44      * @return the schema of the array
45      */

46     ArraySchema array() default @ArraySchema();
47
48 }
49