diff --git a/.gitignore b/.gitignore index a09fabe9..4c4e9607 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,8 @@ Thumbs.db ._* webidentity.json +################################# +# Development files # +################################# +internal/workspace/**/**/*.yaml +!internal/workspace/**/**/*.config.yaml \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a556d113..7838accf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,18 @@ git fetch git pull --ff-only ``` +## Updating the API clients + +In order to update the clients you need access to some private Snyk repositories. Generate a [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) that is able to read private Snyk repositories and set it in your terminal: + +```shell +export GITHUB_PAT= +``` + +Then run `make download-apis` to download the latest code. If you want to download a new version, you can also do that. + +Then generate the client by running `make generate`. + ## Running tests To run the tests run: diff --git a/Makefile b/Makefile index 6f0e02a2..d4d9124d 100644 --- a/Makefile +++ b/Makefile @@ -57,9 +57,16 @@ testv: @go test -v ./... .PHONY: generate -generate: $(TOOLS_BIN)/go/mockgen +generate: $(TOOLS_BIN)/go/mockgen $(TOOLS_BIN)/go/oapi-codegen @go generate ./... +.PHONY: download-apis +download-apis: download-workspace-api + +.PHONY: download-workspace-api +download-workspace-api: + ./scripts/download-workspace-api.sh + .PHONY: help help: @echo "Main targets:" diff --git a/go.mod b/go.mod index 8e31ad55..127f10cf 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/snyk/code-client-go go 1.21 require ( + github.com/deepmap/oapi-codegen v1.13.4 github.com/go-git/go-git/v5 v5.11.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 @@ -10,7 +11,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/puzpuzpuz/xsync v1.5.2 github.com/rs/zerolog v1.32.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 golang.org/x/net v0.22.0 ) @@ -18,29 +19,64 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/bytedance/sonic v1.10.0-rc3 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect + github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/getkin/kin-openapi v0.118.0 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/gin-gonic/gin v1.9.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.1 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/logutils v1.0.0 // indirect + github.com/invopop/yaml v0.2.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/labstack/echo/v4 v4.11.4 // indirect + github.com/labstack/gommon v0.4.2 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/pelletier/go-toml/v2 v2.0.9 // indirect + github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fasttemplate v1.2.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/arch v0.4.0 // indirect golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.19.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3167926d..bbf76df9 100644 --- a/go.sum +++ b/go.sum @@ -21,10 +21,13 @@ github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= +github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -34,9 +37,20 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= +github.com/bytedance/sonic v1.10.0-rc3 h1:uNSnscRapXTwUgTyOF0GVljYD08p9X/Lbr9MweSV3V0= +github.com/bytedance/sonic v1.10.0-rc3/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= +github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= +github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= +github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= @@ -53,6 +67,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deepmap/oapi-codegen v1.13.4 h1:lRRQ8JAXaz5/4oidKFyk3fFZFQsbv0BzRtvDKDnvIfM= +github.com/deepmap/oapi-codegen v1.13.4/go.mod h1:/h5nFQbTAMz4S/WtBz8sBfamlGByYKDr21O2uoNgCYI= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= @@ -63,10 +79,17 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= +github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -81,15 +104,33 @@ github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= +github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -114,6 +155,9 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219 h1:utua3L2IbQJmauC5IXdEA547bcoU5dozgQAfc8Onsg4= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -121,6 +165,7 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -134,6 +179,7 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.2.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= @@ -167,14 +213,22 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hasura/go-graphql-client v0.6.3/go.mod h1:kvaJsDhxGbkIJ1jgebkrnt9EDIELZHpsAMint56v+2I= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= +github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= @@ -182,6 +236,10 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -191,8 +249,18 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/labstack/echo/v4 v4.11.4 h1:vDZmA+qNeh1pd/cCkEicDMrjtrnMGQ1QFI9gWN1zGq8= +github.com/labstack/echo/v4 v4.11.4/go.mod h1:noh7EvLwqDsmh/X/HWKPUl1AjzJrhyptRyEbQJfxen8= +github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0= +github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -213,9 +281,14 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= @@ -225,6 +298,11 @@ github.com/pact-foundation/pact-go v1.7.0 h1:5iyVyg+avkWz9Jn7cefRmlPbXu+KMZvWblI github.com/pact-foundation/pact-go v1.7.0/go.mod h1:NcAbRqIE0cjRF+JKl2vcLlzjvrgcZrnq4SwQu2o4PeA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/perimeterx/marshmallow v1.1.4/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= +github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -275,20 +353,39 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= +github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -300,6 +397,9 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= +golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -487,6 +587,9 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -503,8 +606,10 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -513,4 +618,6 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/internal/workspace/2024-03-12/client.go b/internal/workspace/2024-03-12/client.go new file mode 100644 index 00000000..0d13676a --- /dev/null +++ b/internal/workspace/2024-03-12/client.go @@ -0,0 +1,395 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/common" + externalRef2 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters" + externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" +) + +const ( + BearerAuthScopes = "bearerAuth.Scopes" +) + +// Defines values for CreateWorkspaceParamsContentType. +const ( + ApplicationvndApiJson CreateWorkspaceParamsContentType = "application/vnd.api+json" +) + +// CreateWorkspaceParams defines parameters for CreateWorkspace. +type CreateWorkspaceParams struct { + // Version The requested version of the endpoint to process the request + Version externalRef0.Version `form:"version" json:"version"` + + // SnykRequestId Request ID + SnykRequestId externalRef2.RequestId `json:"snyk-request-id"` + + // UserAgent The client that sent the request, as per RFC 7231. + UserAgent externalRef2.UserAgent `json:"user-agent"` + + // ContentType Content type header + ContentType CreateWorkspaceParamsContentType `json:"content-type"` +} + +// CreateWorkspaceParamsContentType defines parameters for CreateWorkspace. +type CreateWorkspaceParamsContentType string + +// CreateWorkspaceApplicationVndAPIPlusJSONRequestBody defines body for CreateWorkspace for application/vnd.api+json ContentType. +type CreateWorkspaceApplicationVndAPIPlusJSONRequestBody = externalRef3.WorkspacePostRequest + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // CreateWorkspaceWithBody request with any body + CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) CreateWorkspaceWithBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateWorkspaceRequestWithBody(c.Server, orgId, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(c.Server, orgId, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateWorkspace builder with application/vnd.api+json body +func NewCreateWorkspaceRequestWithApplicationVndAPIPlusJSONBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateWorkspaceRequestWithBody(server, orgId, params, "application/vnd.api+json", bodyReader) +} + +// NewCreateWorkspaceRequestWithBody generates requests for CreateWorkspace with any type of body +func NewCreateWorkspaceRequestWithBody(server string, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "org_id", runtime.ParamLocationPath, orgId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/orgs/%s/workspaces", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "version", runtime.ParamLocationQuery, params.Version); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + if params != nil { + + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "snyk-request-id", runtime.ParamLocationHeader, params.SnykRequestId) + if err != nil { + return nil, err + } + + req.Header.Set("snyk-request-id", headerParam0) + + var headerParam1 string + + headerParam1, err = runtime.StyleParamWithLocation("simple", false, "user-agent", runtime.ParamLocationHeader, params.UserAgent) + if err != nil { + return nil, err + } + + req.Header.Set("user-agent", headerParam1) + + var headerParam2 string + + headerParam2, err = runtime.StyleParamWithLocation("simple", false, "content-type", runtime.ParamLocationHeader, params.ContentType) + if err != nil { + return nil, err + } + + req.Header.Set("content-type", headerParam2) + + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} + +// ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // CreateWorkspaceWithBodyWithResponse request with any body + CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) + + CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) +} + +type CreateWorkspaceResponse struct { + Body []byte + HTTPResponse *http.Response + ApplicationvndApiJSON201 *externalRef3.WorkspacePostResponse + ApplicationvndApiJSON400 *externalRef0.N400 + ApplicationvndApiJSON401 *externalRef0.N401 + ApplicationvndApiJSON403 *externalRef0.N403 + ApplicationvndApiJSON500 *externalRef0.N500 +} + +// Status returns HTTPResponse.Status +func (r CreateWorkspaceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateWorkspaceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// CreateWorkspaceWithBodyWithResponse request with arbitrary body returning *CreateWorkspaceResponse +func (c *ClientWithResponses) CreateWorkspaceWithBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { + rsp, err := c.CreateWorkspaceWithBody(ctx, orgId, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateWorkspaceResponse(rsp) +} + +func (c *ClientWithResponses) CreateWorkspaceWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId externalRef2.OrgId, params *CreateWorkspaceParams, body CreateWorkspaceApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateWorkspaceResponse, error) { + rsp, err := c.CreateWorkspaceWithApplicationVndAPIPlusJSONBody(ctx, orgId, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateWorkspaceResponse(rsp) +} + +// ParseCreateWorkspaceResponse parses an HTTP response from a CreateWorkspaceWithResponse call +func ParseCreateWorkspaceResponse(rsp *http.Response) (*CreateWorkspaceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &CreateWorkspaceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest externalRef3.WorkspacePostResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest externalRef0.N400 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest externalRef0.N401 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest externalRef0.N403 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest externalRef0.N500 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.ApplicationvndApiJSON500 = &dest + + } + + return response, nil +} diff --git a/internal/workspace/2024-03-12/client_test.go b/internal/workspace/2024-03-12/client_test.go new file mode 100644 index 00000000..8f5b18b7 --- /dev/null +++ b/internal/workspace/2024-03-12/client_test.go @@ -0,0 +1,117 @@ +package v20240312_test + +import ( + "context" + "errors" + "net/http" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + workspaceClient "github.com/snyk/code-client-go/internal/workspace/2024-03-12" + externalRef3 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces" +) + +// HTTPRequestDoerMock mocks the interface HttpRequestDoerMock. +type HTTPRequestDoerMock struct { + mock.Mock +} + +func (m *HTTPRequestDoerMock) Do(req *http.Request) (*http.Response, error) { + args := m.Called(req) + if args.Get(0) == nil { + return nil, args.Error(1) + } + return args.Get(0).(*http.Response), args.Error(1) +} + +func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Success(t *testing.T) { + doer := &HTTPRequestDoerMock{} + doer.On("Do", mock.Anything).Return(nil, nil).Run(func(args mock.Arguments) { + req, ok := args.Get(0).(*http.Request) + assert.True(t, ok) + assert.Equal(t, "/https//api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-03-12~experimental", req.URL.String()) + }) + client, err := workspaceClient.NewClientWithResponses("https//api.snyk.io/rest", workspaceClient.WithHTTPClient(doer)) + require.NoError(t, err) + + orgUUID := uuid.MustParse("e7ea34c9-de0f-422c-bf2c-4654c2e2da90") + requestId := uuid.New() + _, err = client.CreateWorkspaceWithApplicationVndAPIPlusJSONBody(context.Background(), orgUUID, &workspaceClient.CreateWorkspaceParams{ + Version: "2024-03-12~experimental", + SnykRequestId: requestId, + }, workspaceClient.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ + Data: struct { + Attributes struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + } `json:"attributes"` + Type externalRef3.WorkspacePostRequestDataType `json:"type"` + }(struct { + Attributes struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + } + Type externalRef3.WorkspacePostRequestDataType + }{Attributes: struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + }(struct { + BundleId string + RepositoryUri string + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType + }{BundleId: "bundleId", RepositoryUri: "repositoryUri", WorkspaceType: "workspaceUri"}), Type: "workspace"}), + }) + require.NoError(t, err) + doer.AssertExpectations(t) +} + +func TestWorkspace_CreateWorkspaceWithApplicationVndAPIPlusJSONBody_Failure(t *testing.T) { + doer := &HTTPRequestDoerMock{} + doer.On("Do", mock.Anything).Return(nil, errors.New("something went wrong")).Run(func(args mock.Arguments) { + req, ok := args.Get(0).(*http.Request) + assert.True(t, ok) + assert.Equal(t, "/https//api.snyk.io/rest/orgs/e7ea34c9-de0f-422c-bf2c-4654c2e2da90/workspaces?version=2024-03-12~experimental", req.URL.String()) + }) + client, err := workspaceClient.NewClientWithResponses("https//api.snyk.io/rest", workspaceClient.WithHTTPClient(doer)) + require.NoError(t, err) + + orgUUID := uuid.MustParse("e7ea34c9-de0f-422c-bf2c-4654c2e2da90") + requestId := uuid.New() + _, err = client.CreateWorkspaceWithApplicationVndAPIPlusJSONBody(context.Background(), orgUUID, &workspaceClient.CreateWorkspaceParams{ + Version: "2024-03-12~experimental", + SnykRequestId: requestId, + }, workspaceClient.CreateWorkspaceApplicationVndAPIPlusJSONRequestBody{ + Data: struct { + Attributes struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + } `json:"attributes"` + Type externalRef3.WorkspacePostRequestDataType `json:"type"` + }(struct { + Attributes struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + } + Type externalRef3.WorkspacePostRequestDataType + }{Attributes: struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + }(struct { + BundleId string + RepositoryUri string + WorkspaceType externalRef3.WorkspacePostRequestDataAttributesWorkspaceType + }{BundleId: "bundleId", RepositoryUri: "repositoryUri", WorkspaceType: "workspaceUri"}), Type: "workspace"}), + }) + require.Error(t, err) + doer.AssertExpectations(t) +} diff --git a/internal/workspace/2024-03-12/common/common.config.yaml b/internal/workspace/2024-03-12/common/common.config.yaml new file mode 100644 index 00000000..4b9e6712 --- /dev/null +++ b/internal/workspace/2024-03-12/common/common.config.yaml @@ -0,0 +1,6 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +output: common/common.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/common/common.go b/internal/workspace/2024-03-12/common/common.go new file mode 100644 index 00000000..7c7aa2aa --- /dev/null +++ b/internal/workspace/2024-03-12/common/common.go @@ -0,0 +1,227 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +import ( + "encoding/json" + + "github.com/deepmap/oapi-codegen/pkg/runtime" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// ActualVersion Resolved API version +type ActualVersion = string + +// Error defines model for Error. +type Error struct { + // Code An application-specific error code, expressed as a string value. + Code *string `json:"code,omitempty"` + + // Detail A human-readable explanation specific to this occurrence of the problem. + Detail string `json:"detail"` + + // Id A unique identifier for this particular occurrence of the problem. + Id *openapi_types.UUID `json:"id,omitempty"` + + // Links A link that leads to further details about this particular occurrance of the problem. + Links *ErrorLink `json:"links,omitempty"` + Meta *map[string]interface{} `json:"meta,omitempty"` + Source *struct { + // Parameter A string indicating which URI query parameter caused the error. + Parameter *string `json:"parameter,omitempty"` + + // Pointer A JSON Pointer [RFC6901] to the associated entity in the request document. + Pointer *string `json:"pointer,omitempty"` + } `json:"source,omitempty"` + + // Status The HTTP status code applicable to this problem, expressed as a string value. + Status string `json:"status"` + + // Title A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. + Title *string `json:"title,omitempty"` +} + +// ErrorDocument defines model for ErrorDocument. +type ErrorDocument struct { + Errors []Error `json:"errors"` + Jsonapi JsonApi `json:"jsonapi"` +} + +// ErrorLink A link that leads to further details about this particular occurrance of the problem. +type ErrorLink struct { + About *LinkProperty `json:"about,omitempty"` +} + +// JsonApi defines model for JsonApi. +type JsonApi struct { + // Version Version of the JSON API specification this server supports. + Version string `json:"version"` +} + +// LinkProperty defines model for LinkProperty. +type LinkProperty struct { + union json.RawMessage +} + +// LinkProperty0 A string containing the link’s URL. +type LinkProperty0 = string + +// LinkProperty1 defines model for . +type LinkProperty1 struct { + // Href A string containing the link’s URL. + Href string `json:"href"` + + // Meta Free-form object that may contain non-standard information. + Meta *Meta `json:"meta,omitempty"` +} + +// Links defines model for Links. +type Links struct { + First *LinkProperty `json:"first,omitempty"` + Last *LinkProperty `json:"last,omitempty"` + Next *LinkProperty `json:"next,omitempty"` + Prev *LinkProperty `json:"prev,omitempty"` + Related *LinkProperty `json:"related,omitempty"` + Self *LinkProperty `json:"self,omitempty"` +} + +// Meta Free-form object that may contain non-standard information. +type Meta map[string]interface{} + +// PaginatedLinks defines model for PaginatedLinks. +type PaginatedLinks struct { + First *LinkProperty `json:"first,omitempty"` + Last *LinkProperty `json:"last,omitempty"` + Next *LinkProperty `json:"next,omitempty"` + Prev *LinkProperty `json:"prev,omitempty"` + Self *LinkProperty `json:"self,omitempty"` +} + +// QueryVersion Requested API version +type QueryVersion = string + +// RelatedLink defines model for RelatedLink. +type RelatedLink struct { + Related *LinkProperty `json:"related,omitempty"` +} + +// Relationship defines model for Relationship. +type Relationship struct { + Data struct { + Id openapi_types.UUID `json:"id"` + + // Type Type of the related resource + Type string `json:"type"` + } `json:"data"` + Links RelatedLink `json:"links"` + + // Meta Free-form object that may contain non-standard information. + Meta *Meta `json:"meta,omitempty"` +} + +// SelfLink defines model for SelfLink. +type SelfLink struct { + Self *LinkProperty `json:"self,omitempty"` +} + +// Tag defines model for Tag. +type Tag struct { + Key string `json:"key"` + Value string `json:"value"` +} + +// Types defines model for Types. +type Types = string + +// EndingBefore defines model for EndingBefore. +type EndingBefore = string + +// Limit defines model for Limit. +type Limit = int32 + +// StartingAfter defines model for StartingAfter. +type StartingAfter = string + +// Version Requested API version +type Version = QueryVersion + +// N400 defines model for 400. +type N400 = ErrorDocument + +// N401 defines model for 401. +type N401 = ErrorDocument + +// N403 defines model for 403. +type N403 = ErrorDocument + +// N404 defines model for 404. +type N404 = ErrorDocument + +// N409 defines model for 409. +type N409 = ErrorDocument + +// N500 defines model for 500. +type N500 = ErrorDocument + +// AsLinkProperty0 returns the union data inside the LinkProperty as a LinkProperty0 +func (t LinkProperty) AsLinkProperty0() (LinkProperty0, error) { + var body LinkProperty0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLinkProperty0 overwrites any union data inside the LinkProperty as the provided LinkProperty0 +func (t *LinkProperty) FromLinkProperty0(v LinkProperty0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLinkProperty0 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty0 +func (t *LinkProperty) MergeLinkProperty0(v LinkProperty0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +// AsLinkProperty1 returns the union data inside the LinkProperty as a LinkProperty1 +func (t LinkProperty) AsLinkProperty1() (LinkProperty1, error) { + var body LinkProperty1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLinkProperty1 overwrites any union data inside the LinkProperty as the provided LinkProperty1 +func (t *LinkProperty) FromLinkProperty1(v LinkProperty1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLinkProperty1 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty1 +func (t *LinkProperty) MergeLinkProperty1(v LinkProperty1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JsonMerge(t.union, b) + t.union = merged + return err +} + +func (t LinkProperty) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *LinkProperty) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} diff --git a/internal/workspace/2024-03-12/gen.go b/internal/workspace/2024-03-12/gen.go new file mode 100644 index 00000000..c381e798 --- /dev/null +++ b/internal/workspace/2024-03-12/gen.go @@ -0,0 +1,9 @@ +package v20240312 + +//go:generate oapi-codegen --config common/common.config.yaml common/common.yaml +//go:generate oapi-codegen --config parameters/orgs.config.yaml parameters/orgs.yaml +//go:generate oapi-codegen --config parameters/request-id.config.yaml parameters/request-id.yaml +//go:generate oapi-codegen --config parameters/user-agent.config.yaml parameters/user-agent.yaml +//go:generate oapi-codegen --config workspaces/workspaces.config.yaml workspaces/workspaces.yaml +//go:generate oapi-codegen --config links/links.config.yaml links/links.yaml +//go:generate oapi-codegen --config spec.config.yaml spec.yaml diff --git a/internal/workspace/2024-03-12/links/links.config.yaml b/internal/workspace/2024-03-12/links/links.config.yaml new file mode 100644 index 00000000..fd8763a1 --- /dev/null +++ b/internal/workspace/2024-03-12/links/links.config.yaml @@ -0,0 +1,6 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +output: links/links.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/links/links.go b/internal/workspace/2024-03-12/links/links.go new file mode 100644 index 00000000..2cd53a23 --- /dev/null +++ b/internal/workspace/2024-03-12/links/links.go @@ -0,0 +1,15 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +// Link defines model for Link. +type Link struct { + // Href A string containing the link’s URL. + Href string `json:"href"` +} + +// LinkSelf defines model for LinkSelf. +type LinkSelf struct { + Self Link `json:"self"` +} diff --git a/internal/workspace/2024-03-12/parameters/orgs.config.yaml b/internal/workspace/2024-03-12/parameters/orgs.config.yaml new file mode 100644 index 00000000..1f7a116e --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/orgs.config.yaml @@ -0,0 +1,6 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +output: parameters/orgs.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/parameters/orgs.go b/internal/workspace/2024-03-12/parameters/orgs.go new file mode 100644 index 00000000..c190fde1 --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/orgs.go @@ -0,0 +1,11 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +import ( + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// OrgId defines model for OrgId. +type OrgId = openapi_types.UUID diff --git a/internal/workspace/2024-03-12/parameters/request-id.config.yaml b/internal/workspace/2024-03-12/parameters/request-id.config.yaml new file mode 100644 index 00000000..777921a5 --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/request-id.config.yaml @@ -0,0 +1,6 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +output: parameters/request-id.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/parameters/request-id.go b/internal/workspace/2024-03-12/parameters/request-id.go new file mode 100644 index 00000000..3c3de86e --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/request-id.go @@ -0,0 +1,11 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +import ( + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" +) + +// RequestId defines model for RequestId. +type RequestId = openapi_types.UUID diff --git a/internal/workspace/2024-03-12/parameters/user-agent.config.yaml b/internal/workspace/2024-03-12/parameters/user-agent.config.yaml new file mode 100644 index 00000000..b0f1d017 --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/user-agent.config.yaml @@ -0,0 +1,6 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +output: parameters/user-agent.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/parameters/user-agent.go b/internal/workspace/2024-03-12/parameters/user-agent.go new file mode 100644 index 00000000..d7887709 --- /dev/null +++ b/internal/workspace/2024-03-12/parameters/user-agent.go @@ -0,0 +1,7 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +// UserAgent defines model for UserAgent. +type UserAgent = string diff --git a/internal/workspace/2024-03-12/spec.config.yaml b/internal/workspace/2024-03-12/spec.config.yaml new file mode 100644 index 00000000..1eaea288 --- /dev/null +++ b/internal/workspace/2024-03-12/spec.config.yaml @@ -0,0 +1,15 @@ +package: v20240312 +generate: + client: true + models: true +output-options: + skip-prune: true +import-mapping: + ./common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/common + ./links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/links + ./workspaces/workspaces.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/workspaces + ./parameters/orgs.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters + ./parameters/request-id.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters + ./parameters/user-agent.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters + ./parameters/content-type.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/parameters +output: client.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/workspaces/workspaces.config.yaml b/internal/workspace/2024-03-12/workspaces/workspaces.config.yaml new file mode 100644 index 00000000..281efe63 --- /dev/null +++ b/internal/workspace/2024-03-12/workspaces/workspaces.config.yaml @@ -0,0 +1,9 @@ +package: v20240312 +generate: + models: true +output-options: + skip-prune: true +import-mapping: + ../common/common.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/common + ../links/links.yaml: github.com/snyk/code-client-go/internal/workspace/2024-03-12/links +output: workspaces/workspaces.go \ No newline at end of file diff --git a/internal/workspace/2024-03-12/workspaces/workspaces.go b/internal/workspace/2024-03-12/workspaces/workspaces.go new file mode 100644 index 00000000..6461932d --- /dev/null +++ b/internal/workspace/2024-03-12/workspaces/workspaces.go @@ -0,0 +1,56 @@ +// Package v20240312 provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT. +package v20240312 + +import ( + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + externalRef0 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/common" + externalRef1 "github.com/snyk/code-client-go/internal/workspace/2024-03-12/links" +) + +// Defines values for WorkspacePostRequestDataAttributesWorkspaceType. +const ( + FileBundleWorkspace WorkspacePostRequestDataAttributesWorkspaceType = "file_bundle_workspace" +) + +// Defines values for WorkspacePostRequestDataType. +const ( + WorkspacePostRequestDataTypeWorkspace WorkspacePostRequestDataType = "workspace" +) + +// Defines values for WorkspacePostResponseDataType. +const ( + WorkspacePostResponseDataTypeWorkspace WorkspacePostResponseDataType = "workspace" +) + +// WorkspacePostRequest defines model for WorkspacePostRequest. +type WorkspacePostRequest struct { + Data struct { + Attributes struct { + BundleId string `json:"bundle_id"` + RepositoryUri string `json:"repository_uri"` + WorkspaceType WorkspacePostRequestDataAttributesWorkspaceType `json:"workspace_type"` + } `json:"attributes"` + Type WorkspacePostRequestDataType `json:"type"` + } `json:"data"` +} + +// WorkspacePostRequestDataAttributesWorkspaceType defines model for WorkspacePostRequest.Data.Attributes.WorkspaceType. +type WorkspacePostRequestDataAttributesWorkspaceType string + +// WorkspacePostRequestDataType defines model for WorkspacePostRequest.Data.Type. +type WorkspacePostRequestDataType string + +// WorkspacePostResponse defines model for WorkspacePostResponse. +type WorkspacePostResponse struct { + Data struct { + Id openapi_types.UUID `json:"id"` + Type WorkspacePostResponseDataType `json:"type"` + } `json:"data"` + Jsonapi *externalRef0.JsonApi `json:"jsonapi,omitempty"` + Links *externalRef1.LinkSelf `json:"links,omitempty"` +} + +// WorkspacePostResponseDataType defines model for WorkspacePostResponse.Data.Type. +type WorkspacePostResponseDataType string diff --git a/scripts/download-workspace-api.sh b/scripts/download-workspace-api.sh new file mode 100755 index 00000000..bb3af04f --- /dev/null +++ b/scripts/download-workspace-api.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +if [ -z "${GITHUB_PAT}" ]; then + echo "Could not run the script. The GITHUB_PAT environment variable must be set to a valid Personal Access Token." + exit 1 +fi + +WORKSPACE_API_VERSION="2024-03-12" +WORKSPACE_COMMIT_SHA="cfd737cd917ab2c63840bd112d9eb2c9a9c101f6" + +mkdir -p ./internal/workspace/${WORKSPACE_API_VERSION} + +# Download the Common spec +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/sweater-comb/common-model-v1/components/common.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/common/common.yaml +set +e +yq -i e '{"components": .}' ./internal/workspace/${WORKSPACE_API_VERSION}/common/common.yaml +sed -i '' "s@#/schemas/@#/components/schemas/@g" ./internal/workspace/${WORKSPACE_API_VERSION}/common/common.yaml +sed -i '' "s@#/headers/@#/components/headers/@g" ./internal/workspace/${WORKSPACE_API_VERSION}/common/common.yaml + +# Download the Links model spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/models/links.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/links/links.yaml +set +e +yq -i e '{"components": .}' ./internal/workspace/${WORKSPACE_API_VERSION}/links/links.yaml +sed -i '' "s@#/schemas@#/components/schemas@g" ./internal/workspace/${WORKSPACE_API_VERSION}/links/links.yaml + +# Download the Org parameter spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/parameters/orgs.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/orgs.yaml +set +e +yq -i e '{"components": {"parameters": .}}' ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/orgs.yaml + +# Download the Request ID parameter spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/parameters/request-id.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/request-id.yaml +set +e +yq -i e '{"components": {"parameters": .}}' ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/request-id.yaml + +# Download the User Agent parameter spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/parameters/user-agent.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/user-agent.yaml +set +e +yq -i e '{"components": {"parameters": .}}' ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/user-agent.yaml + +# Download the Content Type parameter spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/parameters/content-type.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/content-type.yaml +set +e +yq -i e '{"components": {"parameters": .}}' ./internal/workspace/${WORKSPACE_API_VERSION}/parameters/content-type.yaml + +# Download the Workspace model spec for the Workspace API +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/resources/workspaces/${WORKSPACE_API_VERSION}/models/workspaces.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/workspaces/workspaces.yaml +set +e +yq -i e '{"components": .}' ./internal/workspace/${WORKSPACE_API_VERSION}/workspaces/workspaces.yaml +sed -i '' "s@https://raw.githubusercontent.com/snyk/sweater-comb/common-model-v1/components/common.yaml#@../common/common.yaml#/components@g" ./internal/workspace/${WORKSPACE_API_VERSION}/workspaces/workspaces.yaml +sed -i '' "s@../../../../models/links.yaml#@../links/links.yaml#/components@g" ./internal/workspace/${WORKSPACE_API_VERSION}/workspaces/workspaces.yaml + +# Download the Workspace API spec +set -e +curl -s https://${GITHUB_PAT}@raw.githubusercontent.com/snyk/workspace-service/${WORKSPACE_COMMIT_SHA}/src/rest/api/hidden/resources/workspaces/${WORKSPACE_API_VERSION}/spec.yaml > ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +set +e +sed -i '' "s@./models/workspaces.yaml#/schemas@./workspaces/workspaces.yaml#/components/schemas@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +sed -i '' "s@#/components/x-snyk-common@./common/common.yaml#/components@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +sed -i '' "s@../../../parameters/orgs.yaml#@./parameters/orgs.yaml#/components/parameters@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +sed -i '' "s@../../../parameters/request-id.yaml#@./parameters/request-id.yaml#/components/parameters@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +sed -i '' "s@../../../parameters/user-agent.yaml#@./parameters/user-agent.yaml#/components/parameters@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml +sed -i '' "s@../../../parameters/content-type.yaml#@./parameters/content-type.yaml#/components/parameters@g" ./internal/workspace/${WORKSPACE_API_VERSION}/spec.yaml \ No newline at end of file diff --git a/tools.go b/tools.go index 0ebdfc8a..eab80ce5 100644 --- a/tools.go +++ b/tools.go @@ -3,5 +3,6 @@ package codeClient import ( + _ "github.com/deepmap/oapi-codegen/cmd/oapi-codegen" _ "github.com/golang/mock/mockgen" )