1 /**
2  * Copyright 2017 SmartBear Software
3  * <p>
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * <p>
8  * http://www.apache.org/licenses/LICENSE-2.0
9  * <p>
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package io.swagger.v3.oas.annotations.servers;
18
19 import io.swagger.v3.oas.annotations.extensions.Extension;
20
21 import java.lang.annotation.Inherited;
22 import java.lang.annotation.Retention;
23 import java.lang.annotation.RetentionPolicy;
24 import java.lang.annotation.Target;
25
26 /**
27  * An object representing a Server Variable for server URL template substitution.
28  **/

29 @Target({})
30 @Retention(RetentionPolicy.RUNTIME)
31 @Inherited
32 public @interface ServerVariable {
33     /**
34      * Required.  The name of this variable.
35      *
36      * @return String name
37      **/

38     String name();
39
40     /**
41      * An array of allowable values for this variable.  This field map to the enum property in the OAS schema.
42      *
43      * @return String array of allowableValues
44      **/

45     String[] allowableValues() default "";
46
47     /**
48      * Required.  The default value of this variable.
49      *
50      * @return String defaultValue
51      **/

52     String defaultValue();
53
54     /**
55      * An optional description for the server variable.
56      *
57      * @return String description
58      **/

59     String description() default "";
60
61     /**
62      * The list of optional extensions
63      *
64      * @return an optional array of extensions
65      */

66     Extension[] extensions() default {};
67
68 }
69