diff --git a/Makefile b/Makefile index fcfe2cba0..cdbbf63f2 100644 --- a/Makefile +++ b/Makefile @@ -90,11 +90,11 @@ gen-client-ts: -i /local/schema.yml \ -g typescript-fetch \ -o /local/gen-ts-api \ - --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} \ + -c /local/scripts/api-ts-config.yaml \ + --additional-properties=npmVersion=${NPM_VERSION} \ --git-repo-id authentik \ --git-user-id goauthentik mkdir -p web/node_modules/@goauthentik/api - \cp -fv scripts/web_api_readme.md gen-ts-api/README.md cd gen-ts-api && npm i \cp -rfv gen-ts-api/* web/node_modules/@goauthentik/api diff --git a/scripts/api-ts-config.yaml b/scripts/api-ts-config.yaml new file mode 100644 index 000000000..86577b10b --- /dev/null +++ b/scripts/api-ts-config.yaml @@ -0,0 +1,12 @@ +templateDir: /local/scripts/api-ts-templates/ +additionalProperties: + typescriptThreePlus: true + supportsES6: true + npmName: "@goauthentik/api" + fileContentDataType: Blob + enumUnknownDefaultCase: true + useObjectParameters: true +files: + README.mustache: + templateType: SupportingFiles + destinationFilename: README.md diff --git a/scripts/web_api_readme.md b/scripts/api-ts-templates/README.mustache similarity index 100% rename from scripts/web_api_readme.md rename to scripts/api-ts-templates/README.mustache