Skip to content

Commit 71528a3

Browse files
author
Alban Bailly
committed
CT-918 add missing data in Request Samples
1 parent 9b4ebfb commit 71528a3

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

src/components/2_molecules/ResponseSampleBody.js

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,44 @@ export const ResponseSampleBody = props => {
4444
Object.keys(l.properties)
4545
.filter(v => l.properties[v] !== null)
4646
.map(e => {
47-
console.log(l.properties);
4847
const data = l.properties[e];
4948
return `
50-
"${e}": ${JSON.stringify(
51-
data.example ? data.example : ""
52-
)}
49+
"${e}": ${
50+
data.example
51+
? JSON.stringify(data.example)
52+
: data.type === "object" && data.properties
53+
? `{
54+
${Object.keys(data.properties)
55+
.filter(v => data.properties[v] !== null)
56+
.map(s => {
57+
const dps = data.properties[s];
58+
return dps
59+
? `"${s}": ${
60+
dps.example
61+
? JSON.stringify(dps.example)
62+
: dps.type === "object" &&
63+
dps.properties
64+
? `{
65+
${Object.keys(dps.properties)
66+
.filter(
67+
v => dps.properties[v] !== null
68+
)
69+
.map(s2 => {
70+
const dps2 = dps.properties[s2];
71+
return dps2
72+
? `"${s2}": ${JSON.stringify(
73+
dps2.example
74+
? dps2.example
75+
: ""
76+
)}`
77+
: "";
78+
})}}`
79+
: ""
80+
}`
81+
: "";
82+
})}}`
83+
: ""
84+
}
5385
`;
5486
}) +
5587
`}`) +

src/components/2_molecules/sidemenu.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class SideMenu extends React.Component {
6969
});
7070

7171
const windowWidth = window.screen.width;
72-
console.log(windowWidth);
7372
const transitionDelay = windowWidth <= 480 ? 0 : 50;
7473

7574
hash &&

0 commit comments

Comments
 (0)