diff --git a/src/templates/Swagger/Paths.jsx b/src/templates/Swagger/Paths.jsx index 0fe25b81..f1675478 100644 --- a/src/templates/Swagger/Paths.jsx +++ b/src/templates/Swagger/Paths.jsx @@ -35,10 +35,10 @@ const ParameterExample = ({ properties }) => ( )} {(properties[key].type === 'integer' || properties[key].type === 'number') && ( - - {`${properties[key].example}`} - - )} + + {`${properties[key].example}`} + + )} {(properties[key].type === 'array' || properties[key].type === 'object') && JSON.stringify(properties[key].example, null, 2)} @@ -117,29 +117,38 @@ const ResponseExample = ({ examples }) => { Example
- {typeof jsonExample == "boolean" ? {JSON.stringify(jsonExample)} : } + {typeof jsonExample === 'boolean' ? ( + {JSON.stringify(jsonExample)} + ) : ( + + )} ) } else if (plainText) { - return
Example{plainText}
+ return ( +
+ Example + {plainText} +
+ ) } return null } ResponseExample.propTypes = { - example: PropTypes.object + examples: PropTypes.object } const Method = ({ keyName, value }) => { const { summary, description, parameters, responses } = value - console.log("---", summary, responses) + console.log('---', summary, responses) return (