From a24e327ccbee6f21c7150657c982ccfde80a635d Mon Sep 17 00:00:00 2001 From: Peter Broadhurst Date: Sat, 18 Jun 2022 13:30:01 -0400 Subject: [PATCH 1/3] Allow use of FF object schema generator in custom schema defs for anyOf use cases Signed-off-by: Peter Broadhurst --- .vscode/configurationCache.log | 1 + .vscode/dryrun.log | 11 + .vscode/settings.json | 1 + .vscode/targets.log | 929 +++++++++++++++++++++++++++++++++ pkg/ffapi/openapi3.go | 9 +- pkg/ffapi/openapi3_test.go | 95 ++-- pkg/ffapi/routes.go | 9 +- 7 files changed, 986 insertions(+), 69 deletions(-) create mode 100644 .vscode/configurationCache.log create mode 100644 .vscode/dryrun.log create mode 100644 .vscode/targets.log diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log new file mode 100644 index 0000000..62f24f7 --- /dev/null +++ b/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":["/Users/pbroadhurst/go/bin/golangci-lint","/Users/pbroadhurst/go/bin/mockery","all","build","clean","coverage","coverage.html","deps","firefly-common","go-mod-tidy","lint","mocks","mocks-pkg/httpserver-GoHTTPServer","test"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log new file mode 100644 index 0000000..9b0279d --- /dev/null +++ b/.vscode/dryrun.log @@ -0,0 +1,11 @@ +make --dry-run --always-make --keep-going --print-directory +make: Entering directory `/Users/pbroadhurst/dev/firefly/firefly-common' +go build ./pkg/* + +go get ./pkg/* +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +GOGC=20 /Users/pbroadhurst/go/bin/golangci-lint run -v --timeout 5m +go test ./pkg/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s +go mod tidy +make: Leaving directory `/Users/pbroadhurst/dev/firefly/firefly-common' + diff --git a/.vscode/settings.json b/.vscode/settings.json index 295662a..05a9bb4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "go.lintTool": "golangci-lint", "cSpell.words": [ "codecov", + "Customizer", "Debugf", "FCAPI", "ffapi", diff --git a/.vscode/targets.log b/.vscode/targets.log new file mode 100644 index 0000000..5cee33b --- /dev/null +++ b/.vscode/targets.log @@ -0,0 +1,929 @@ +make all --print-data-base --no-builtin-variables --no-builtin-rules --question +# GNU Make 3.81 +# Copyright (C) 2006 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. +# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# This program built for i386-apple-darwin11.3.0 + + +# Make data base, printed on Sat Jun 18 12:57:15 2022 + +# Variables + +# environment +VSCODE_GIT_ASKPASS_MAIN = /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js +# automatic +/dev/null || echo /Developer)/Makefiles +# environment +VSCODE_CLI = 1 +# makefile (from `Makefile', line 9) +GOGC = 30 +# environment +VSCODE_CODE_CACHE_PATH = /Users/pbroadhurst/Library/Application Support/Code/CachedData/4af164ea3a06f701fe3e89a2bcbb421d2026b68f +# environment +LOGNAME = pbroadhurst +# environment +APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1 +# environment +ZSH = /Users/pbroadhurst/.oh-my-zsh +# makefile (from `Makefile', line 27) +define makemock +mocks: mocks-$(strip $(1))-$(strip $(2)) +mocks-$(strip $(1))-$(strip $(2)): ${MOCKERY} + ${MOCKERY} --case underscore --dir $(1) --name $(2) --outpkg $(3) --output mocks/$(strip $(3)) +endef +# environment +VSCODE_HANDLES_UNCAUGHT_ERRORS = true +# automatic +^D = $(patsubst %/,%,$(dir $^)) +# environment +MAKELEVEL := 0 +# environment +XPC_FLAGS = 0x0 +# environment +COLORTERM = truecolor +# default +MAKE = $(MAKE_COMMAND) +# default +MAKECMDGOALS := all +# environment +SHLVL = 7 +# default +MAKE_VERSION := 3.81 +# environment +USER = pbroadhurst +# makefile +.DEFAULT_GOAL := all +# environment +GOROOT = /usr/local/go +# environment +LESS = -R +# automatic +%D = $(patsubst %/,%,$(dir $%)) +# default +MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make +# environment +VSCODE_GIT_ASKPASS_EXTRA_ARGS = --ms-enable-electron-run-as-node +# environment +TERM_PROGRAM = vscode +# default +.VARIABLES := +# environment +TMPDIR = /var/folders/tb/b88h058x6675g5g_dkgsy8jm0000gn/T/ +# automatic +*F = $(notdir $*) +# environment +VSCODE_IPC_HOOK = /Users/pbroadhurst/Library/Application Support/Code/1.68.0-main.sock +# environment +VSCODE_GIT_ASKPASS_NODE = /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper +# makefile +MAKEFLAGS = Rrqp +# environment +MFLAGS = -Rrqp +# automatic +*D = $(patsubst %/,%,$(dir $*)) +# environment +TERM_PROGRAM_VERSION = 1.68.0 +# environment +XPC_SERVICE_NAME = application.com.microsoft.VSCode.22333126.22333132.DAD532DE-6EF7-4906-A893-EBB00CF3A824 +# environment +HOMEBREW_PREFIX = /opt/homebrew +# automatic ++D = $(patsubst %/,%,$(dir $+)) +# automatic ++F = $(notdir $+) +# environment +HOMEBREW_REPOSITORY = /opt/homebrew +# environment +__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0 +# environment +COMMAND_MODE = unix2003 +# environment +GIT_ASKPASS = /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh +# default +MAKEFILES := +# automatic + Date: Sat, 18 Jun 2022 13:35:31 -0400 Subject: [PATCH 2/3] Remove logs Signed-off-by: Peter Broadhurst --- .vscode/configurationCache.log | 1 - .vscode/dryrun.log | 11 - .vscode/targets.log | 929 --------------------------------- 3 files changed, 941 deletions(-) delete mode 100644 .vscode/configurationCache.log delete mode 100644 .vscode/dryrun.log delete mode 100644 .vscode/targets.log diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log deleted file mode 100644 index 62f24f7..0000000 --- a/.vscode/configurationCache.log +++ /dev/null @@ -1 +0,0 @@ -{"buildTargets":["/Users/pbroadhurst/go/bin/golangci-lint","/Users/pbroadhurst/go/bin/mockery","all","build","clean","coverage","coverage.html","deps","firefly-common","go-mod-tidy","lint","mocks","mocks-pkg/httpserver-GoHTTPServer","test"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log deleted file mode 100644 index 9b0279d..0000000 --- a/.vscode/dryrun.log +++ /dev/null @@ -1,11 +0,0 @@ -make --dry-run --always-make --keep-going --print-directory -make: Entering directory `/Users/pbroadhurst/dev/firefly/firefly-common' -go build ./pkg/* - -go get ./pkg/* -go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest -GOGC=20 /Users/pbroadhurst/go/bin/golangci-lint run -v --timeout 5m -go test ./pkg/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s -go mod tidy -make: Leaving directory `/Users/pbroadhurst/dev/firefly/firefly-common' - diff --git a/.vscode/targets.log b/.vscode/targets.log deleted file mode 100644 index 5cee33b..0000000 --- a/.vscode/targets.log +++ /dev/null @@ -1,929 +0,0 @@ -make all --print-data-base --no-builtin-variables --no-builtin-rules --question -# GNU Make 3.81 -# Copyright (C) 2006 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. -# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# This program built for i386-apple-darwin11.3.0 - - -# Make data base, printed on Sat Jun 18 12:57:15 2022 - -# Variables - -# environment -VSCODE_GIT_ASKPASS_MAIN = /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js -# automatic -/dev/null || echo /Developer)/Makefiles -# environment -VSCODE_CLI = 1 -# makefile (from `Makefile', line 9) -GOGC = 30 -# environment -VSCODE_CODE_CACHE_PATH = /Users/pbroadhurst/Library/Application Support/Code/CachedData/4af164ea3a06f701fe3e89a2bcbb421d2026b68f -# environment -LOGNAME = pbroadhurst -# environment -APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1 -# environment -ZSH = /Users/pbroadhurst/.oh-my-zsh -# makefile (from `Makefile', line 27) -define makemock -mocks: mocks-$(strip $(1))-$(strip $(2)) -mocks-$(strip $(1))-$(strip $(2)): ${MOCKERY} - ${MOCKERY} --case underscore --dir $(1) --name $(2) --outpkg $(3) --output mocks/$(strip $(3)) -endef -# environment -VSCODE_HANDLES_UNCAUGHT_ERRORS = true -# automatic -^D = $(patsubst %/,%,$(dir $^)) -# environment -MAKELEVEL := 0 -# environment -XPC_FLAGS = 0x0 -# environment -COLORTERM = truecolor -# default -MAKE = $(MAKE_COMMAND) -# default -MAKECMDGOALS := all -# environment -SHLVL = 7 -# default -MAKE_VERSION := 3.81 -# environment -USER = pbroadhurst -# makefile -.DEFAULT_GOAL := all -# environment -GOROOT = /usr/local/go -# environment -LESS = -R -# automatic -%D = $(patsubst %/,%,$(dir $%)) -# default -MAKE_COMMAND := /Library/Developer/CommandLineTools/usr/bin/make -# environment -VSCODE_GIT_ASKPASS_EXTRA_ARGS = --ms-enable-electron-run-as-node -# environment -TERM_PROGRAM = vscode -# default -.VARIABLES := -# environment -TMPDIR = /var/folders/tb/b88h058x6675g5g_dkgsy8jm0000gn/T/ -# automatic -*F = $(notdir $*) -# environment -VSCODE_IPC_HOOK = /Users/pbroadhurst/Library/Application Support/Code/1.68.0-main.sock -# environment -VSCODE_GIT_ASKPASS_NODE = /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper -# makefile -MAKEFLAGS = Rrqp -# environment -MFLAGS = -Rrqp -# automatic -*D = $(patsubst %/,%,$(dir $*)) -# environment -TERM_PROGRAM_VERSION = 1.68.0 -# environment -XPC_SERVICE_NAME = application.com.microsoft.VSCode.22333126.22333132.DAD532DE-6EF7-4906-A893-EBB00CF3A824 -# environment -HOMEBREW_PREFIX = /opt/homebrew -# automatic -+D = $(patsubst %/,%,$(dir $+)) -# automatic -+F = $(notdir $+) -# environment -HOMEBREW_REPOSITORY = /opt/homebrew -# environment -__CF_USER_TEXT_ENCODING = 0x1F5:0x0:0x0 -# environment -COMMAND_MODE = unix2003 -# environment -GIT_ASKPASS = /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh -# default -MAKEFILES := -# automatic - Date: Sat, 18 Jun 2022 13:35:58 -0400 Subject: [PATCH 3/3] Prevent vscode logs being checked in Signed-off-by: Peter Broadhurst --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 648575c..4a97ceb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ coverage.txt **/debug.test .DS_Store __debug* +.vscode/*.log \ No newline at end of file