|
@@ -9,29 +9,31 @@ const apis = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-apis?.forEach((api) => {
|
|
|
- generateApi({
|
|
|
- output: api.output,
|
|
|
- templates: path.resolve(__dirname, './templates'),
|
|
|
- url: api.url,
|
|
|
- httpClientType: 'axios',
|
|
|
- modular: true,
|
|
|
- cleanOutput: true,
|
|
|
- moduleNameIndex: 2, // 0 api, 1 api htt-client data-contracts, 2 apis htt-client data-contracts
|
|
|
- moduleNameFirstTag: true, //apis htt-client data-contracts
|
|
|
- unwrapResponseData: true,
|
|
|
- generateUnionEnums: true,
|
|
|
- defaultResponseType: 'AxiosResponse',
|
|
|
- // hooks: {
|
|
|
- // onFormatTypeName: (typeName, rawTypeName, schemaType) => {
|
|
|
+apis?.forEach((api, index) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ generateApi({
|
|
|
+ output: api.output,
|
|
|
+ templates: path.resolve(__dirname, './templates'),
|
|
|
+ url: api.url,
|
|
|
+ httpClientType: 'axios',
|
|
|
+ modular: true,
|
|
|
+ cleanOutput: true,
|
|
|
+ moduleNameIndex: 2, // 0 api, 1 api htt-client data-contracts, 2 apis htt-client data-contracts
|
|
|
+ moduleNameFirstTag: true, //apis htt-client data-contracts
|
|
|
+ unwrapResponseData: true,
|
|
|
+ generateUnionEnums: true,
|
|
|
+ defaultResponseType: 'AxiosResponse',
|
|
|
+ // hooks: {
|
|
|
+ // onFormatTypeName: (typeName, rawTypeName, schemaType) => {
|
|
|
|
|
|
- // },
|
|
|
- // }
|
|
|
- })
|
|
|
- .then((r) => {
|
|
|
- // files.forEach(({ content, name }) => {
|
|
|
- // fs.writeFile(path, content);
|
|
|
- // });
|
|
|
+ // },
|
|
|
+ // }
|
|
|
})
|
|
|
- .catch((e) => console.error(e))
|
|
|
+ .then((r) => {
|
|
|
+ // files.forEach(({ content, name }) => {
|
|
|
+ // fs.writeFile(path, content);
|
|
|
+ // });
|
|
|
+ })
|
|
|
+ .catch((e) => console.error(e))
|
|
|
+ }, index * 1500)
|
|
|
})
|