An auto typescript/javascript code generator from swagger.
MIT License
Generate code from postman collection
Full Changelog: https://github.com/hosseinmd/swagger-typescript/compare/v6.2.2...v6.3.0
Published by hosseinmd over 2 years ago
Published by hosseinmd about 3 years ago
I excited to tell we know generating hooks for APIs for example:
A get endpoint
/user/info
will be useGetUserInfo
you can use it like this
const {data,isLoading,error} = useGetUserInfo()
Published by hosseinmd over 3 years ago
Published by hosseinmd over 3 years ago
Published by hosseinmd over 3 years ago
Published by hosseinmd about 4 years ago
Security is exported from swagger.json and you can access that on all requests, you can use that to specify authentication.
https://github.com/hosseinmd/swagger-typescript/commit/474bda15a87336d8ca977da2ed1baa818cb41bd5
Published by hosseinmd about 4 years ago
In this release we changed config.ts
to use Axios interceptor for customization.
If you are using v3 or below, read how to migrate to v4
.
Thanks @tbowmo
Published by hosseinmd about 4 years ago
For format to JavaScript you should edit the language in swagger.config.json
{
...
"language": "javascript"
}