-
Notifications
You must be signed in to change notification settings - Fork 1
/
Schema.kt
63 lines (60 loc) · 2.29 KB
/
Schema.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package org.openfolder.kotlinasyncapi.annotation
import kotlin.reflect.KClass
@Target(
AnnotationTarget.CLASS,
AnnotationTarget.ANNOTATION_CLASS
)
@AsyncApiAnnotation
annotation class Schema(
val value: KClass<*> = Void::class,
val isDefault: kotlin.Boolean = false,
val title: String = "",
val description: String = "",
val default: String = "",
val readOnly: Boolean = Boolean(isDefault = true),
val writeOnly: Boolean = Boolean(isDefault = true),
val examples: Array<String> = [],
val contentEncoding: String = "",
val contentMediaType: String = "",
val type: String = "",
val enum: Array<String> = [],
val const: String = "",
val multipleOf: Int = Int(isDefault = true),
val maximum: Int = Int(isDefault = true),
val exclusiveMaximum: Int = Int(isDefault = true),
val minimum: Int = Int(isDefault = true),
val exclusiveMinimum: Int = Int(isDefault = true),
val maxLength: Int = Int(isDefault = true),
val minLength: Int = Int(isDefault = true),
val pattern: String = "",
val items: Array<Schema> = [],
val additionalItems: Array<Schema> = [],
val maxItems: Int = Int(isDefault = true),
val minItems: Int = Int(isDefault = true),
val uniqueItems: Boolean = Boolean(isDefault = true),
val contains: Array<Schema> = [],
val maxProperties: Int = Int(isDefault = true),
val minProperties: Int = Int(isDefault = true),
val required: Array<String> = [],
val properties: Array<SchemaMapEntry> = [],
val additionalProperties: Array<SchemaMapEntry> = [],
val patternProperties: Array<SchemaMapEntry> = [],
val dependencies: Array<SchemaMapEntry> = [],
val propertyNames: Array<Schema> = [],
val `if`: Array<Schema> = [],
val then: Array<Schema> = [],
val `else`: Array<Schema> = [],
val allOf: Array<Schema> = [],
val anyOf: Array<Schema> = [],
val oneOf: Array<Schema> = [],
val not: Array<Schema> = [],
val format: String = "",
val discriminator: String = "",
val externalDocs: ExternalDocumentation = ExternalDocumentation(isDefault = true, url = ""),
val deprecated: Boolean = Boolean(isDefault = true)
)
annotation class SchemaMapEntry(
val isDefault: kotlin.Boolean = true,
val key: String = "",
val value: Schema = Schema(isDefault = true)
)