From 5e0374656a784cb0b20dd173079096b67a223acc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:52:12 +0000 Subject: [PATCH 1/3] build(deps): bump github.com/oapi-codegen/oapi-codegen/v2 in /dev-tools Bumps [github.com/oapi-codegen/oapi-codegen/v2](https://github.com/oapi-codegen/oapi-codegen) from 2.5.0 to 2.7.1. - [Release notes](https://github.com/oapi-codegen/oapi-codegen/releases) - [Commits](https://github.com/oapi-codegen/oapi-codegen/compare/v2.5.0...v2.7.1) --- updated-dependencies: - dependency-name: github.com/oapi-codegen/oapi-codegen/v2 dependency-version: 2.7.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- dev-tools/go.mod | 31 +++++++++--------- dev-tools/go.sum | 82 +++++++++++++++++++++++++++--------------------- 2 files changed, 63 insertions(+), 50 deletions(-) diff --git a/dev-tools/go.mod b/dev-tools/go.mod index c475b0fdae..79f7196a25 100644 --- a/dev-tools/go.mod +++ b/dev-tools/go.mod @@ -18,28 +18,31 @@ require ( github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/elastic/go-json-schema-generate v0.0.0-20220323152209-ec19b88f6b5e // indirect github.com/elastic/go-licenser v0.4.2 // indirect - github.com/getkin/kin-openapi v0.132.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/getkin/kin-openapi v0.135.0 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jstemmer/go-junit-report v1.0.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.1 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect + github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 // indirect + github.com/oasdiff/yaml v0.0.9 // indirect + github.com/oasdiff/yaml3 v0.0.9 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect github.com/sergi/go-diff v1.1.0 // indirect - github.com/speakeasy-api/jsonpath v0.6.0 // indirect - github.com/speakeasy-api/openapi-overlay v0.10.2 // indirect + github.com/speakeasy-api/jsonpath v0.6.3 // indirect + github.com/speakeasy-api/openapi v1.19.2 // indirect github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect + github.com/woodsbury/decimal128 v1.4.0 // indirect go.elastic.co/go-licence-detector v0.7.0 // indirect - golang.org/x/mod v0.24.0 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/mod v0.33.0 // indirect golang.org/x/perf v0.0.0-20250305200902-02a15fd477ba // indirect - golang.org/x/sync v0.14.0 // indirect - golang.org/x/text v0.23.0 // indirect - golang.org/x/tools v0.33.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 // indirect + golang.org/x/text v0.34.0 // indirect + golang.org/x/tools v0.42.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/dev-tools/go.sum b/dev-tools/go.sum index 8355f27cc1..439bdaa1ff 100644 --- a/dev-tools/go.sum +++ b/dev-tools/go.sum @@ -6,8 +6,9 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 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/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= @@ -18,12 +19,14 @@ github.com/elastic/go-licenser v0.4.2/go.mod h1:W8eH6FaZDR8fQGm+7FnVa7MxI1b/6dAq github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= -github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/getkin/kin-openapi v0.135.0 h1:751SjYfbiwqukYuVjwYEIKNfrSwS5YpA7DZnKSwQgtg= +github.com/getkin/kin-openapi v0.135.0/go.mod h1:6dd5FJl6RdX4usBtFBaQhk9q62Yb2J0Mk5IhUO/QqFI= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= @@ -59,19 +62,19 @@ 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/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.1 h1:LbtsOm5WAswyWbvTEOqhypdPeZzHavpZx96/n553mR8= +github.com/mailru/easyjson v0.9.1/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= 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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 h1:iJvF8SdB/3/+eGOXEpsWkD8FQAHj6mqkb6Fnsoc8MFU= -github.com/oapi-codegen/oapi-codegen/v2 v2.5.0/go.mod h1:fwlMxUEMuQK5ih9aymrxKPQqNm2n8bdLk1ppjH+lr9w= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.1 h1:a7Ab7YlpqkVG5HKrTaeFstm32Z5QOnyjnbsCO0jiMYM= +github.com/oapi-codegen/oapi-codegen/v2 v2.7.1/go.mod h1:qzFy6iuobJw/hD1aRILee4G87/ShmhR0xYCwcUtZMCw= +github.com/oasdiff/yaml v0.0.9 h1:zQOvd2UKoozsSsAknnWoDJlSK4lC0mpmjfDsfqNwX48= +github.com/oasdiff/yaml v0.0.9/go.mod h1:8lvhgJG4xiKPj3HN5lDow4jZHPlx1i7dIwzkdAo6oAM= +github.com/oasdiff/yaml3 v0.0.9 h1:rWPrKccrdUm8J0F3sGuU+fuh9+1K/RdJlWF7O/9yw2g= +github.com/oasdiff/yaml3 v0.0.9/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -86,36 +89,41 @@ github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/speakeasy-api/jsonpath v0.6.0 h1:IhtFOV9EbXplhyRqsVhHoBmmYjblIRh5D1/g8DHMXJ8= -github.com/speakeasy-api/jsonpath v0.6.0/go.mod h1:ymb2iSkyOycmzKwbEAYPJV/yi2rSmvBCLZJcyD+VVWw= -github.com/speakeasy-api/openapi-overlay v0.10.2 h1:VOdQ03eGKeiHnpb1boZCGm7x8Haj6gST0P3SGTX95GU= -github.com/speakeasy-api/openapi-overlay v0.10.2/go.mod h1:n0iOU7AqKpNFfEt6tq7qYITC4f0yzVVdFw0S7hukemg= +github.com/speakeasy-api/jsonpath v0.6.3 h1:c+QPwzAOdrWvzycuc9HFsIZcxKIaWcNpC+xhOW9rJxU= +github.com/speakeasy-api/jsonpath v0.6.3/go.mod h1:2cXloNuQ+RSXi5HTRaeBh7JEmjRXTiaKpFTdZiL7URI= +github.com/speakeasy-api/openapi v1.19.2 h1:md90tE71/M8jS3cuRlsuWP5Aed4xoG5PSRvXeZgCv/M= +github.com/speakeasy-api/openapi v1.19.2/go.mod h1:UfKa7FqE4jgexJZuj51MmdHAFGmDv0Zaw3+yOd81YKU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= 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/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= +github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQsBgUlc= +github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.elastic.co/go-licence-detector v0.7.0 h1:qC31sfyfNcNx/zMYcLABU0ac3MbGHZgksCAb5lMDUMg= go.elastic.co/go-licence-detector v0.7.0/go.mod h1:f5ty8pjynzQD8BcS+s0qtlOGKc35/HKQxCVi8SHhV5k= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= +golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -123,15 +131,15 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= -golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.50.0 h1:ucWh9eiCGyDR3vtzso0WMQinm2Dnt8cFMuQa9K33J60= +golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= golang.org/x/perf v0.0.0-20250305200902-02a15fd477ba h1:0iM7SkkyXtZKGBWfn+ka1Rj6VOCRyFMkEHaCWsaR7no= golang.org/x/perf v0.0.0-20250305200902-02a15fd477ba/go.mod h1:YEhzh+7vn0fUjydWEf27T4XWyeMDdRK44swFIgYh/nY= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= -golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -146,21 +154,23 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 h1:bTLqdHv7xrGlFbvf5/TXNxy/iUwwdkjhqQTJDjW7aj0= +golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4/go.mod h1:g5NllXBEermZrmR51cJDQxmJUHUOfRAaNyWBM+R+548= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= -golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= +golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 3149d453d754591b51cbdc03adc403e4817ccc77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 12:53:03 +0000 Subject: [PATCH 2/3] build(deps): bump github.com/getkin/kin-openapi in /dev-tools Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.132.0 to 0.144.0. - [Release notes](https://github.com/getkin/kin-openapi/releases) - [Commits](https://github.com/getkin/kin-openapi/compare/v0.132.0...v0.144.0) --- updated-dependencies: - dependency-name: github.com/getkin/kin-openapi dependency-version: 0.144.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- dev-tools/go.mod | 15 ++++++--------- dev-tools/go.sum | 43 +++++++++++++++++-------------------------- 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/dev-tools/go.mod b/dev-tools/go.mod index c475b0fdae..6271df4069 100644 --- a/dev-tools/go.mod +++ b/dev-tools/go.mod @@ -18,18 +18,15 @@ require ( github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/elastic/go-json-schema-generate v0.0.0-20220323152209-ec19b88f6b5e // indirect github.com/elastic/go-licenser v0.4.2 // indirect - github.com/getkin/kin-openapi v0.132.0 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/getkin/kin-openapi v0.144.0 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/jstemmer/go-junit-report v1.0.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect - github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect - github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect + github.com/oasdiff/yaml v0.1.1 // indirect + github.com/oasdiff/yaml3 v0.0.14 // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/sergi/go-diff v1.1.0 // indirect github.com/speakeasy-api/jsonpath v0.6.0 // indirect github.com/speakeasy-api/openapi-overlay v0.10.2 // indirect diff --git a/dev-tools/go.sum b/dev-tools/go.sum index 8355f27cc1..a2bfc28c3e 100644 --- a/dev-tools/go.sum +++ b/dev-tools/go.sum @@ -8,6 +8,8 @@ github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= +github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58= github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w= github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q= @@ -18,15 +20,15 @@ github.com/elastic/go-licenser v0.4.2/go.mod h1:W8eH6FaZDR8fQGm+7FnVa7MxI1b/6dAq github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/getkin/kin-openapi v0.132.0 h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk= -github.com/getkin/kin-openapi v0.132.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/getkin/kin-openapi v0.144.0 h1:hIRcTH+KjLfkLpYU6bSSfdFpi0fZi1fp+hSPi4aQu9Y= +github.com/getkin/kin-openapi v0.144.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -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/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -48,30 +50,23 @@ github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1 github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -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/jstemmer/go-junit-report v1.0.0 h1:8X1gzZpR+nVQLAht+L/foqOeX2l9DTZoaIPbEQHxsds= github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 h1:iJvF8SdB/3/+eGOXEpsWkD8FQAHj6mqkb6Fnsoc8MFU= github.com/oapi-codegen/oapi-codegen/v2 v2.5.0/go.mod h1:fwlMxUEMuQK5ih9aymrxKPQqNm2n8bdLk1ppjH+lr9w= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY= -github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= -github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= +github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY= +github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU= +github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw= +github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -84,12 +79,10 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= -github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -103,8 +96,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -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/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk= github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= From 762d81fced8e9bf95bca95231434ebd331a85412 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 30 Jul 2026 07:41:17 -0700 Subject: [PATCH 3/3] fix: regenerate API code with oapi-codegen v2.7.1 and restore copyright headers oapi-codegen v2.7.1 generates different output from v2.5.0. Add a user-template (model/templates/imports.tmpl) that prepends the Elastic copyright header to all generated files, since v2.7.1 no longer emits it automatically. Update go:generate directives for types.gen.go and client.gen.go to use the -templates flag, and oapi-cfg.yml to reference the same template via user-templates. Co-Authored-By: Claude Sonnet 4.6 --- internal/pkg/api/openapi.gen.go | 351 ++++++++++++++++++++++++++++---- main.go | 4 +- model/oapi-cfg.yml | 3 + model/templates/imports.tmpl | 47 +++++ pkg/api/client.gen.go | 211 +++++++++++++------ pkg/api/types.gen.go | 252 ++++++++++++++++++++++- 6 files changed, 760 insertions(+), 108 deletions(-) create mode 100644 model/templates/imports.tmpl diff --git a/internal/pkg/api/openapi.gen.go b/internal/pkg/api/openapi.gen.go index 12217ecd42..ded289af1f 100644 --- a/internal/pkg/api/openapi.gen.go +++ b/internal/pkg/api/openapi.gen.go @@ -4,12 +4,13 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package api import ( "context" "encoding/json" + "errors" "fmt" "net/http" "time" @@ -19,8 +20,8 @@ import ( ) const ( - AgentApiKeyScopes = "agentApiKey.Scopes" - ApiKeyScopes = "apiKey.Scopes" + AgentApiKeyScopes agentApiKeyContextKey = "agentApiKey.Scopes" + ApiKeyScopes apiKeyContextKey = "apiKey.Scopes" ) // Defines values for ActionType. @@ -37,12 +38,52 @@ const ( UPGRADE ActionType = "UPGRADE" ) +// Valid indicates whether the value is a known member of the ActionType enum. +func (e ActionType) Valid() bool { + switch e { + case CANCEL: + return true + case INPUTACTION: + return true + case MIGRATE: + return true + case POLICYCHANGE: + return true + case POLICYREASSIGN: + return true + case PRIVILEGELEVELCHANGE: + return true + case REQUESTDIAGNOSTICS: + return true + case SETTINGS: + return true + case UNENROLL: + return true + case UPGRADE: + return true + default: + return false + } +} + // Defines values for ActionRequestDiagnosticsAdditionalMetrics. const ( CONN ActionRequestDiagnosticsAdditionalMetrics = "CONN" CPU ActionRequestDiagnosticsAdditionalMetrics = "CPU" ) +// Valid indicates whether the value is a known member of the ActionRequestDiagnosticsAdditionalMetrics enum. +func (e ActionRequestDiagnosticsAdditionalMetrics) Valid() bool { + switch e { + case CONN: + return true + case CPU: + return true + default: + return false + } +} + // Defines values for ActionSettingsLogLevel. const ( ActionSettingsLogLevelDebug ActionSettingsLogLevel = "debug" @@ -52,6 +93,24 @@ const ( ActionSettingsLogLevelWarning ActionSettingsLogLevel = "warning" ) +// Valid indicates whether the value is a known member of the ActionSettingsLogLevel enum. +func (e ActionSettingsLogLevel) Valid() bool { + switch e { + case ActionSettingsLogLevelDebug: + return true + case ActionSettingsLogLevelError: + return true + case ActionSettingsLogLevelInfo: + return true + case ActionSettingsLogLevelTrace: + return true + case ActionSettingsLogLevelWarning: + return true + default: + return false + } +} + // Defines values for AuditUnenrollRequestReason. const ( KeyRevoked AuditUnenrollRequestReason = "key_revoked" @@ -60,6 +119,22 @@ const ( Uninstall AuditUnenrollRequestReason = "uninstall" ) +// Valid indicates whether the value is a known member of the AuditUnenrollRequestReason enum. +func (e AuditUnenrollRequestReason) Valid() bool { + switch e { + case KeyRevoked: + return true + case Migrated: + return true + case Orphaned: + return true + case Uninstall: + return true + default: + return false + } +} + // Defines values for CheckinRequestStatus. const ( CheckinRequestStatusDegraded CheckinRequestStatus = "degraded" @@ -69,11 +144,39 @@ const ( CheckinRequestStatusStarting CheckinRequestStatus = "starting" ) +// Valid indicates whether the value is a known member of the CheckinRequestStatus enum. +func (e CheckinRequestStatus) Valid() bool { + switch e { + case CheckinRequestStatusDegraded: + return true + case CheckinRequestStatusDisconnected: + return true + case CheckinRequestStatusError: + return true + case CheckinRequestStatusOnline: + return true + case CheckinRequestStatusStarting: + return true + default: + return false + } +} + // Defines values for EnrollRequestType. const ( PERMANENT EnrollRequestType = "PERMANENT" ) +// Valid indicates whether the value is a known member of the EnrollRequestType enum. +func (e EnrollRequestType) Valid() bool { + switch e { + case PERMANENT: + return true + default: + return false + } +} + // Defines values for EventSubtype. const ( EventSubtypeACKNOWLEDGED EventSubtype = "ACKNOWLEDGED" @@ -88,6 +191,34 @@ const ( EventSubtypeUNKNOWN EventSubtype = "UNKNOWN" ) +// Valid indicates whether the value is a known member of the EventSubtype enum. +func (e EventSubtype) Valid() bool { + switch e { + case EventSubtypeACKNOWLEDGED: + return true + case EventSubtypeCONFIG: + return true + case EventSubtypeDATADUMP: + return true + case EventSubtypeFAILED: + return true + case EventSubtypeINPROGRESS: + return true + case EventSubtypeRUNNING: + return true + case EventSubtypeSTARTING: + return true + case EventSubtypeSTOPPED: + return true + case EventSubtypeSTOPPING: + return true + case EventSubtypeUNKNOWN: + return true + default: + return false + } +} + // Defines values for EventType. const ( ACTION EventType = "ACTION" @@ -96,6 +227,22 @@ const ( STATE EventType = "STATE" ) +// Valid indicates whether the value is a known member of the EventType enum. +func (e EventType) Valid() bool { + switch e { + case ACTION: + return true + case ACTIONRESULT: + return true + case ERROR: + return true + case STATE: + return true + default: + return false + } +} + // Defines values for StatusResponseStatus. const ( StatusResponseStatusCONFIGURING StatusResponseStatus = "CONFIGURING" @@ -108,6 +255,30 @@ const ( StatusResponseStatusUNKNOWN StatusResponseStatus = "UNKNOWN" ) +// Valid indicates whether the value is a known member of the StatusResponseStatus enum. +func (e StatusResponseStatus) Valid() bool { + switch e { + case StatusResponseStatusCONFIGURING: + return true + case StatusResponseStatusDEGRADED: + return true + case StatusResponseStatusFAILED: + return true + case StatusResponseStatusHEALTHY: + return true + case StatusResponseStatusSTARTING: + return true + case StatusResponseStatusSTOPPED: + return true + case StatusResponseStatusSTOPPING: + return true + case StatusResponseStatusUNKNOWN: + return true + default: + return false + } +} + // Defines values for UpgradeDetailsState. const ( UpgradeDetailsStateUPGDOWNLOADING UpgradeDetailsState = "UPG_DOWNLOADING" @@ -121,6 +292,32 @@ const ( UpgradeDetailsStateUPGWATCHING UpgradeDetailsState = "UPG_WATCHING" ) +// Valid indicates whether the value is a known member of the UpgradeDetailsState enum. +func (e UpgradeDetailsState) Valid() bool { + switch e { + case UpgradeDetailsStateUPGDOWNLOADING: + return true + case UpgradeDetailsStateUPGEXTRACTING: + return true + case UpgradeDetailsStateUPGFAILED: + return true + case UpgradeDetailsStateUPGREPLACING: + return true + case UpgradeDetailsStateUPGREQUESTED: + return true + case UpgradeDetailsStateUPGRESTARTING: + return true + case UpgradeDetailsStateUPGROLLBACK: + return true + case UpgradeDetailsStateUPGSCHEDULED: + return true + case UpgradeDetailsStateUPGWATCHING: + return true + default: + return false + } +} + // Defines values for UpgradeMetadataFailedFailedState. const ( UpgradeMetadataFailedFailedStateUPGDOWNLOADING UpgradeMetadataFailedFailedState = "UPG_DOWNLOADING" @@ -132,17 +329,61 @@ const ( UpgradeMetadataFailedFailedStateUPGWATCHING UpgradeMetadataFailedFailedState = "UPG_WATCHING" ) +// Valid indicates whether the value is a known member of the UpgradeMetadataFailedFailedState enum. +func (e UpgradeMetadataFailedFailedState) Valid() bool { + switch e { + case UpgradeMetadataFailedFailedStateUPGDOWNLOADING: + return true + case UpgradeMetadataFailedFailedStateUPGEXTRACTING: + return true + case UpgradeMetadataFailedFailedStateUPGREPLACING: + return true + case UpgradeMetadataFailedFailedStateUPGREQUESTED: + return true + case UpgradeMetadataFailedFailedStateUPGRESTARTING: + return true + case UpgradeMetadataFailedFailedStateUPGSCHEDULED: + return true + case UpgradeMetadataFailedFailedStateUPGWATCHING: + return true + default: + return false + } +} + // Defines values for UploadBeginRequestSrc. const ( Agent UploadBeginRequestSrc = "agent" Endpoint UploadBeginRequestSrc = "endpoint" ) +// Valid indicates whether the value is a known member of the UploadBeginRequestSrc enum. +func (e UploadBeginRequestSrc) Valid() bool { + switch e { + case Agent: + return true + case Endpoint: + return true + default: + return false + } +} + // Defines values for AgentCheckinParamsContentEncoding. const ( Gzip AgentCheckinParamsContentEncoding = "gzip" ) +// Valid indicates whether the value is a known member of the AgentCheckinParamsContentEncoding enum. +func (e AgentCheckinParamsContentEncoding) Valid() bool { + switch e { + case Gzip: + return true + default: + return false + } +} + // AckRequest The request an elastic-agent sends to fleet-serve to acknowledge the execution of one or more actions. type AckRequest struct { Events []AckRequest_Events_Item `json:"events"` @@ -983,6 +1224,12 @@ type Throttle = Error // Unavailable Error processing request. type Unavailable = Error +// agentApiKeyContextKey is the context key for agentApiKey security scheme +type agentApiKeyContextKey string + +// apiKeyContextKey is the context key for apiKey security scheme +type apiKeyContextKey string + // GetPGPKeyParams defines parameters for GetPGPKey. type GetPGPKeyParams struct { // ElasticApiVersion The API version to use, format should be "YYYY-MM-DD" @@ -1940,11 +2187,12 @@ type MiddlewareFunc func(http.Handler) http.Handler func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "major" ------------- var major int - err = runtime.BindStyledParameterWithOptions("simple", "major", chi.URLParam(r, "major"), &major, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "major", chi.URLParam(r, "major"), &major, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "major", Err: err}) return @@ -1953,7 +2201,7 @@ func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "minor" ------------- var minor int - err = runtime.BindStyledParameterWithOptions("simple", "minor", chi.URLParam(r, "minor"), &minor, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "minor", chi.URLParam(r, "minor"), &minor, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "minor", Err: err}) return @@ -1962,7 +2210,7 @@ func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Requ // ------------- Path parameter "patch" ------------- var patch int - err = runtime.BindStyledParameterWithOptions("simple", "patch", chi.URLParam(r, "patch"), &patch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "patch", chi.URLParam(r, "patch"), &patch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "patch", Err: err}) return @@ -1982,7 +2230,7 @@ func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Requ return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2001,7 +2249,7 @@ func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Requ return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2026,6 +2274,7 @@ func (siw *ServerInterfaceWrapper) GetPGPKey(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) AgentEnroll(w http.ResponseWriter, r *http.Request) { var err error + _ = err ctx := r.Context() @@ -2047,7 +2296,7 @@ func (siw *ServerInterfaceWrapper) AgentEnroll(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "User-Agent", valueList[0], &UserAgent, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "User-Agent", valueList[0], &UserAgent, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "User-Agent", Err: err}) return @@ -2070,7 +2319,7 @@ func (siw *ServerInterfaceWrapper) AgentEnroll(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2089,7 +2338,7 @@ func (siw *ServerInterfaceWrapper) AgentEnroll(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2114,11 +2363,12 @@ func (siw *ServerInterfaceWrapper) AgentEnroll(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) AgentAcks(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2144,7 +2394,7 @@ func (siw *ServerInterfaceWrapper) AgentAcks(w http.ResponseWriter, r *http.Requ return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2163,7 +2413,7 @@ func (siw *ServerInterfaceWrapper) AgentAcks(w http.ResponseWriter, r *http.Requ return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2188,11 +2438,12 @@ func (siw *ServerInterfaceWrapper) AgentAcks(w http.ResponseWriter, r *http.Requ func (siw *ServerInterfaceWrapper) AuditUnenroll(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2218,7 +2469,7 @@ func (siw *ServerInterfaceWrapper) AuditUnenroll(w http.ResponseWriter, r *http. return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2237,7 +2488,7 @@ func (siw *ServerInterfaceWrapper) AuditUnenroll(w http.ResponseWriter, r *http. return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2262,11 +2513,12 @@ func (siw *ServerInterfaceWrapper) AuditUnenroll(w http.ResponseWriter, r *http. func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2292,7 +2544,7 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R return } - err = runtime.BindStyledParameterWithOptions("simple", "Accept-Encoding", valueList[0], &AcceptEncoding, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "Accept-Encoding", valueList[0], &AcceptEncoding, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Accept-Encoding", Err: err}) return @@ -2311,7 +2563,7 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R return } - err = runtime.BindStyledParameterWithOptions("simple", "Content-Encoding", valueList[0], &ContentEncoding, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "Content-Encoding", valueList[0], &ContentEncoding, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Content-Encoding", Err: err}) return @@ -2330,7 +2582,7 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R return } - err = runtime.BindStyledParameterWithOptions("simple", "User-Agent", valueList[0], &UserAgent, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "User-Agent", valueList[0], &UserAgent, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "User-Agent", Err: err}) return @@ -2353,7 +2605,7 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2372,7 +2624,7 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2397,11 +2649,12 @@ func (siw *ServerInterfaceWrapper) AgentCheckin(w http.ResponseWriter, r *http.R func (siw *ServerInterfaceWrapper) Artifact(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2410,7 +2663,7 @@ func (siw *ServerInterfaceWrapper) Artifact(w http.ResponseWriter, r *http.Reque // ------------- Path parameter "sha2" ------------- var sha2 string - err = runtime.BindStyledParameterWithOptions("simple", "sha2", chi.URLParam(r, "sha2"), &sha2, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "sha2", chi.URLParam(r, "sha2"), &sha2, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sha2", Err: err}) return @@ -2436,7 +2689,7 @@ func (siw *ServerInterfaceWrapper) Artifact(w http.ResponseWriter, r *http.Reque return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2455,7 +2708,7 @@ func (siw *ServerInterfaceWrapper) Artifact(w http.ResponseWriter, r *http.Reque return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2480,11 +2733,12 @@ func (siw *ServerInterfaceWrapper) Artifact(w http.ResponseWriter, r *http.Reque func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2501,9 +2755,14 @@ func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Reques // ------------- Optional query parameter "source" ------------- - err = runtime.BindQueryParameter("form", true, false, "source", r.URL.Query(), ¶ms.Source) + err = runtime.BindQueryParameterWithOptions("form", true, false, "source", r.URL.Query(), ¶ms.Source, runtime.BindQueryParameterOptions{Type: "string", Format: ""}) if err != nil { - siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "source", Err: err}) + var requiredError *runtime.RequiredParameterError + if errors.As(err, &requiredError) { + siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "source"}) + } else { + siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "source", Err: err}) + } return } @@ -2518,7 +2777,7 @@ func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Reques return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2537,7 +2796,7 @@ func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Reques return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2562,6 +2821,7 @@ func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Reques func (siw *ServerInterfaceWrapper) UploadBegin(w http.ResponseWriter, r *http.Request) { var err error + _ = err ctx := r.Context() @@ -2583,7 +2843,7 @@ func (siw *ServerInterfaceWrapper) UploadBegin(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2602,7 +2862,7 @@ func (siw *ServerInterfaceWrapper) UploadBegin(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2627,11 +2887,12 @@ func (siw *ServerInterfaceWrapper) UploadBegin(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) UploadComplete(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2657,7 +2918,7 @@ func (siw *ServerInterfaceWrapper) UploadComplete(w http.ResponseWriter, r *http return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2676,7 +2937,7 @@ func (siw *ServerInterfaceWrapper) UploadComplete(w http.ResponseWriter, r *http return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2701,11 +2962,12 @@ func (siw *ServerInterfaceWrapper) UploadComplete(w http.ResponseWriter, r *http func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Request) { var err error + _ = err // ------------- Path parameter "id" ------------- var id string - err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err}) return @@ -2714,7 +2976,7 @@ func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Re // ------------- Path parameter "chunkNum" ------------- var chunkNum int - err = runtime.BindStyledParameterWithOptions("simple", "chunkNum", chi.URLParam(r, "chunkNum"), &chunkNum, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "chunkNum", chi.URLParam(r, "chunkNum"), &chunkNum, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "chunkNum", Err: err}) return @@ -2740,7 +3002,7 @@ func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Chunk-SHA2", valueList[0], &XChunkSHA2, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Chunk-SHA2", valueList[0], &XChunkSHA2, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Chunk-SHA2", Err: err}) return @@ -2763,7 +3025,7 @@ func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2782,7 +3044,7 @@ func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Re return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return @@ -2807,6 +3069,7 @@ func (siw *ServerInterfaceWrapper) UploadChunk(w http.ResponseWriter, r *http.Re func (siw *ServerInterfaceWrapper) Status(w http.ResponseWriter, r *http.Request) { var err error + _ = err ctx := r.Context() @@ -2828,7 +3091,7 @@ func (siw *ServerInterfaceWrapper) Status(w http.ResponseWriter, r *http.Request return } - err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "X-Request-Id", valueList[0], &XRequestId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "X-Request-Id", Err: err}) return @@ -2847,7 +3110,7 @@ func (siw *ServerInterfaceWrapper) Status(w http.ResponseWriter, r *http.Request return } - err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false}) + err = runtime.BindStyledParameterWithOptions("simple", "elastic-api-version", valueList[0], &ElasticApiVersion, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "string", Format: ""}) if err != nil { siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "elastic-api-version", Err: err}) return diff --git a/main.go b/main.go index 72ceee6e9e..1aaa9bbf99 100644 --- a/main.go +++ b/main.go @@ -4,8 +4,8 @@ //go:generate go tool -modfile ./dev-tools/go.mod github.com/elastic/go-json-schema-generate/cmd/schema-generate -esdoc -s -cm "{\"Api\": \"API\", \"Id\": \"ID\"}" -o internal/pkg/model/schema.go -p model model/schema.json //go:generate go tool -modfile ./dev-tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config model/oapi-cfg.yml model/openapi.yml -//go:generate go tool -modfile ./dev-tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate types -package api -o pkg/api/types.gen.go model/openapi.yml -//go:generate go tool -modfile ./dev-tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate client -package api -o pkg/api/client.gen.go model/openapi.yml +//go:generate go tool -modfile ./dev-tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate types -package api -o pkg/api/types.gen.go -templates model/templates model/openapi.yml +//go:generate go tool -modfile ./dev-tools/go.mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -generate client -package api -o pkg/api/client.gen.go -templates model/templates model/openapi.yml //go:generate go fmt internal/pkg/model/schema.go //go:generate go fmt internal/pkg/api/openapi.gen.go //go:generate go fmt pkg/api/types.gen.go diff --git a/model/oapi-cfg.yml b/model/oapi-cfg.yml index c877e4c994..7d21fd9d15 100644 --- a/model/oapi-cfg.yml +++ b/model/oapi-cfg.yml @@ -5,3 +5,6 @@ generate: chi-server: true # strict-server: true # We need to figure out where/how to handle auth if we want to use strict generation output: ./internal/pkg/api/openapi.gen.go +output-options: + user-templates: + imports.tmpl: model/templates/imports.tmpl diff --git a/model/templates/imports.tmpl b/model/templates/imports.tmpl new file mode 100644 index 0000000000..765f840de8 --- /dev/null +++ b/model/templates/imports.tmpl @@ -0,0 +1,47 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +{{ if opts.Generate.StdHTTPServer -}} +//go:build go1.22 + +{{ end -}} +// Package {{.PackageName}} provides primitives to interact with the openapi HTTP API. +// +// Code generated by {{.ModuleName}} version {{.Version}} DO NOT EDIT. +package {{.PackageName}} + +import ( + "bytes" + "compress/flate" + "context" + "encoding/base64" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "go.yaml.in/yaml/v3" + "io" + "os" + "mime" + "mime/multipart" + "net/http" + "net/url" + "path" + "strings" + "time" + + "github.com/oapi-codegen/runtime" + "github.com/oapi-codegen/nullable" + openapi_types "github.com/oapi-codegen/runtime/types" + "github.com/getkin/kin-openapi/openapi3" + {{- range .RouterImports}} + {{if .Alias}}{{.Alias}} {{end}}"{{.Package}}" + {{- end}} + {{- range .ExternalImports}} + {{ . }} + {{- end}} + {{- range .AdditionalImports}} + {{.Alias}} "{{.Package}}" + {{- end}} +) diff --git a/pkg/api/client.gen.go b/pkg/api/client.gen.go index 5f7ed992e8..6ccbdccb73 100644 --- a/pkg/api/client.gen.go +++ b/pkg/api/client.gen.go @@ -4,7 +4,7 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package api import ( @@ -349,21 +349,21 @@ func NewGetPGPKeyRequest(server string, major int, minor int, patch int, params var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "major", runtime.ParamLocationPath, major) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "major", major, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "minor", runtime.ParamLocationPath, minor) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "minor", minor, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) if err != nil { return nil, err } var pathParam2 string - pathParam2, err = runtime.StyleParamWithLocation("simple", false, "patch", runtime.ParamLocationPath, patch) + pathParam2, err = runtime.StyleParamWithOptions("simple", false, "patch", patch, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) if err != nil { return nil, err } @@ -383,7 +383,7 @@ func NewGetPGPKeyRequest(server string, major int, minor int, patch int, params return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -393,7 +393,7 @@ func NewGetPGPKeyRequest(server string, major int, minor int, patch int, params if params.ElasticApiVersion != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -404,7 +404,7 @@ func NewGetPGPKeyRequest(server string, major int, minor int, patch int, params if params.XRequestId != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -447,7 +447,7 @@ func NewAgentEnrollRequestWithBody(server string, params *AgentEnrollParams, con return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -458,7 +458,7 @@ func NewAgentEnrollRequestWithBody(server string, params *AgentEnrollParams, con var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "User-Agent", runtime.ParamLocationHeader, params.UserAgent) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "User-Agent", params.UserAgent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -468,7 +468,7 @@ func NewAgentEnrollRequestWithBody(server string, params *AgentEnrollParams, con if params.XRequestId != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -479,7 +479,7 @@ func NewAgentEnrollRequestWithBody(server string, params *AgentEnrollParams, con if params.ElasticApiVersion != nil { var headerParam2 string - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam2, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -509,7 +509,7 @@ func NewAgentAcksRequestWithBody(server string, id string, params *AgentAcksPara var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -529,7 +529,7 @@ func NewAgentAcksRequestWithBody(server string, id string, params *AgentAcksPara return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -541,7 +541,7 @@ func NewAgentAcksRequestWithBody(server string, id string, params *AgentAcksPara if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -552,7 +552,7 @@ func NewAgentAcksRequestWithBody(server string, id string, params *AgentAcksPara if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -582,7 +582,7 @@ func NewAuditUnenrollRequestWithBody(server string, id string, params *AuditUnen var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -602,7 +602,7 @@ func NewAuditUnenrollRequestWithBody(server string, id string, params *AuditUnen return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -614,7 +614,7 @@ func NewAuditUnenrollRequestWithBody(server string, id string, params *AuditUnen if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -625,7 +625,7 @@ func NewAuditUnenrollRequestWithBody(server string, id string, params *AuditUnen if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -655,7 +655,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -675,7 +675,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -687,7 +687,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck if params.AcceptEncoding != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Accept-Encoding", runtime.ParamLocationHeader, *params.AcceptEncoding) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "Accept-Encoding", *params.AcceptEncoding, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -698,7 +698,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck if params.ContentEncoding != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "Content-Encoding", runtime.ParamLocationHeader, *params.ContentEncoding) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "Content-Encoding", *params.ContentEncoding, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -708,7 +708,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck var headerParam2 string - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "User-Agent", runtime.ParamLocationHeader, params.UserAgent) + headerParam2, err = runtime.StyleParamWithOptions("simple", false, "User-Agent", params.UserAgent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -718,7 +718,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck if params.XRequestId != nil { var headerParam3 string - headerParam3, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam3, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -729,7 +729,7 @@ func NewAgentCheckinRequestWithBody(server string, id string, params *AgentCheck if params.ElasticApiVersion != nil { var headerParam4 string - headerParam4, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam4, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -748,14 +748,14 @@ func NewArtifactRequest(server string, id string, sha2 string, params *ArtifactP var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sha2", runtime.ParamLocationPath, sha2) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "sha2", sha2, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -775,7 +775,7 @@ func NewArtifactRequest(server string, id string, sha2 string, params *ArtifactP return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -785,7 +785,7 @@ func NewArtifactRequest(server string, id string, sha2 string, params *ArtifactP if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -796,7 +796,7 @@ func NewArtifactRequest(server string, id string, sha2 string, params *ArtifactP if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -815,7 +815,7 @@ func NewGetFileRequest(server string, id string, params *GetFileParams) (*http.R var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -836,28 +836,33 @@ func NewGetFileRequest(server string, id string, params *GetFileParams) (*http.R } if params != nil { + // queryValues collects non-styled parameters (passthrough, JSON) + // that are safe to round-trip through url.Values.Encode(). queryValues := queryURL.Query() + // rawQueryFragments collects pre-encoded query fragments from + // styled parameters, preserving literal commas as delimiters + // per the OpenAPI spec (e.g. "color=blue,black,brown"). + var rawQueryFragments []string if params.Source != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "source", runtime.ParamLocationQuery, *params.Source); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "source", *params.Source, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + for _, qp := range strings.Split(queryFrag, "&") { + rawQueryFragments = append(rawQueryFragments, qp) } } } - queryURL.RawQuery = queryValues.Encode() + if encoded := queryValues.Encode(); encoded != "" { + rawQueryFragments = append(rawQueryFragments, encoded) + } + queryURL.RawQuery = strings.Join(rawQueryFragments, "&") } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -867,7 +872,7 @@ func NewGetFileRequest(server string, id string, params *GetFileParams) (*http.R if params.ElasticApiVersion != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -878,7 +883,7 @@ func NewGetFileRequest(server string, id string, params *GetFileParams) (*http.R if params.XRequestId != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -921,7 +926,7 @@ func NewUploadBeginRequestWithBody(server string, params *UploadBeginParams, con return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -933,7 +938,7 @@ func NewUploadBeginRequestWithBody(server string, params *UploadBeginParams, con if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -944,7 +949,7 @@ func NewUploadBeginRequestWithBody(server string, params *UploadBeginParams, con if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -974,7 +979,7 @@ func NewUploadCompleteRequestWithBody(server string, id string, params *UploadCo var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -994,7 +999,7 @@ func NewUploadCompleteRequestWithBody(server string, id string, params *UploadCo return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPost, queryURL.String(), body) if err != nil { return nil, err } @@ -1006,7 +1011,7 @@ func NewUploadCompleteRequestWithBody(server string, id string, params *UploadCo if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1017,7 +1022,7 @@ func NewUploadCompleteRequestWithBody(server string, id string, params *UploadCo if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1036,14 +1041,14 @@ func NewUploadChunkRequestWithBody(server string, id string, chunkNum int, param var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } var pathParam1 string - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "chunkNum", runtime.ParamLocationPath, chunkNum) + pathParam1, err = runtime.StyleParamWithOptions("simple", false, "chunkNum", chunkNum, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: ""}) if err != nil { return nil, err } @@ -1063,7 +1068,7 @@ func NewUploadChunkRequestWithBody(server string, id string, chunkNum int, param return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest(http.MethodPut, queryURL.String(), body) if err != nil { return nil, err } @@ -1074,7 +1079,7 @@ func NewUploadChunkRequestWithBody(server string, id string, chunkNum int, param var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Chunk-SHA2", runtime.ParamLocationHeader, params.XChunkSHA2) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Chunk-SHA2", params.XChunkSHA2, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1084,7 +1089,7 @@ func NewUploadChunkRequestWithBody(server string, id string, chunkNum int, param if params.XRequestId != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1095,7 +1100,7 @@ func NewUploadChunkRequestWithBody(server string, id string, chunkNum int, param if params.ElasticApiVersion != nil { var headerParam2 string - headerParam2, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam2, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1127,7 +1132,7 @@ func NewStatusRequest(server string, params *StatusParams) (*http.Request, error return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) if err != nil { return nil, err } @@ -1137,7 +1142,7 @@ func NewStatusRequest(server string, params *StatusParams) (*http.Request, error if params.XRequestId != nil { var headerParam0 string - headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Request-Id", runtime.ParamLocationHeader, *params.XRequestId) + headerParam0, err = runtime.StyleParamWithOptions("simple", false, "X-Request-Id", *params.XRequestId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1148,7 +1153,7 @@ func NewStatusRequest(server string, params *StatusParams) (*http.Request, error if params.ElasticApiVersion != nil { var headerParam1 string - headerParam1, err = runtime.StyleParamWithLocation("simple", false, "elastic-api-version", runtime.ParamLocationHeader, *params.ElasticApiVersion) + headerParam1, err = runtime.StyleParamWithOptions("simple", false, "elastic-api-version", *params.ElasticApiVersion, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationHeader, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -1273,6 +1278,14 @@ func (r GetPGPKeyResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetPGPKeyResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AgentEnrollResponse struct { Body []byte HTTPResponse *http.Response @@ -1303,6 +1316,14 @@ func (r AgentEnrollResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AgentEnrollResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AgentAcksResponse struct { Body []byte HTTPResponse *http.Response @@ -1334,6 +1355,14 @@ func (r AgentAcksResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AgentAcksResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AuditUnenrollResponse struct { Body []byte HTTPResponse *http.Response @@ -1362,6 +1391,14 @@ func (r AuditUnenrollResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AuditUnenrollResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type AgentCheckinResponse struct { Body []byte HTTPResponse *http.Response @@ -1393,6 +1430,14 @@ func (r AgentCheckinResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r AgentCheckinResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type ArtifactResponse struct { Body []byte HTTPResponse *http.Response @@ -1422,6 +1467,14 @@ func (r ArtifactResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r ArtifactResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type GetFileResponse struct { Body []byte HTTPResponse *http.Response @@ -1449,6 +1502,14 @@ func (r GetFileResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r GetFileResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UploadBeginResponse struct { Body []byte HTTPResponse *http.Response @@ -1479,6 +1540,14 @@ func (r UploadBeginResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UploadBeginResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UploadCompleteResponse struct { Body []byte HTTPResponse *http.Response @@ -1509,6 +1578,14 @@ func (r UploadCompleteResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UploadCompleteResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type UploadChunkResponse struct { Body []byte HTTPResponse *http.Response @@ -1538,6 +1615,14 @@ func (r UploadChunkResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r UploadChunkResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + type StatusResponse struct { Body []byte HTTPResponse *http.Response @@ -1563,6 +1648,14 @@ func (r StatusResponse) StatusCode() int { return 0 } +// ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers +func (r StatusResponse) ContentType() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Header.Get("Content-Type") + } + return "" +} + // GetPGPKeyWithResponse request returning *GetPGPKeyResponse func (c *ClientWithResponses) GetPGPKeyWithResponse(ctx context.Context, major int, minor int, patch int, params *GetPGPKeyParams, reqEditors ...RequestEditorFn) (*GetPGPKeyResponse, error) { rsp, err := c.GetPGPKey(ctx, major, minor, patch, params, reqEditors...) diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index 4847dfb32b..3c08a96a15 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -4,7 +4,7 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT. package api import ( @@ -16,8 +16,8 @@ import ( ) const ( - AgentApiKeyScopes = "agentApiKey.Scopes" - ApiKeyScopes = "apiKey.Scopes" + AgentApiKeyScopes agentApiKeyContextKey = "agentApiKey.Scopes" + ApiKeyScopes apiKeyContextKey = "apiKey.Scopes" ) // Defines values for ActionType. @@ -34,12 +34,52 @@ const ( UPGRADE ActionType = "UPGRADE" ) +// Valid indicates whether the value is a known member of the ActionType enum. +func (e ActionType) Valid() bool { + switch e { + case CANCEL: + return true + case INPUTACTION: + return true + case MIGRATE: + return true + case POLICYCHANGE: + return true + case POLICYREASSIGN: + return true + case PRIVILEGELEVELCHANGE: + return true + case REQUESTDIAGNOSTICS: + return true + case SETTINGS: + return true + case UNENROLL: + return true + case UPGRADE: + return true + default: + return false + } +} + // Defines values for ActionRequestDiagnosticsAdditionalMetrics. const ( CONN ActionRequestDiagnosticsAdditionalMetrics = "CONN" CPU ActionRequestDiagnosticsAdditionalMetrics = "CPU" ) +// Valid indicates whether the value is a known member of the ActionRequestDiagnosticsAdditionalMetrics enum. +func (e ActionRequestDiagnosticsAdditionalMetrics) Valid() bool { + switch e { + case CONN: + return true + case CPU: + return true + default: + return false + } +} + // Defines values for ActionSettingsLogLevel. const ( ActionSettingsLogLevelDebug ActionSettingsLogLevel = "debug" @@ -49,6 +89,24 @@ const ( ActionSettingsLogLevelWarning ActionSettingsLogLevel = "warning" ) +// Valid indicates whether the value is a known member of the ActionSettingsLogLevel enum. +func (e ActionSettingsLogLevel) Valid() bool { + switch e { + case ActionSettingsLogLevelDebug: + return true + case ActionSettingsLogLevelError: + return true + case ActionSettingsLogLevelInfo: + return true + case ActionSettingsLogLevelTrace: + return true + case ActionSettingsLogLevelWarning: + return true + default: + return false + } +} + // Defines values for AuditUnenrollRequestReason. const ( KeyRevoked AuditUnenrollRequestReason = "key_revoked" @@ -57,6 +115,22 @@ const ( Uninstall AuditUnenrollRequestReason = "uninstall" ) +// Valid indicates whether the value is a known member of the AuditUnenrollRequestReason enum. +func (e AuditUnenrollRequestReason) Valid() bool { + switch e { + case KeyRevoked: + return true + case Migrated: + return true + case Orphaned: + return true + case Uninstall: + return true + default: + return false + } +} + // Defines values for CheckinRequestStatus. const ( CheckinRequestStatusDegraded CheckinRequestStatus = "degraded" @@ -66,11 +140,39 @@ const ( CheckinRequestStatusStarting CheckinRequestStatus = "starting" ) +// Valid indicates whether the value is a known member of the CheckinRequestStatus enum. +func (e CheckinRequestStatus) Valid() bool { + switch e { + case CheckinRequestStatusDegraded: + return true + case CheckinRequestStatusDisconnected: + return true + case CheckinRequestStatusError: + return true + case CheckinRequestStatusOnline: + return true + case CheckinRequestStatusStarting: + return true + default: + return false + } +} + // Defines values for EnrollRequestType. const ( PERMANENT EnrollRequestType = "PERMANENT" ) +// Valid indicates whether the value is a known member of the EnrollRequestType enum. +func (e EnrollRequestType) Valid() bool { + switch e { + case PERMANENT: + return true + default: + return false + } +} + // Defines values for EventSubtype. const ( EventSubtypeACKNOWLEDGED EventSubtype = "ACKNOWLEDGED" @@ -85,6 +187,34 @@ const ( EventSubtypeUNKNOWN EventSubtype = "UNKNOWN" ) +// Valid indicates whether the value is a known member of the EventSubtype enum. +func (e EventSubtype) Valid() bool { + switch e { + case EventSubtypeACKNOWLEDGED: + return true + case EventSubtypeCONFIG: + return true + case EventSubtypeDATADUMP: + return true + case EventSubtypeFAILED: + return true + case EventSubtypeINPROGRESS: + return true + case EventSubtypeRUNNING: + return true + case EventSubtypeSTARTING: + return true + case EventSubtypeSTOPPED: + return true + case EventSubtypeSTOPPING: + return true + case EventSubtypeUNKNOWN: + return true + default: + return false + } +} + // Defines values for EventType. const ( ACTION EventType = "ACTION" @@ -93,6 +223,22 @@ const ( STATE EventType = "STATE" ) +// Valid indicates whether the value is a known member of the EventType enum. +func (e EventType) Valid() bool { + switch e { + case ACTION: + return true + case ACTIONRESULT: + return true + case ERROR: + return true + case STATE: + return true + default: + return false + } +} + // Defines values for StatusResponseStatus. const ( StatusResponseStatusCONFIGURING StatusResponseStatus = "CONFIGURING" @@ -105,6 +251,30 @@ const ( StatusResponseStatusUNKNOWN StatusResponseStatus = "UNKNOWN" ) +// Valid indicates whether the value is a known member of the StatusResponseStatus enum. +func (e StatusResponseStatus) Valid() bool { + switch e { + case StatusResponseStatusCONFIGURING: + return true + case StatusResponseStatusDEGRADED: + return true + case StatusResponseStatusFAILED: + return true + case StatusResponseStatusHEALTHY: + return true + case StatusResponseStatusSTARTING: + return true + case StatusResponseStatusSTOPPED: + return true + case StatusResponseStatusSTOPPING: + return true + case StatusResponseStatusUNKNOWN: + return true + default: + return false + } +} + // Defines values for UpgradeDetailsState. const ( UpgradeDetailsStateUPGDOWNLOADING UpgradeDetailsState = "UPG_DOWNLOADING" @@ -118,6 +288,32 @@ const ( UpgradeDetailsStateUPGWATCHING UpgradeDetailsState = "UPG_WATCHING" ) +// Valid indicates whether the value is a known member of the UpgradeDetailsState enum. +func (e UpgradeDetailsState) Valid() bool { + switch e { + case UpgradeDetailsStateUPGDOWNLOADING: + return true + case UpgradeDetailsStateUPGEXTRACTING: + return true + case UpgradeDetailsStateUPGFAILED: + return true + case UpgradeDetailsStateUPGREPLACING: + return true + case UpgradeDetailsStateUPGREQUESTED: + return true + case UpgradeDetailsStateUPGRESTARTING: + return true + case UpgradeDetailsStateUPGROLLBACK: + return true + case UpgradeDetailsStateUPGSCHEDULED: + return true + case UpgradeDetailsStateUPGWATCHING: + return true + default: + return false + } +} + // Defines values for UpgradeMetadataFailedFailedState. const ( UpgradeMetadataFailedFailedStateUPGDOWNLOADING UpgradeMetadataFailedFailedState = "UPG_DOWNLOADING" @@ -129,17 +325,61 @@ const ( UpgradeMetadataFailedFailedStateUPGWATCHING UpgradeMetadataFailedFailedState = "UPG_WATCHING" ) +// Valid indicates whether the value is a known member of the UpgradeMetadataFailedFailedState enum. +func (e UpgradeMetadataFailedFailedState) Valid() bool { + switch e { + case UpgradeMetadataFailedFailedStateUPGDOWNLOADING: + return true + case UpgradeMetadataFailedFailedStateUPGEXTRACTING: + return true + case UpgradeMetadataFailedFailedStateUPGREPLACING: + return true + case UpgradeMetadataFailedFailedStateUPGREQUESTED: + return true + case UpgradeMetadataFailedFailedStateUPGRESTARTING: + return true + case UpgradeMetadataFailedFailedStateUPGSCHEDULED: + return true + case UpgradeMetadataFailedFailedStateUPGWATCHING: + return true + default: + return false + } +} + // Defines values for UploadBeginRequestSrc. const ( Agent UploadBeginRequestSrc = "agent" Endpoint UploadBeginRequestSrc = "endpoint" ) +// Valid indicates whether the value is a known member of the UploadBeginRequestSrc enum. +func (e UploadBeginRequestSrc) Valid() bool { + switch e { + case Agent: + return true + case Endpoint: + return true + default: + return false + } +} + // Defines values for AgentCheckinParamsContentEncoding. const ( Gzip AgentCheckinParamsContentEncoding = "gzip" ) +// Valid indicates whether the value is a known member of the AgentCheckinParamsContentEncoding enum. +func (e AgentCheckinParamsContentEncoding) Valid() bool { + switch e { + case Gzip: + return true + default: + return false + } +} + // AckRequest The request an elastic-agent sends to fleet-serve to acknowledge the execution of one or more actions. type AckRequest struct { Events []AckRequest_Events_Item `json:"events"` @@ -980,6 +1220,12 @@ type Throttle = Error // Unavailable Error processing request. type Unavailable = Error +// agentApiKeyContextKey is the context key for agentApiKey security scheme +type agentApiKeyContextKey string + +// apiKeyContextKey is the context key for apiKey security scheme +type apiKeyContextKey string + // GetPGPKeyParams defines parameters for GetPGPKey. type GetPGPKeyParams struct { // ElasticApiVersion The API version to use, format should be "YYYY-MM-DD"