swagger-models-to-react-proptypes
CLI that consumes a swagger endpoint and spits out React propType definitions.
Installation:
npm install -g swagger-models-to-react-proptypes
Usage:
swagger-models-to-react-proptypes http://petstore.swagger.io/v2/swagger.json
/** Generated PropTypes for http://petstore.swagger.io/v2/swagger.json------------------------------------------------------------------ **/ var PropTypes = Order: ReactPropTypesshape id: ReactPropTypesnumber petId: ReactPropTypesnumber quantity: ReactPropTypesnumber shipDate: ReactPropTypesstring status: ReactPropTypes complete: ReactPropTypesbool Category: ReactPropTypesshape id: ReactPropTypesnumber name: ReactPropTypesstring User: ReactPropTypesshape id: ReactPropTypesnumber username: ReactPropTypesstring firstName: ReactPropTypesstring lastName: ReactPropTypesstring email: ReactPropTypesstring password: ReactPropTypesstring phone: ReactPropTypesstring userStatus: ReactPropTypesnumber Tag: ReactPropTypesshape id: ReactPropTypesnumber name: ReactPropTypesstring Pet: ReactPropTypesshape id: ReactPropTypesnumber category: PropTypesCategory name: ReactPropTypesstringisRequired photoUrls: ReactPropTypesisRequired tags: ReactPropTypes status: ReactPropTypes ApiResponse: ReactPropTypesshape code: ReactPropTypesnumber type: ReactPropTypesstring message: ReactPropTypesstring ;