@@ -43,7 +43,7 @@ testRule('asyncapi2-schema-examples', [
4343 parameters : {
4444 userId : {
4545 schema : {
46- examples : [ 17 , 'one' , 13 ] ,
46+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
4747 } ,
4848 } ,
4949 } ,
@@ -53,26 +53,26 @@ testRule('asyncapi2-schema-examples', [
5353 parameters : {
5454 orphanParameter : {
5555 schema : {
56- examples : [ 17 , 'one' , 13 ] ,
56+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
5757 } ,
5858 } ,
5959 } ,
6060 schemas : {
6161 aSchema : {
62- type : 'string ' ,
63- examples : [ 17 , 'one' , 13 ] ,
62+ type : 'object ' ,
63+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
6464 } ,
6565 } ,
6666 } ,
6767 } ,
6868 errors : [
6969 {
70- message : '"0" property type must be string ' ,
70+ message : '"0" property type must be object ' ,
7171 path : [ 'components' , 'schemas' , 'aSchema' , 'examples' , '0' ] ,
7272 severity : DiagnosticSeverity . Error ,
7373 } ,
7474 {
75- message : '"2" property type must be string ' ,
75+ message : '"2" property type must be object ' ,
7676 path : [ 'components' , 'schemas' , 'aSchema' , 'examples' , '2' ] ,
7777 severity : DiagnosticSeverity . Error ,
7878 } ,
@@ -88,7 +88,7 @@ testRule('asyncapi2-schema-examples', [
8888 parameters : {
8989 userId : {
9090 schema : {
91- examples : [ 17 , 'one' , 13 ] ,
91+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
9292 } ,
9393 } ,
9494 } ,
@@ -98,26 +98,26 @@ testRule('asyncapi2-schema-examples', [
9898 parameters : {
9999 orphanParameter : {
100100 schema : {
101- type : 'string ' ,
102- examples : [ 17 , 'one' , 13 ] ,
101+ type : 'object ' ,
102+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
103103 } ,
104104 } ,
105105 } ,
106106 schemas : {
107107 aSchema : {
108- examples : [ 17 , 'one' , 13 ] ,
108+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
109109 } ,
110110 } ,
111111 } ,
112112 } ,
113113 errors : [
114114 {
115- message : '"0" property type must be string ' ,
115+ message : '"0" property type must be object ' ,
116116 path : [ 'components' , 'parameters' , 'orphanParameter' , 'schema' , 'examples' , '0' ] ,
117117 severity : DiagnosticSeverity . Error ,
118118 } ,
119119 {
120- message : '"2" property type must be string ' ,
120+ message : '"2" property type must be object ' ,
121121 path : [ 'components' , 'parameters' , 'orphanParameter' , 'schema' , 'examples' , '2' ] ,
122122 severity : DiagnosticSeverity . Error ,
123123 } ,
@@ -133,8 +133,8 @@ testRule('asyncapi2-schema-examples', [
133133 parameters : {
134134 userId : {
135135 schema : {
136- type : 'string ' ,
137- examples : [ 17 , 'one' , 13 ] ,
136+ type : 'object ' ,
137+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
138138 } ,
139139 } ,
140140 } ,
@@ -144,25 +144,25 @@ testRule('asyncapi2-schema-examples', [
144144 parameters : {
145145 orphanParameter : {
146146 schema : {
147- examples : [ 17 , 'one' , 13 ] ,
147+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
148148 } ,
149149 } ,
150150 } ,
151151 schemas : {
152152 aSchema : {
153- examples : [ 17 , 'one' , 13 ] ,
153+ examples : [ 17 , { } , 13 , 'string-is-always-accepted' ] ,
154154 } ,
155155 } ,
156156 } ,
157157 } ,
158158 errors : [
159159 {
160- message : '"0" property type must be string ' ,
160+ message : '"0" property type must be object ' ,
161161 path : [ 'channels' , 'users/{userId}/signedUp' , 'parameters' , 'userId' , 'schema' , 'examples' , '0' ] ,
162162 severity : DiagnosticSeverity . Error ,
163163 } ,
164164 {
165- message : '"2" property type must be string ' ,
165+ message : '"2" property type must be object ' ,
166166 path : [ 'channels' , 'users/{userId}/signedUp' , 'parameters' , 'userId' , 'schema' , 'examples' , '2' ] ,
167167 severity : DiagnosticSeverity . Error ,
168168 } ,
0 commit comments