wcandillon / swagger-js-codegen

A Swagger Codegen for typescript, nodejs & angularjs
Apache License 2.0
693 stars 286 forks source link

React Native Flow types generation #199

Open sytolk opened 7 years ago

sytolk commented 7 years ago

I'm using swagger-js-codegen script in React Native project to generate React Rest Client from swagger-2.0.json with definitions (mapping model). React native using Flow for JS types. Using getReactCode we don't have swagger definitions generated into Flow types now

const reactjsSourceCode = CodeGen.getReactCode({ // .getTypescriptCode({
    className,
    swagger,
    isES6: true
});

I'm using getTypescriptCode to convert TypeScript (extracted models only) into Flow types with https://github.com/joarwilk/flowgen but it can't be automated and it's better swagger-js-codegen project to do that.