Skip to content

Commit 930adb1

Browse files
committed
api_refs.sh: Fix DXP install; Redocly config
1 parent eb401dc commit 930adb1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tools/api_refs/api_refs.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PHPDOC_CONF="$(pwd)/tools/api_refs/phpdoc.dist.xml"; # Absolute path to phpDocum
1616
#PHPDOC_CONF="$(pwd)/tools/api_refs/phpdoc.dev.xml"; # Absolute path to phpDocumentor configuration file
1717
PHPDOC_TEMPLATE_VERSION='3.8.0'; # Version of the phpDocumentor base template set
1818
PHPDOC_DIR="$(pwd)/tools/api_refs/.phpdoc"; # Absolute path to phpDocumentor resource directory (containing the override template set)
19+
REDOCLY_CONFIG="$(pwd)/tools/api_refs/redocly.yaml"; # Absolute path to Redocly configuration file
1920

2021
PHP_BINARY="php -d error_reporting=`php -r 'echo E_ALL & ~E_DEPRECATED;'`"; # Avoid depreciation messages from phpDocumentor/Reflection/issues/529 when using PHP 8.2 or higher
2122
TMP_DXP_DIR=/tmp/ibexa-dxp-phpdoc; # Absolute path of the temporary directory in which Ibexa DXP will be installed and the PHP API Reference built
@@ -196,11 +197,14 @@ else
196197
exit 3;
197198
fi;
198199

199-
echo -n 'Dumping REST OpenAPI schema… ';
200+
echo 'Set up DXP recipes…';
201+
git init && git add . && git commit -m "Installed Ibexa Commerce" > /dev/null;
202+
composer recipes:install ibexa/$DXP_EDITION --no-interaction;
203+
204+
echo 'Dump REST OpenAPI schema… ';
200205
$PHP_BINARY bin/console ibexa:openapi --yaml > openapi.yaml;
201-
echo -n 'Building REST Reference… ';
202-
redocly build-docs openapi.yaml --output $REST_API_OUTPUT_FILE
203-
echo 'OK';
206+
echo 'Build REST Reference… ';
207+
redocly build-docs openapi.yaml --output $REST_API_OUTPUT_FILE --config $REDOCLY_CONFIG;
204208

205209
if [ 1 -eq $FORCE_DXP_INSTALL ]; then
206210
echo 'Remove temporary directory…';

tools/api_refs/redocly.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
theme:
2+
openapi:
3+
hideHostname: true

0 commit comments

Comments
 (0)