this api create a client for open api specification version 3.0.x
usage:
npx st-open-api -s open-api.json -o client
-s source required the path or url to open-api as JSON
-o output required the output path existing files will be overridden
-f force optional ignore result of validation: default false
-d debug optional output debug information: default false
-l language optional choose your output language (ts|js|onlyJs): default ts
-n serviceSuffix optional choose your service suffix: default Service
-c component optional generate only components
configure the global openApi can be manipulate some variables and every request.
Right now not bound to window object
requestInterceptor: is called before any request is done, here you can manipulate every request, for example add an api-token header.
endpointUrl: add here the endpoint url that will be set in every request as prefix.
Setting a specific endpoint url global or a request interceptor
openApi.endpointUrl = "https://localhost:4444";
- add suffix for enumerations and add a get values list
- delete typings on js maybe js only
- time to add tests
- add a configuration file how to split services