File tree Expand file tree Collapse file tree 3 files changed +42
-2
lines changed
main/java/io/openapiparser
test/kotlin/io/openapiparser/model/v32 Expand file tree Collapse file tree 3 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public interface Keywords {
24
24
String CONTAINS = "contains" ;
25
25
String CONTENT = "content" ;
26
26
String CONTENT_TYPE = "contentType" ;
27
+ String DATA_VALUE = "dataValue" ;
27
28
String DEFAULT = "default" ;
28
29
String DELETE = "delete" ;
29
30
String DEPENDENT_REQUIRED = "dependentRequired" ;
@@ -99,6 +100,7 @@ public interface Keywords {
99
100
String SECURITY = "security" ;
100
101
String SECURITY_SCHEMES = "securitySchemes" ;
101
102
String SELF = "$self" ;
103
+ String SERIALIZED_VALUE = "serializedValue" ;
102
104
String SERVERS = "servers" ;
103
105
String STYLE = "style" ;
104
106
String SUMMARY = "summary" ;
Original file line number Diff line number Diff line change @@ -48,14 +48,22 @@ public String getRef () {
48
48
return getStringOrNull (DESCRIPTION );
49
49
}
50
50
51
- public @ Nullable Object getValue () {
52
- return getRawValue (VALUE );
51
+ public @ Nullable Object getDataValue () {
52
+ return getRawValue (DATA_VALUE );
53
+ }
54
+
55
+ public @ Nullable String getSerializedValue () {
56
+ return getStringOrNull (SERIALIZED_VALUE );
53
57
}
54
58
55
59
public @ Nullable String getExternalValue () {
56
60
return getStringOrNull (EXTERNAL_VALUE );
57
61
}
58
62
63
+ public @ Nullable Object getValue () {
64
+ return getRawValue (VALUE );
65
+ }
66
+
59
67
@ Override
60
68
public Map <String , @ Nullable Object > getExtensions () {
61
69
return super .getExtensions ();
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2025 https://github.com/openapi-processor/openapi-parser
3
+ * PDX-License-Identifier: Apache-2.0
4
+ */
5
+
6
+ package io.openapiparser.model.v32
7
+
8
+ import io.kotest.core.spec.style.StringSpec
9
+ import io.kotest.matchers.nulls.shouldBeNull
10
+ import io.kotest.matchers.nulls.shouldNotBeNull
11
+ import io.kotest.matchers.shouldBe
12
+
13
+ class ExampleSpec : StringSpec ({
14
+
15
+ " gets example data value" {
16
+ example("dataValue: {}").dataValue.shouldNotBeNull()
17
+ }
18
+
19
+ " gets example data value is null if missing" {
20
+ example().dataValue.shouldBeNull()
21
+ }
22
+
23
+ " gets example serialized value" {
24
+ example("serializedValue: url").serializedValue shouldBe " url"
25
+ }
26
+
27
+ " gets example serialized value is null if missing" {
28
+ example().serializedValue.shouldBeNull()
29
+ }
30
+ })
You can’t perform that action at this time.
0 commit comments