Open nitrosx opened 2 hours ago
The issue is that the docker command to generated the sdk is missing the following option --add-host host.docker.internal:host-gateway
which is needed for linux environments:
The full command should be:
ker run --rm --add-host host.docker.internal:host-gateway -v "cd:/local" openapitools/openapi-generator-cli:v7.9.0 generate -i http://host.docker.internal:3000/explorer-json -g typescript-angular -o local/@scicatproject/scicat-sdk-ts --additional-properties=ngVersion=16.2.12,npmName=@scicatproject/scicat-sdk-ts,supportsES6=true,npmVersion=10.8.2,withInterfaces=true
I was finally able to generate the sdk locally with the following command:
docker run
--rm
--add-host host.docker.internal:host-gateway
-v "./node_modules:/local"
openapitools/openapi-generator-cli:v7.9.0
generate
-i http://host.docker.internal:3000/explorer-json
-g typescript-angular
-o local/@scicatproject/scicat-sdk-ts
--additional-properties=ngVersion=16.2.12,npmName=@scicatproject/scicat-sdk-ts,supportsES6=true,npmVersion=10.8.2,withInterfaces=true
My dev environment is linux: ubuntu base linuxmint
Issue Name
Error generating sdk package for local development
Summary
I tried to run the sdk generation locally using the npm command, and I received the following output and error:
Steps to Reproduce
Cloned repo and pull new-sdk-release branch. Run command
npm run generate:sdk:local