mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-25 03:36:41 +00:00
extend example
This commit is contained in:
7
management/refactor/api/http/specs/cfg.yaml
Normal file
7
management/refactor/api/http/specs/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
management/refactor/api/http/specs/generate.sh
Executable file
16
management/refactor/api/http/specs/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"
|
||||
2870
management/refactor/api/http/specs/openapi.yaml
Normal file
2870
management/refactor/api/http/specs/openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
1
management/refactor/api/http/specs/types.gen.go
Normal file
1
management/refactor/api/http/specs/types.gen.go
Normal file
@@ -0,0 +1 @@
|
||||
package specs
|
||||
Reference in New Issue
Block a user