website: add docs for making schema changes

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-23 10:32:37 +02:00
parent 2a11964e1a
commit 439454a71b
4 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View file

@ -201,3 +201,4 @@ media/
.idea/
/api/
/web-api/

View file

@ -44,6 +44,9 @@ gen-web:
-g typescript-fetch \
-o /local/web-api \
--additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION}
mkdir -p web/node_modules/@goauthentik/api
cd web-api && npm i
\cp -rfv web-api/* web/node_modules/@goauthentik/api
gen-outpost:
docker run \

View file

@ -0,0 +1,23 @@
---
title: Making schema changes
---
Some backend changes might require new/different fields or remove other fields. To create a new schema after changing a Serializer, run `make gen-build`.
This will update the `schema.yml` file in the root of the repository.
## Building the Go Client
The Go client is used by the Outpost to communicate with the backend authentik server. To build the go client, run `make gen-outpost`.
The generated files are stored in `/api` in the root of the repository.
## Building the Web Client
The web client is used by the web-interface and web-FlowExecutor to communicate with authentik. To build the client, run `make gen-web`.
Since the client is normally distributed as an npm package, running `make gen-web` will overwrite the locally installed client with the newly built one.
:::warning
Running `npm i` in the `/web` folder after using `make gen-web` will overwrite the custom client and revert to the upstream client.
:::

View file

@ -12,6 +12,10 @@ module.exports = {
type: "doc",
id: "frontend-only-dev-environment",
},
{
type: "doc",
id: "making-schema-changes",
},
{
type: "doc",
id: "api",