-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate shim stub with oapi-codegen
- Loading branch information
Showing
13 changed files
with
3,649 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$(call _assert_var,MAKEDIR) | ||
$(call _conditional_include,$(MAKEDIR)/base.mk) | ||
$(call _assert_var,CACHE_VERSIONS) | ||
$(call _assert_var,CACHE_BIN) | ||
|
||
OAPI_CODEGEN_VERSION ?= 2.3.0 | ||
|
||
OAPI_CODEGEN := $(CACHE_VERSIONS)/oapi-codegen/$(OAPI_CODEGEN_VERSION) | ||
$(OAPI_CODEGEN): | ||
rm -f $(CACHE_BIN)/oapi-codegen | ||
mkdir -p $(CACHE_BIN) | ||
env GOBIN=$(CACHE_BIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v$(OAPI_CODEGEN_VERSION) | ||
chmod +x $(CACHE_BIN)/oapi-codegen | ||
rm -rf $(dir $(OAPI_CODEGEN)) | ||
mkdir -p $(dir $(OAPI_CODEGEN)) | ||
touch $(OAPI_CODEGEN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package shim | ||
|
||
type Config struct { | ||
Enabled bool | ||
Addr string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/deepmap/oapi-codegen/HEAD/configuration-schema.json | ||
package: gen | ||
generate: | ||
std-http-server: true | ||
strict-server: true | ||
models: true | ||
embedded-spec: true | ||
output: gen/shim.go | ||
output-options: | ||
name-normalizer: ToCamelCaseWithInitialisms | ||
disable-type-aliases-for-type: [] | ||
compatibility: | ||
always-prefix-enum-values: true |
Oops, something went wrong.