|
19 | 19 | */ |
20 | 20 | package com.linkedplanet.kotlininsightclient.api.model |
21 | 21 |
|
| 22 | +import io.swagger.v3.oas.annotations.media.Schema |
22 | 23 | import java.time.LocalDate |
23 | 24 | import java.time.LocalTime |
24 | 25 | import java.time.ZonedDateTime |
@@ -92,6 +93,30 @@ data class InsightReference( |
92 | 93 | /** |
93 | 94 | * Holds the actual data value(s) |
94 | 95 | */ |
| 96 | +@Schema( |
| 97 | + oneOf = [ |
| 98 | + InsightAttribute.Text::class, |
| 99 | + InsightAttribute.Integer::class, |
| 100 | + InsightAttribute.Bool::class, |
| 101 | + InsightAttribute.DoubleNumber::class, |
| 102 | + InsightAttribute.Select::class, |
| 103 | + InsightAttribute.Date::class, |
| 104 | + InsightAttribute.Time::class, |
| 105 | + InsightAttribute.DateTime::class, |
| 106 | + InsightAttribute.Url::class, |
| 107 | + InsightAttribute.Email::class, |
| 108 | + InsightAttribute.Textarea::class, |
| 109 | + InsightAttribute.Ipaddress::class, |
| 110 | + InsightAttribute.Reference::class, |
| 111 | + InsightAttribute.User::class, |
| 112 | + InsightAttribute.Confluence::class, |
| 113 | + InsightAttribute.Group::class, |
| 114 | + InsightAttribute.Version::class, |
| 115 | + InsightAttribute.Project::class, |
| 116 | + InsightAttribute.Status::class, |
| 117 | + InsightAttribute.Unknown::class, |
| 118 | + ] |
| 119 | +) |
95 | 120 | sealed class InsightAttribute( |
96 | 121 | @get:JvmName("getAttributeId") |
97 | 122 | val attributeId: InsightAttributeId, |
@@ -243,6 +268,30 @@ data class ObjectTypeSchema( |
243 | 268 | val parentObjectTypeId: InsightObjectTypeId? |
244 | 269 | ) |
245 | 270 |
|
| 271 | +@Schema( |
| 272 | + oneOf = [ |
| 273 | + ObjectTypeSchemaAttribute.TextSchema::class, |
| 274 | + ObjectTypeSchemaAttribute.IntegerSchema::class, |
| 275 | + ObjectTypeSchemaAttribute.BoolSchema::class, |
| 276 | + ObjectTypeSchemaAttribute.DoubleNumberSchema::class, |
| 277 | + ObjectTypeSchemaAttribute.SelectSchema::class, |
| 278 | + ObjectTypeSchemaAttribute.DateSchema::class, |
| 279 | + ObjectTypeSchemaAttribute.TimeSchema::class, |
| 280 | + ObjectTypeSchemaAttribute.DateTimeSchema::class, |
| 281 | + ObjectTypeSchemaAttribute.UrlSchema::class, |
| 282 | + ObjectTypeSchemaAttribute.EmailSchema::class, |
| 283 | + ObjectTypeSchemaAttribute.TextareaSchema::class, |
| 284 | + ObjectTypeSchemaAttribute.IpaddressSchema::class, |
| 285 | + ObjectTypeSchemaAttribute.ReferenceSchema::class, |
| 286 | + ObjectTypeSchemaAttribute.UserSchema::class, |
| 287 | + ObjectTypeSchemaAttribute.ConfluenceSchema::class, |
| 288 | + ObjectTypeSchemaAttribute.GroupSchema::class, |
| 289 | + ObjectTypeSchemaAttribute.VersionSchema::class, |
| 290 | + ObjectTypeSchemaAttribute.ProjectSchema::class, |
| 291 | + ObjectTypeSchemaAttribute.StatusSchema::class, |
| 292 | + ObjectTypeSchemaAttribute.UnknownSchema::class, |
| 293 | + ] |
| 294 | +) |
246 | 295 | sealed class ObjectTypeSchemaAttribute { |
247 | 296 |
|
248 | 297 | abstract val id: InsightAttributeId |
|
0 commit comments