read database info from file
This commit is contained in:
@ -90,7 +90,7 @@ if [ "$STAGE2" = "1" ]; then
|
||||
echo "patch DbService registering into generated startup code"
|
||||
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#^\([[: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.AddSingleton<IDbInfoService, DbInfoService>();\n\1services.AddTransient<IDbService, DbService>();\n\n\1\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#' \
|
||||
|
Reference in New Issue
Block a user