swagger-to-flowtype icon indicating copy to clipboard operation
swagger-to-flowtype copied to clipboard

Specifying prefix / suffix for flow type

Open mattgstevens opened this issue 5 years ago • 1 comments

I was very pleased to find this library as it does a nice job of generating flow types from an OpenApi schema.

One thing that is missing for me is being able to change the name of the flow type to include a prefix or suffix (different projects I have worked on use one or the other).

ie. changing a schema definition named User:

  • with a type prefix like TUser
  • with a type suffix like UserT

I think this would be covered by adding two additional arguments to the program to take a string and modify the name in all definitions & "$ref" positions.

Are you be open to a PR that addresses this?

mattgstevens avatar Oct 14 '20 16:10 mattgstevens

Created pull request, hope it will be merge/release on npm soon.

cloudle avatar Dec 09 '20 05:12 cloudle