0

I am trying to the following in a bat file, in Windows, using OpenAPI generator:

openapi-generator generate -i open-api-offline-file.json -g csharp-netcore -c open-api-config.json -o DataLakeOpenApiRestClient 

REM customizing ApiClient
xcopy .\SourcesCustomizations\ApiClient.cs .\DataLakeOpenApiRestClient\src\Org.OpenAPITools\Client\ApiClient.cs* /Y /F /R

This only generates the code without running the second command (or it is run before the generation ends).

If I start the generation with start /wait:

start /wait openapi-generator generate -i open-api-offline-file.json -g csharp-netcore -c open-api-config.json -o DataLakeOpenApiRestClient 

REM customizing ApiClient
xcopy .\SourcesCustomizations\ApiClient.cs .\DataLakeOpenApiRestClient\src\Org.OpenAPITools\Client\ApiClient.cs* /Y /F /R

it kind of works as expected (explicitly starts a new process and waits for it to exit).

Question: Is there a way to configure OpenAPI Generator to run synchronously?

Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164
  • Possible duplicate of [CALL command vs. START with /WAIT option](https://stackoverflow.com/questions/13257571/call-command-vs-start-with-wait-option) – Helen Sep 27 '19 at 19:12
  • The 2nd example with `start /wait` is the correct solution. It's a Windows thing. – Helen Sep 27 '19 at 19:13

0 Answers0