File tree 4 files changed +8
-1
lines changed
4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ interface ConfigInterface {
17
17
servers? : boolean ;
18
18
operations? : boolean ;
19
19
messages? : boolean ;
20
+ messageExamples? : boolean ;
20
21
schemas? : boolean ;
21
22
errors? : boolean ;
22
23
};
@@ -45,7 +46,10 @@ interface ConfigInterface {
45
46
- ** show?: Partial<ShowConfig >**
46
47
47
48
This field contains configuration responsible for rendering specific parts of the AsyncAPI component.
48
- All except the ` sidebar ` fields are set to ` true ` by default.
49
+ The ` sidebar ` and ` messageExamples ` fields are set to ` false ` by default. The default for all other fields is ` true ` .
50
+
51
+ The examples for messages shown within an operation are always displayed. To also show examples for the
52
+ standalone messages in the "Messages" section, set ` messageExamples ` to ` true ` .
49
53
50
54
- ** sidebar?: Partial<SideBarConfig >**
51
55
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export interface ShowConfig {
19
19
servers ?: boolean ;
20
20
operations ?: boolean ;
21
21
messages ?: boolean ;
22
+ messageExamples ?: boolean ;
22
23
schemas ?: boolean ;
23
24
errors ?: boolean ;
24
25
}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export const defaultConfig: ConfigInterface = {
16
16
servers : true ,
17
17
operations : true ,
18
18
messages : true ,
19
+ messageExamples : false ,
19
20
schemas : true ,
20
21
errors : true ,
21
22
} ,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export const Messages: React.FunctionComponent = () => {
36
36
message = { message }
37
37
index = { idx + 1 }
38
38
key = { message . id ( ) }
39
+ showExamples = { config ?. show ?. messageExamples ?? false }
39
40
/>
40
41
</ li >
41
42
) ) }
You can’t perform that action at this time.
0 commit comments