Skip to content

Commit

Permalink
feat: allow injecting custom inflector config
Browse files Browse the repository at this point in the history
  • Loading branch information
fgreinacher committed Dec 17, 2024
1 parent dd7f8f4 commit f018ad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Image accepts the following env variables:
- `HIDDEN_OPTIONS_PATH` (alternative to `HIDDEN_OPTIONS`): useful if attaching a volume containing a `hiddenOptions.yaml` file definining which languages to hide. e.g. `/data/hiddenOptions.yaml`
- `HIDDEN_OPTIONS` (alternative to `HIDDEN_OPTIONS_PATH`): allows to pass hidden options as an env variable, in the format `{category}:{language},{language},{language}|{category}:{language},{language},{language}`
e.g. `servers:foo,bar|clientsV3:wtf,isthis` where category can be `clients`, `servers`, `clientsV3`, `serversV3`
- `INFLECTOR_CONFIG_PATH`: the path to a custom [Swagger Inflector configuration](https://github.com/swagger-api/swagger-inflector#configuration), e.g. useful for overriding `rootPath` when exposing Swagger Codegen behind a reverse proxy.

An example of running the container:

Expand Down
2 changes: 1 addition & 1 deletion modules/swagger-generator/docker/jetty_base/start
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ JETTY_OPTS="-Djetty.http.port=${HTTP_PORT-8000} "
JAVA_DEBUG_OPTIONS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8005,server=y,suspend=n "

# APP options
APP_OPTS="-DHIDDEN_OPTIONS_PATH=${HIDDEN_OPTIONS_PATH} -DHIDDEN_OPTIONS=${HIDDEN_OPTIONS}"
APP_OPTS="-DHIDDEN_OPTIONS_PATH=${HIDDEN_OPTIONS_PATH} -DHIDDEN_OPTIONS=${HIDDEN_OPTIONS} -Dconfig=${INFLECTOR_CONFIG_PATH}"
# JVM options
JAVA_OPTS="-Djava.security.manager -Djava.security.policy==grantall.policy -DgeneratorWriteDirs="/tmp" -server -Duser.timezone=GMT -Xms${HEAP} -Xmx${HEAP} -XX:NewSize=${NEW_SIZE} -XX:MaxNewSize=${NEW_SIZE} ${EXIT_ON_OUTOFMEMORYERROR_OPTION} -Dfile.encoding=UTF-8"

Expand Down

0 comments on commit f018ad0

Please sign in to comment.