Update code-gen to generate Angular client for Palantir API
Modified the Docker setup to generate a TypeScript-Angular client from the Palantir API. Added configuration options via a new `options.json` file and updated paths to align with the Angular frontend. Adjusted the script to replace the old client location with the updated Angular client path.
This commit is contained in:
parent
9caf5a0003
commit
ae59139fdf
1
docker/.gitignore
vendored
1
docker/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
code-gen/
|
||||
!code-gen/**/docker-compose.yml
|
||||
!code-gen/**/config.json
|
||||
@ -26,13 +26,13 @@ services:
|
||||
image: swaggerapi/swagger-codegen-cli-v3
|
||||
container_name: codegen-cli
|
||||
command: >
|
||||
config-help
|
||||
generate
|
||||
-i http://palantir:5035/openapi/v1.json
|
||||
-l typescript-angular
|
||||
# generate
|
||||
# -i http://palantir:5035/openapi/v1.json
|
||||
# -l csharp
|
||||
# -o /local
|
||||
# -c /options.json
|
||||
-o /local
|
||||
-c /options.json
|
||||
# config-help
|
||||
# -l typescript-angular
|
||||
restart: no
|
||||
depends_on:
|
||||
palantir:
|
||||
|
||||
9
docker/code-gen/options.json
Normal file
9
docker/code-gen/options.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"supportsES6": true,
|
||||
"npmName": "@gandalf/api",
|
||||
"npmVersion": "0.0.1",
|
||||
"withInterfaces": true,
|
||||
"ngVersion": "19.1.0",
|
||||
"providedInRoot": true,
|
||||
"useOverride": true
|
||||
}
|
||||
@ -5,6 +5,6 @@ rmdir /s /q "dotnet"
|
||||
xcopy "../../src/dotnet" "./dotnet\" /E/H
|
||||
cmd /c "docker-compose up --abort-on-container-exit --force-recreate"
|
||||
cmd /c "docker-compose down"
|
||||
rmdir /s /q "../../src/dotnet/Suspectus.Gandalf.Palantir.Client/Generated"
|
||||
xcopy "./palantir-client" "../../src/dotnet/Suspectus.Gandalf.Palantir.Client/Generated\" /E/H
|
||||
rmdir /s /q "../../src/angular/frontend/src/app/clients/palantir-client-bot"
|
||||
xcopy "./palantir-client" "../../src/angular/frontend/src/app/clients/palantir-client-bot\" /E/H
|
||||
popd
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user