path confusions
This commit is contained in:
parent
c6fb7b498f
commit
ebc5018b22
4
ENV
4
ENV
@ -1,7 +1,7 @@
|
|||||||
PACKAGE_NAME=de.hottis.genericdatabaseapiservice
|
PACKAGE_NAME=com.krohne.genericdatabaseapiservice
|
||||||
export PACKAGE_NAME
|
export PACKAGE_NAME
|
||||||
|
|
||||||
ROUTE_PREFIX="pdb/v2/api"
|
ROUTE_PREFIX="pdb/v2"
|
||||||
export ROUTE_PREFIX
|
export ROUTE_PREFIX
|
||||||
|
|
||||||
# DO NOT USE IN CI/CD ENVIRONMENT, ONLY FOR MANUAL BUILDS AND RUNS
|
# DO NOT USE IN CI/CD ENVIRONMENT, ONLY FOR MANUAL BUILDS AND RUNS
|
||||||
|
@ -91,9 +91,15 @@ if [ "$STAGE2" = "1" ]; then
|
|||||||
sed -i output/src/$PACKAGE_NAME/Startup.cs \
|
sed -i output/src/$PACKAGE_NAME/Startup.cs \
|
||||||
-e 's#\(using '$PACKAGE_NAME'.OpenApi;\)#\1\n\n// added by post-processor\nusing '$PACKAGE_NAME'.Services;\n#' \
|
-e 's#\(using '$PACKAGE_NAME'.OpenApi;\)#\1\n\n// added by post-processor\nusing '$PACKAGE_NAME'.Services;\n#' \
|
||||||
-e 's#^\([[:space:]]*\)\(// Add framework services.\)#\1// added by post-processor\n\1services.AddTransient<IDbService, DbService>();\n\n\1\2#' \
|
-e 's#^\([[:space:]]*\)\(// Add framework services.\)#\1// added by post-processor\n\1services.AddTransient<IDbService, DbService>();\n\n\1\2#' \
|
||||||
-e 's#\(c.RoutePrefix = "\)openapi\(";\)#\1'$ROUTE_PREFIX'/doc\2#' \
|
-e 's#\(c.RoutePrefix = "\)openapi\(";\)#\1'$ROUTE_PREFIX'/api/doc\2#' \
|
||||||
|
-e 's#\(c.SwaggerEndpoint("\)/openapi/2.0.0/openapi.json\(", "Generic Database API Service");\)#\1'$ROUTE_PREFIX'/api/openapi/JSON\2#' \
|
||||||
|
-e 's#\(c.RouteTemplate = "\)openapi/{documentName}/openapi.json\(";\)#\1'$ROUTE_PREFIX'/api/openapi/JSON\2#' \
|
||||||
-e 's#\(app.UseHttpsRedirection();\)#// \1#'
|
-e 's#\(app.UseHttpsRedirection();\)#// \1#'
|
||||||
|
|
||||||
|
echo "fix root redirect in index.html"
|
||||||
|
sed -i output/src/$PACKAGE_NAME/wwwroot/index.html \
|
||||||
|
-e 's#openapi#'$ROUTE_PREFIX'/api/doc#'
|
||||||
|
|
||||||
echo "disable documentation warnings in generated code"
|
echo "disable documentation warnings in generated code"
|
||||||
sed -i output/src/$PACKAGE_NAME/$PACKAGE_NAME.csproj \
|
sed -i output/src/$PACKAGE_NAME/$PACKAGE_NAME.csproj \
|
||||||
-e 's#\(</PropertyGroup>\)#<NoWarn>1591</NoWarn>\n\1#'
|
-e 's#\(</PropertyGroup>\)#<NoWarn>1591</NoWarn>\n\1#'
|
||||||
|
@ -4,6 +4,7 @@ info:
|
|||||||
title: Generic Database API Service
|
title: Generic Database API Service
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
|
|
||||||
|
|
||||||
paths:
|
paths:
|
||||||
# /pdb/v2/test1:
|
# /pdb/v2/test1:
|
||||||
# post:
|
# post:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user