Docker container for deepmap/oapi-codegen.
/src inside the container is a default working directory.
Assume current directory contains openapi.yml:
$ ls -l $PWD
-rw-r--r-- 1 user group 173135 Sep 31 22:47 openapi.yaml
Generate go representation of the specification (types, client, server, spec by default):
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "${PWD}:/src" \
artsafin/docker-oapi-codegen -o api.gen.go openapi.yaml
Result:
$ ls -l $PWD
-rw-r--r-- 1 user group 173135 Sep 31 22:47 openapi.yaml
-rw-r--r-- 1 user group 1335 Sep 31 22:48 api.gen.go
See original Usage on syntax.
Content type
Image
Digest
Size
9.2 MB
Last updated
about 6 years ago
docker pull artsafin/docker-oapi-codegen