-
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
Mattia Pennati
committed
Mar 14, 2024
1 parent
110ca4b
commit 5bb0a9b
Showing
6 changed files
with
662 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
redocly build-docs ./target/openapi.json --output redoc-static.html --theme.openapi.hideHostname | ||
mv ./redoc-static.html ./target |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# TO DO: export real variables before executing this script | ||
#export AZURE_TENANT_ID="<val>" | ||
#export AZURE_ODM_APP_CLIENT_ID="<val>" | ||
#export AZURE_ODM_APP_CLIENT_SECRET="<val>" | ||
|
||
# Generate openapi.json and redoc-static.html for each module | ||
mvn clean package spring-boot:repackage -DskipTests | ||
mvn clean verify -DskipTests -Pgenerate-doc | ||
|
||
# Create a directory for documentation | ||
DOC_DIR="redocly-docs" | ||
|
||
# Check if the doc directory already exists | ||
if [ -d "$DOC_DIR" ]; then | ||
# If it exists, remove it and create a new one | ||
rm -rf "$DOC_DIR" | ||
fi | ||
|
||
# Create a new doc directory | ||
mkdir "$DOC_DIR" | ||
|
||
# Find all redoc-static.html files | ||
REDOC_FILE="azuredevops-server/target/redoc-static.html" | ||
|
||
# Check if any redoc-static.html files were found | ||
if [ -z "$REDOC_FILE" ]; then | ||
echo "No redoc-static.html file found in target directory." | ||
exit 1 | ||
fi | ||
|
||
# Copy and rename all redoc-static.html files to the aggregated documentation directory | ||
NEW_NAME="${DOC_DIR}/executor-azuredevops-redoc-static.html" | ||
cp "$REDOC_FILE" "$NEW_NAME" | ||
echo "Renamed and copied $REDOC_FILE to $NEW_NAME" | ||
|
||
echo "Documentation generated successfully in $DOC_DIR" |
Oops, something went wrong.