File tree Expand file tree Collapse file tree 5 files changed +24
-8
lines changed
src/schema/asyncapi-2.0.0
test/specs/asyncapi-2.0.0 Expand file tree Collapse file tree 5 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 52
52
"eslint" : " ^6.7.2" ,
53
53
"fast-check" : " ^1.17.0" ,
54
54
"fp-ts" : " ^2.1.0" ,
55
- "io-ts" : " ^2.0.1 " ,
55
+ "io-ts" : " ^2.0.5 " ,
56
56
"io-ts-types" : " ^0.5.1" ,
57
57
"jest" : " ^24.9.0" ,
58
58
"nodemon" : " ^2.0.12" ,
62
62
},
63
63
"peerDependencies" : {
64
64
"fp-ts" : " ^2.1.0" ,
65
- "io-ts" : " ^2.0.1 " ,
65
+ "io-ts" : " ^2.0.5 " ,
66
66
"io-ts-types" : " ^0.5.1"
67
67
},
68
68
"jest" : {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface MessageObject {
22
22
readonly description : Option < string > ;
23
23
readonly tags : Option < TagsObject > ;
24
24
readonly externalDocs : Option < ExternalDocumentationObject > ;
25
- readonly examples : Option < Record < string , unknown > > ;
25
+ readonly examples : Option < Record < string , unknown > [ ] > ;
26
26
readonly traits : Option < MessageTraitObject [ ] > ;
27
27
}
28
28
@@ -39,7 +39,7 @@ export const MessageObjectCodec: Codec<MessageObject> = type(
39
39
description : optionFromNullable ( string ) ,
40
40
tags : optionFromNullable ( TagsObjectCodec ) ,
41
41
externalDocs : optionFromNullable ( ExternalDocumentationObjectCodec ) ,
42
- examples : optionFromNullable ( record ( string , unknown ) ) ,
42
+ examples : optionFromNullable ( array ( record ( string , unknown ) ) ) ,
43
43
traits : optionFromNullable ( array ( MessageTraitObjectCodec ) ) ,
44
44
} ,
45
45
'MessageObject' ,
Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ channels:
20
20
time :
21
21
type : string
22
22
format : date-time
23
+ examples :
24
+ - payload : |
25
+ ```
26
+ {"time": "2021-10-01T12:25:36Z", "text": "First message"}
27
+ ```
28
+ - {"time": "2021-10-01T12:25:43Z", "text": "Second message"}
23
29
publish :
24
30
message :
25
31
description : Outgoing message
Original file line number Diff line number Diff line change @@ -68,6 +68,16 @@ components:
68
68
$ref : ' #/components/schemas/Lumens'
69
69
sentAt :
70
70
$ref : ' #/components/schemas/SentAt'
71
+ examples :
72
+ - >
73
+ ```
74
+ {
75
+ "id": 123,
76
+ "lumens": 470,
77
+ "sentAt": "2021-10-04T08:42:25Z"
78
+ }
79
+ ```
80
+ - { "id": 123, "lumens": 470, "sentAt": "2021-10-04T08:42:25Z" }
71
81
Id :
72
82
type : integer
73
83
minimum : 0
Original file line number Diff line number Diff line change @@ -2621,10 +2621,10 @@ io-ts-types@^0.5.1:
2621
2621
resolved "https://registry.yarnpkg.com/io-ts-types/-/io-ts-types-0.5.1.tgz#55bedec94e3cce1413d60c014918091d0dffbbce"
2622
2622
integrity sha512-wdlK7Gn9gBaI3BT44mpwU+Y54J3GTT5R3dkM7CYZoaPMKWDwp/jYZ1Bj8/RRfcwP2ElJjuGre06avjkHLvgl7w==
2623
2623
2624
- io-ts@^2.0.1 :
2625
- version "2.0.1 "
2626
- resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.0.1 .tgz#1261c12f915c2f48d16393a36966636b48a45aa1 "
2627
- integrity sha512-RezD+WcCfW4VkMkEcQWL/Nmy/nqsWTvTYg7oUmTGzglvSSV2P9h2z1PVeREPFf0GWNzruYleAt1XCMQZSg1xxQ ==
2624
+ io-ts@^2.0.5 :
2625
+ version "2.0.5 "
2626
+ resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-2.0.5 .tgz#e6e3db9df8b047f9cbd6b69e7d2ad3e6437a0b13 "
2627
+ integrity sha512-pL7uUptryanI5Glv+GUv7xh+aLBjxGEDmLwmEYNSx0yOD3djK0Nw5Bt0N6BAkv9LadOUU7QKpRsLcqnTh3UlLA ==
2628
2628
2629
2629
is-accessor-descriptor@^0.1.6 :
2630
2630
version "0.1.6"
You can’t perform that action at this time.
0 commit comments