File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
src/components/2_molecules Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const ResponseSampleBody = props => {
19
19
. filter ( v => properties [ v ] !== null )
20
20
. map ( p => {
21
21
const l = properties [ p ] ;
22
- console . log ( l ) ;
22
+ // console.log(l);
23
23
return (
24
24
l &&
25
25
( l . type !== "array" && l . type !== "object" && p !== "errors"
@@ -46,13 +46,24 @@ export const ResponseSampleBody = props => {
46
46
oo . properties
47
47
? Object . keys ( oo . properties ) . map ( oop => {
48
48
const data = oo . properties [ oop ] ;
49
- // console.log(data);
50
49
return `
51
50
"${ oop } ": ${
52
51
data . example
53
52
? JSON . stringify ( data . example )
54
- : data . type === "object" && data . items
55
- ? ""
53
+ : data . type === "array" && data . items
54
+ ? "[" +
55
+ Object . keys ( data . items . properties ) . map ( di => {
56
+ const dis = data . items . properties [ di ] ;
57
+ console . log ( data . items ) ;
58
+ return `
59
+ "${ di } ": ${
60
+ dis . example
61
+ ? JSON . stringify ( dis . example )
62
+ : '""'
63
+ }
64
+ ` ;
65
+ } ) +
66
+ "]"
56
67
: '""'
57
68
} `;
58
69
} )
You can’t perform that action at this time.
0 commit comments