I am trying to run openapi-generator-cli from a devcontainer. Here are the files I used :
// .devcontainer/devcontainer.json
{
"name": "OpenAPI DevContainer",
"dockerFile": "Dockerfile",
"mounts": [
"source=${localWorkspaceFolder}/openapi_specs,target=/workspaces/openapi_specs,type=bind,consistency=cached",
"source=${localWorkspaceFolder}/my_client_library,target=/workspace/my_client_library,type=bind,consistency=cached"
]
}
and
# .devcontainer/Dockerfile
# Use the official openapi-generator-cli Docker image as the base image
FROM openapitools/openapi-generator-cli:latest
# Set the PATH environment variable to include openapi-generator-cli
ENV PATH="/usr/local/bin:${PATH}"
However when the container is built, the following command
openapi-generator-cli --version
returns a "command not found" in the terminal. And a quick search in /usr/bin and /usr/local/bin confirms that it's not in there. So where is it? What am I missing ?
Thanks in advance
Edit :
So I've found a directory openapi-generator-cli inside /opt/openapi-generator/modules, which I then tried to add to PATH, but with no success