Review authentik-api-client-generation doc: fix stale content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c9d273dc81
commit
2a2811d7a5
2 changed files with 7 additions and 18 deletions
1
docs/changelog.d/main.doc.md
Normal file
1
docs/changelog.d/main.doc.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Review and update authentik-api-client-generation doc: remove stale patch note, fix test-build.nix section, add last-reviewed date.
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Generate Authentik API Clients
|
title: Generate Authentik API Clients
|
||||||
modified: 2026-02-28
|
modified: 2026-03-01
|
||||||
|
last-reviewed: 2026-03-01
|
||||||
requires:
|
requires:
|
||||||
- mirror-authentik-build-deps
|
- mirror-authentik-build-deps
|
||||||
tags:
|
tags:
|
||||||
|
|
@ -29,31 +30,18 @@ Both clients are generated from the same `schema.yml` OpenAPI spec in the main a
|
||||||
## Key Details
|
## Key Details
|
||||||
|
|
||||||
- Source spec: `schema.yml` in the authentik repo root
|
- Source spec: `schema.yml` in the authentik repo root
|
||||||
- Go client replaces `vendor/goauthentik.io/api/v3/` in the server build
|
- Go client replaces `vendor/goauthentik.io/api/v3/` in the server build (via `api-go-vendor-hook.nix`)
|
||||||
- TypeScript client replaces `web/node_modules/@goauthentik/api/` in the web UI build
|
- TypeScript client replaces `web/node_modules/@goauthentik/api/` in the web UI build (symlinked in `webui.nix`)
|
||||||
- The nixpkgs derivation patches the generated Go client (`client-go-config.patch`) — check if still needed
|
|
||||||
|
|
||||||
## Testing on Ringtail
|
## Testing on Ringtail
|
||||||
|
|
||||||
Use this ad-hoc `test-build.nix` harness (not committed to the repo):
|
The `test-build.nix` harness in `containers/authentik/` supports individual component builds:
|
||||||
|
|
||||||
```nix
|
|
||||||
# test-build.nix
|
|
||||||
let
|
|
||||||
pkgs = (builtins.getFlake "nixpkgs").legacyPackages.x86_64-linux;
|
|
||||||
sources = import ./sources.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
client-go = import ./client-go.nix { inherit pkgs sources; };
|
|
||||||
client-ts = import ./client-ts.nix { inherit pkgs sources; };
|
|
||||||
api-go-vendor-hook = import ./api-go-vendor-hook.nix { inherit pkgs sources; };
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
set tmpdir (ssh ringtail 'mktemp -d /tmp/authentik-test.XXXXXX')
|
set tmpdir (ssh ringtail 'mktemp -d /tmp/authentik-test.XXXXXX')
|
||||||
scp containers/authentik/*.nix ringtail:$tmpdir/
|
scp containers/authentik/*.nix ringtail:$tmpdir/
|
||||||
ssh ringtail "cd $tmpdir && nix-build test-build.nix -A client-go --extra-experimental-features 'nix-command flakes'"
|
ssh ringtail "cd $tmpdir && nix-build test-build.nix -A client-go --extra-experimental-features 'nix-command flakes'"
|
||||||
|
ssh ringtail "cd $tmpdir && nix-build test-build.nix -A client-ts --extra-experimental-features 'nix-command flakes'"
|
||||||
ssh ringtail "rm -rf $tmpdir"
|
ssh ringtail "rm -rf $tmpdir"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue