@@ -43,7 +43,7 @@ testRule('asyncapi2-schema-examples', [
43
43
parameters : {
44
44
userId : {
45
45
schema : {
46
- examples : [ 17 , 'one' , 13 ] ,
46
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
47
47
} ,
48
48
} ,
49
49
} ,
@@ -53,26 +53,26 @@ testRule('asyncapi2-schema-examples', [
53
53
parameters : {
54
54
orphanParameter : {
55
55
schema : {
56
- examples : [ 17 , 'one' , 13 ] ,
56
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
57
57
} ,
58
58
} ,
59
59
} ,
60
60
schemas : {
61
61
aSchema : {
62
- type : 'string ' ,
63
- examples : [ 17 , 'one' , 13 ] ,
62
+ type : 'object ' ,
63
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
64
64
} ,
65
65
} ,
66
66
} ,
67
67
} ,
68
68
errors : [
69
69
{
70
- message : '"0" property type must be string ' ,
70
+ message : '"0" property type must be object ' ,
71
71
path : [ 'components' , 'schemas' , 'aSchema' , 'examples' , '0' ] ,
72
72
severity : DiagnosticSeverity . Error ,
73
73
} ,
74
74
{
75
- message : '"2" property type must be string ' ,
75
+ message : '"2" property type must be object ' ,
76
76
path : [ 'components' , 'schemas' , 'aSchema' , 'examples' , '2' ] ,
77
77
severity : DiagnosticSeverity . Error ,
78
78
} ,
@@ -88,7 +88,7 @@ testRule('asyncapi2-schema-examples', [
88
88
parameters : {
89
89
userId : {
90
90
schema : {
91
- examples : [ 17 , 'one' , 13 ] ,
91
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
92
92
} ,
93
93
} ,
94
94
} ,
@@ -98,26 +98,26 @@ testRule('asyncapi2-schema-examples', [
98
98
parameters : {
99
99
orphanParameter : {
100
100
schema : {
101
- type : 'string ' ,
102
- examples : [ 17 , 'one' , 13 ] ,
101
+ type : 'object ' ,
102
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
103
103
} ,
104
104
} ,
105
105
} ,
106
106
schemas : {
107
107
aSchema : {
108
- examples : [ 17 , 'one' , 13 ] ,
108
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
109
109
} ,
110
110
} ,
111
111
} ,
112
112
} ,
113
113
errors : [
114
114
{
115
- message : '"0" property type must be string ' ,
115
+ message : '"0" property type must be object ' ,
116
116
path : [ 'components' , 'parameters' , 'orphanParameter' , 'schema' , 'examples' , '0' ] ,
117
117
severity : DiagnosticSeverity . Error ,
118
118
} ,
119
119
{
120
- message : '"2" property type must be string ' ,
120
+ message : '"2" property type must be object ' ,
121
121
path : [ 'components' , 'parameters' , 'orphanParameter' , 'schema' , 'examples' , '2' ] ,
122
122
severity : DiagnosticSeverity . Error ,
123
123
} ,
@@ -133,8 +133,8 @@ testRule('asyncapi2-schema-examples', [
133
133
parameters : {
134
134
userId : {
135
135
schema : {
136
- type : 'string ' ,
137
- examples : [ 17 , 'one' , 13 ] ,
136
+ type : 'object ' ,
137
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
138
138
} ,
139
139
} ,
140
140
} ,
@@ -144,25 +144,25 @@ testRule('asyncapi2-schema-examples', [
144
144
parameters : {
145
145
orphanParameter : {
146
146
schema : {
147
- examples : [ 17 , 'one' , 13 ] ,
147
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
148
148
} ,
149
149
} ,
150
150
} ,
151
151
schemas : {
152
152
aSchema : {
153
- examples : [ 17 , 'one' , 13 ] ,
153
+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
154
154
} ,
155
155
} ,
156
156
} ,
157
157
} ,
158
158
errors : [
159
159
{
160
- message : '"0" property type must be string ' ,
160
+ message : '"0" property type must be object ' ,
161
161
path : [ 'channels' , 'users/{userId}/signedUp' , 'parameters' , 'userId' , 'schema' , 'examples' , '0' ] ,
162
162
severity : DiagnosticSeverity . Error ,
163
163
} ,
164
164
{
165
- message : '"2" property type must be string ' ,
165
+ message : '"2" property type must be object ' ,
166
166
path : [ 'channels' , 'users/{userId}/signedUp' , 'parameters' , 'userId' , 'schema' , 'examples' , '2' ] ,
167
167
severity : DiagnosticSeverity . Error ,
168
168
} ,
0 commit comments