forked from Normation/rudder-api-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
215 changed files
with
3,838 additions
and
10,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
all: clean build/relay.html build/public-api | ||
API:=public relay | ||
build: $(API) | ||
|
||
build/public-api: | ||
apidoc -v --config src/public-api -i src/public-api/endpoints -f ".*\\.md$$" -o $@ -t template | ||
|
||
build/relay/openapi.yml: | ||
# openapi requires that the parent folder exist but not the target one... | ||
# Rebuild everything at each call as it is fast enough | ||
$(API): | ||
mkdir -p build | ||
rm -fr build/relay | ||
openapi bundle src/relay/openapi.yml -o $@ | ||
# Needed for "openapi bundle" to work | ||
rm -rf build/$@ | ||
# Build a single yaml file from sources | ||
openapi bundle src/$@/openapi.yml --output build/$@/openapi.yml | ||
# Build doc from yaml file (with pre-rendered html) | ||
redoc-cli bundle --output build/$@/index.html build/$@/openapi.yml \ | ||
--disableGoogleFont \ | ||
--options.theme.colors.primary.main="#f08004" \ | ||
--options.expandResponses="200," \ | ||
--options.pathInMiddlePanel=1 \ | ||
--options.hideHostname=1 | ||
# Copy common assets | ||
cp -r src/assets build/$@/ | ||
# Copy specific assets if any | ||
if [ -d src/$@/assets ]; then cp -r src/$@/assets/. build/$@/assets; fi | ||
|
||
build/relay.html: build/relay/openapi.yml | ||
redoc-cli bundle --disableGoogleFont --options.theme.colors.primary.main="#f08004" --options.expandResponses="200," --options.hideHostname=1 --output $@ $< | ||
optipng: | ||
find src -name "*.png" -exec optipng {} \; | ||
|
||
clean: | ||
rm -rf build | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.