diff --git a/apps/generator/test/test-templates/react-template/template/test-file.md.js b/apps/generator/test/test-templates/react-template/template/test-file.md.js index a49aa77b8..2549c7e19 100644 --- a/apps/generator/test/test-templates/react-template/template/test-file.md.js +++ b/apps/generator/test/test-templates/react-template/template/test-file.md.js @@ -1,6 +1,7 @@ import { File, Text } from '@asyncapi/generator-react-sdk'; +import PropTypes from 'prop-types'; -export default function({ asyncapi, params }) { +function TestFile ({ asyncapi, params }) { return ( This is a markdown file for my application. @@ -8,4 +9,17 @@ export default function({ asyncapi, params }) { Version {params.version} running on {params.mode} mode ); -} \ No newline at end of file +} + +//props validation +TestFile.propTypes = { + params: PropTypes.shape({ + version: PropTypes.string.isRequired, + mode: PropTypes.string.isRequired, + }).isRequired, + asyncapi: PropTypes.shape({ + info: PropTypes.func.isRequired, + }).isRequired +}; + +export default TestFile \ No newline at end of file