-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Keyfactor/untrusted_root
Regenerate documentation and add support for untrusted root
- Loading branch information
Showing
55 changed files
with
1,191 additions
and
962 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,5 @@ _testmain.go | |
|
||
.idea | ||
.openapi-generator | ||
Keyfactor-v10-patched.swagger.yaml | ||
Makefile | ||
.DS_Store | ||
*.yaml |
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,47 @@ | ||
GO_PACKAGE_NAME = keyfactor | ||
GIT_USER_ID = Keyfactor | ||
GIT_REPO_NAME = keyfactor-go-client-sdk | ||
OPENAPI_YAML = Keyfactor-v10-patched.swagger.yaml | ||
OPENAPI_GENERATOR_VERSION = 6.3.0 | ||
OPENAPI_TEMPLATE_DIR = .openapi-generator/templates/go | ||
|
||
init: | ||
@echo "Initializing..." | ||
@wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(OPENAPI_GENERATOR_VERSION)/openapi-generator-cli-$(OPENAPI_GENERATOR_VERSION).jar -O openapi-generator-cli.jar | ||
|
||
deinit: | ||
@echo "Cleaning up..." | ||
@rm openapi-generator-cli.jar | ||
@rm api/openapi.yaml | ||
|
||
generate: clean init | ||
@echo "Generating..." | ||
@if [ -d $(OPENAPI_TEMPLATE_DIR) ]; \ | ||
then \ | ||
java -jar openapi-generator-cli.jar generate -i $(OPENAPI_YAML) -p packageName=$(GO_PACKAGE_NAME) $(OPENAPI_ARGS) -g go -p isGoSubmodule=false -p disallowAdditionalPropertiesIfNotPresent=false --git-user-id $(GIT_USER_ID) --git-repo-id $(GIT_REPO_NAME) -t $(OPENAPI_TEMPLATE_DIR); \ | ||
else \ | ||
java -jar openapi-generator-cli.jar generate -i $(OPENAPI_YAML) -p packageName=$(GO_PACKAGE_NAME) $(OPENAPI_ARGS) -g go -p isGoSubmodule=false -p disallowAdditionalPropertiesIfNotPresent=false --git-user-id $(GIT_USER_ID) --git-repo-id $(GIT_REPO_NAME); \ | ||
fi | ||
@mkdir ./api/$(GO_PACKAGE_NAME) || (echo /api/$(GO_PACKAGE_NAME) exists) | ||
@mv -f ./*.go ./api/$(GO_PACKAGE_NAME) || (echo no files to move) | ||
@rm .travis.yml || (echo no .travis.yml to remove) | ||
@rm .openapi-generator-ignore || (echo no .openapi-generator-ignore to remove) | ||
@rm git_push.sh || (echo no git_push.sh to remove) | ||
@make deinit | ||
@echo "Done." | ||
|
||
clean: | ||
@echo "Cleaning..." | ||
@rm -rf ./api/$(GO_PACKAGE_NAME) || (echo no ./api/$(GO_PACKAGE_NAME) to remove) | ||
@rm -rf ./go.mod || (echo no ./go.mod to remove) | ||
@rm -rf ./go.sum || (echo no ./go.sum to remove) | ||
@rm -rf ./docs || (echo no ./docs to remove) | ||
@rm -rf ./test || (echo no ./test to remove) | ||
|
||
template: init | ||
@mkdir -p $(OPENAPI_TEMPLATE_DIR) | ||
@echo "Generating Templates..." | ||
@java -jar openapi-generator-cli.jar author template -g go -o $(OPENAPI_TEMPLATE_DIR) | ||
@echo "Cleaning up..." | ||
@rm openapi-generator-cli.jar | ||
@echo "Done." |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.