mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 08:46:38 +00:00
[misc] Separate shared code dependencies (#4288)
* Separate shared code dependencies * Fix import * Test respective shared code * Update openapi ref * Fix test * Fix test path
This commit is contained in:
7
shared/management/http/api/cfg.yaml
Normal file
7
shared/management/http/api/cfg.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
package: api
|
||||
generate:
|
||||
models: true
|
||||
embedded-spec: false
|
||||
output: types.gen.go
|
||||
compatibility:
|
||||
always-prefix-enum-values: true
|
||||
16
shared/management/http/api/generate.sh
Executable file
16
shared/management/http/api/generate.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if ! which realpath > /dev/null 2>&1
|
||||
then
|
||||
echo realpath is not installed
|
||||
echo run: brew install coreutils
|
||||
exit 1
|
||||
fi
|
||||
|
||||
old_pwd=$(pwd)
|
||||
script_path=$(dirname $(realpath "$0"))
|
||||
cd "$script_path"
|
||||
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@4a1477f6a8ba6ca8115cc23bb2fb67f0b9fca18e
|
||||
oapi-codegen --config cfg.yaml openapi.yml
|
||||
cd "$old_pwd"
|
||||
4640
shared/management/http/api/openapi.yml
Normal file
4640
shared/management/http/api/openapi.yml
Normal file
File diff suppressed because it is too large
Load Diff
1962
shared/management/http/api/types.gen.go
Normal file
1962
shared/management/http/api/types.gen.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user