Skip to content

Commit

Permalink
Merge OpenAPI specs
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Nov 29, 2023
1 parent ade15b7 commit 0a7a796
Show file tree
Hide file tree
Showing 14 changed files with 981 additions and 1,093 deletions.
257 changes: 105 additions & 152 deletions api/golang/http_rest/api_types/api_types.gen.go

Large diffs are not rendered by default.

427 changes: 180 additions & 247 deletions api/golang/http_rest/core_rest_api/api_container_server.gen.go

Large diffs are not rendered by default.

133 changes: 58 additions & 75 deletions api/golang/http_rest/engine_rest_api/engine_server.gen.go

Large diffs are not rendered by default.

91 changes: 38 additions & 53 deletions api/golang/http_rest/websocket_api/websocket_server.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions api/openapi/generators/api_types.cfg.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
package: api_types
generate:
models: true
embedded-spec: true
output: api/golang/http_rest/api_types/api_types.gen.go
output-options:
skip-prune: true
11 changes: 7 additions & 4 deletions api/openapi/generators/core_server.cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ generate:
embedded-spec: true
echo-server: true
strict-server: true
models: true
import-mapping:
./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
output: api/golang/http_rest/core_rest_api/api_container_server.gen.go
additional-imports:
- package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
alias: .
output: api/golang/http_rest/core_rest_api/api_container_server.gen.go
output-options:
include-tags:
- enclave
11 changes: 7 additions & 4 deletions api/openapi/generators/engine_server.cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ generate:
embedded-spec: true
echo-server: true
strict-server: true
models: true
import-mapping:
./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
output: api/golang/http_rest/engine_rest_api/engine_server.gen.go
additional-imports:
- package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
alias: .
output: api/golang/http_rest/engine_rest_api/engine_server.gen.go
output-options:
include-tags:
- engine
11 changes: 7 additions & 4 deletions api/openapi/generators/websocket_server.cfg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ generate:
embedded-spec: true
echo-server: true
strict-server: false
models: true
import-mapping:
./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
output: api/golang/http_rest/websocket_api/websocket_server.gen.go
additional-imports:
- package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types
alias: .
output: api/golang/http_rest/websocket_api/websocket_server.gen.go
output-options:
include-tags:
- streaming
8 changes: 4 additions & 4 deletions api/openapi/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
api_root_dirpath="$(dirname "${script_dirpath}")"

echo "Generating data models for REST API "
oapi-codegen --config="$api_root_dirpath/generators/api_types.cfg.yaml" "$api_root_dirpath/specs/api_types.yaml"
oapi-codegen --config="$api_root_dirpath/generators/api_types.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml"

echo "Generating server code for REST API "
oapi-codegen --config="$api_root_dirpath/generators/engine_server.cfg.yaml" "$api_root_dirpath/specs/engine_service.yaml"
oapi-codegen --config="$api_root_dirpath/generators/core_server.cfg.yaml" "$api_root_dirpath/specs/core_service.yaml"
oapi-codegen --config="$api_root_dirpath/generators/websocket_server.cfg.yaml" "$api_root_dirpath/specs/websocket_service.yaml"
oapi-codegen --config="$api_root_dirpath/generators/engine_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml"
oapi-codegen --config="$api_root_dirpath/generators/core_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml"
oapi-codegen --config="$api_root_dirpath/generators/websocket_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml"
Loading

0 comments on commit 0a7a796

Please sign in to comment.