diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef02f3b..9df4459 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: v1.59 + version: v1.62 tidy: name: Tidy @@ -64,9 +64,9 @@ jobs: fail-fast: false matrix: go_version: - - "1.20" - "1.21" - "1.22" + - "1.23" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index e683a0a..e2980a2 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ endef $(eval $(call tool,godoc,golang.org/x/tools/cmd/godoc@latest)) $(eval $(call tool,gofumpt,mvdan.cc/gofumpt@latest)) $(eval $(call tool,goimports,golang.org/x/tools/cmd/goimports@latest)) -$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59)) +$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62)) $(eval $(call tool,gomod,github.com/Helcaraxan/gomod@latest)) .PHONY: tools diff --git a/go.mod b/go.mod index 618c852..0eeb6f9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/krystal/go-katapult -go 1.20 +go 1.21.0 + +toolchain go1.23.2 require ( github.com/augurysys/timestamp v0.3.2 @@ -11,10 +13,10 @@ require ( github.com/jimeh/undent v1.1.1 github.com/mitchellh/copystructure v1.2.0 github.com/oapi-codegen/nullable v1.1.0 - github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 + github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 github.com/oapi-codegen/runtime v1.1.1 github.com/stretchr/testify v1.9.0 - golang.org/x/text v0.15.0 + golang.org/x/text v0.18.0 gopkg.in/yaml.v3 v3.0.1 mvdan.cc/gofumpt v0.4.0 ) @@ -33,5 +35,5 @@ require ( go.mongodb.org/mongo-driver v1.11.2 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/tools v0.21.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect ) diff --git a/go.sum b/go.sum index f3ba547..4422a0e 100644 --- a/go.sum +++ b/go.sum @@ -13,6 +13,7 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -35,9 +36,11 @@ github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPci github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -54,8 +57,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/3KntMs= github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY= -github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 h1:rICjNsHbPP1LttefanBPnwsSwl09SqhCO7Ee623qR84= -github.com/oapi-codegen/oapi-codegen/v2 v2.3.0/go.mod h1:4k+cJeSq5ntkwlcpQSxLxICCxQzCL772o30PxdibRt4= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 h1:ykgG34472DWey7TSjd8vIfNykXgjOgYJZoQbKfEeY/Q= +github.com/oapi-codegen/oapi-codegen/v2 v2.4.1/go.mod h1:N5+lY1tiTDV3V1BeHtOxeWXHoPVeApvsvjJqegfoaz8= github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro= github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -64,6 +67,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rhysd/go-fakeio v1.0.0 h1:+TjiKCOs32dONY7DaoVz/VPOdvRkPfBkEyUDIpM8FQY= github.com/rhysd/go-fakeio v1.0.0/go.mod h1:joYxF906trVwp2JLrE4jlN7A0z6wrz8O6o1UjarbFzE= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -100,11 +104,11 @@ golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= diff --git a/next/core/core.go b/next/core/core.go index 9d8fe36..3529af6 100644 --- a/next/core/core.go +++ b/next/core/core.go @@ -1,6 +1,6 @@ // Package core provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package core import ( @@ -79,6 +79,7 @@ const ( DNSRecordTypesEnumALIAS DNSRecordTypesEnum = "ALIAS" DNSRecordTypesEnumCAA DNSRecordTypesEnum = "CAA" DNSRecordTypesEnumCNAME DNSRecordTypesEnum = "CNAME" + DNSRecordTypesEnumHTTPRedirect DNSRecordTypesEnum = "HTTPRedirect" DNSRecordTypesEnumIPS DNSRecordTypesEnum = "IPS" DNSRecordTypesEnumMX DNSRecordTypesEnum = "MX" DNSRecordTypesEnumNS DNSRecordTypesEnum = "NS" @@ -984,6 +985,7 @@ type DNSRecordContentArguments struct { ALIAS *DNSRecordContentArgumentsForALIAS `json:"ALIAS,omitempty"` CAA *DNSRecordContentArgumentsForCAA `json:"CAA,omitempty"` CNAME *DNSRecordContentArgumentsForCNAME `json:"CNAME,omitempty"` + HTTPRedirect *DNSRecordContentArgumentsForHTTPRedirect `json:"HTTPRedirect,omitempty"` IPS *DNSRecordContentArgumentsForIPS `json:"IPS,omitempty"` MX *DNSRecordContentArgumentsForMX `json:"MX,omitempty"` NS *DNSRecordContentArgumentsForNS `json:"NS,omitempty"` @@ -1022,6 +1024,12 @@ type DNSRecordContentArgumentsForCNAME struct { Hostname *string `json:"hostname,omitempty"` } +// DNSRecordContentArgumentsForHTTPRedirect defines model for DNSRecordContentArgumentsForHTTPRedirect. +type DNSRecordContentArgumentsForHTTPRedirect struct { + HttpStatus *string `json:"http_status,omitempty"` + Url *string `json:"url,omitempty"` +} + // DNSRecordContentArgumentsForIPS defines model for DNSRecordContentArgumentsForIPS. type DNSRecordContentArgumentsForIPS struct { IpAddresses *string `json:"ip_addresses,omitempty"` @@ -1073,6 +1081,7 @@ type DNSRecordContentAttributes struct { ALIAS nullable.Nullable[RecordContentAttributesForALIAS] `json:"ALIAS,omitempty"` CAA nullable.Nullable[RecordContentAttributesForCAA] `json:"CAA,omitempty"` CNAME nullable.Nullable[RecordContentAttributesForCNAME] `json:"CNAME,omitempty"` + HTTPRedirect nullable.Nullable[RecordContentAttributesForHTTPRedirect] `json:"HTTPRedirect,omitempty"` IPS nullable.Nullable[RecordContentAttributesForIPS] `json:"IPS,omitempty"` MX nullable.Nullable[RecordContentAttributesForMX] `json:"MX,omitempty"` NS nullable.Nullable[RecordContentAttributesForNS] `json:"NS,omitempty"` @@ -2856,6 +2865,7 @@ type ObjectStorageAccessKeyStateEnum string // ObjectStorageAccount defines model for ObjectStorageAccount. type ObjectStorageAccount struct { + BucketCount *int `json:"bucket_count,omitempty"` CreatedAt *int `json:"created_at,omitempty"` DataCenter *DataCenter `json:"data_center,omitempty"` ProvisioningState *ObjectStorageAccountProvisioningStateEnum `json:"provisioning_state,omitempty"` @@ -4351,6 +4361,12 @@ type RecordContentAttributesForCNAME struct { Hostname nullable.Nullable[string] `json:"hostname,omitempty"` } +// RecordContentAttributesForHTTPRedirect defines model for RecordContentAttributesForHTTPRedirect. +type RecordContentAttributesForHTTPRedirect struct { + HttpStatus nullable.Nullable[string] `json:"http_status,omitempty"` + Url nullable.Nullable[string] `json:"url,omitempty"` +} + // RecordContentAttributesForIPS defines model for RecordContentAttributesForIPS. type RecordContentAttributesForIPS struct { IpAddresses nullable.Nullable[string] `json:"ip_addresses,omitempty"` diff --git a/next/generator-config.yml b/next/generator-config.yml index fed585e..59a5d2c 100644 --- a/next/generator-config.yml +++ b/next/generator-config.yml @@ -1,2 +1,2 @@ goVersion: 1.22 -generatorVersion: 2.3.0 \ No newline at end of file +generatorVersion: 2.4.1 \ No newline at end of file diff --git a/next/katapult-core-openapi.json b/next/katapult-core-openapi.json index c9a50bb..2e50b71 100644 --- a/next/katapult-core-openapi.json +++ b/next/katapult-core-openapi.json @@ -1,13 +1,7 @@ { "openapi": "3.0.0", "info": { - "contact": { - "name": "Katapult Support", - "email": "team@katapult.io", - "url": "https://katapult.io/contact" - }, - "termsOfService": "https://katapult.io/terms", - "x-katapult-version": "2.61.1", + "x-katapult-version": "2.64.0", "version": "1.0.0", "title": "Katapult Core API", "description": "Welcome to the documentation for the Katapult Core API" @@ -4175,7 +4169,7 @@ "post": { "operationId": "post:dns_zone_verify", "summary": "Verify DNS zone", - "description": "Attempt to verify the nameservers for a given DNS zone\n## Scopes\n- `dns`\n\n### OAuth2 Scopes\nWhen using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`.\n", + "description": "Attempt to verify either the nameservers or root TXT record for a given DNS zone\n## Scopes\n- `dns`\n\n### OAuth2 Scopes\nWhen using OAuth2 authentication, scopes are prefixed with `api.katapult.io/core/v1/`.\n", "tags": [ "DNS zones" ], @@ -4209,7 +4203,7 @@ }, "responses": { "200": { - "description": "Attempt to verify the nameservers for a given DNS zone", + "description": "Attempt to verify either the nameservers or root TXT record for a given DNS zone", "content": { "application/json": { "schema": { @@ -21859,6 +21853,7 @@ "ALIAS", "CAA", "CNAME", + "HTTPRedirect", "IPS", "MX", "NS", @@ -21913,6 +21908,14 @@ ], "nullable": true }, + "HTTPRedirect": { + "allOf": [ + { + "$ref": "#/components/schemas/RecordContentAttributesForHTTPRedirect" + } + ], + "nullable": true + }, "IPS": { "allOf": [ { @@ -22036,6 +22039,19 @@ } } }, + "RecordContentAttributesForHTTPRedirect": { + "type": "object", + "properties": { + "url": { + "type": "string", + "nullable": true + }, + "http_status": { + "type": "string", + "nullable": true + } + } + }, "RecordContentAttributesForIPS": { "type": "object", "properties": { @@ -22163,6 +22179,9 @@ "CNAME": { "$ref": "#/components/schemas/DNSRecordContentArgumentsForCNAME" }, + "HTTPRedirect": { + "$ref": "#/components/schemas/DNSRecordContentArgumentsForHTTPRedirect" + }, "IPS": { "$ref": "#/components/schemas/DNSRecordContentArgumentsForIPS" }, @@ -22238,6 +22257,17 @@ } } }, + "DNSRecordContentArgumentsForHTTPRedirect": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "http_status": { + "type": "string" + } + } + }, "DNSRecordContentArgumentsForIPS": { "type": "object", "properties": { @@ -25467,6 +25497,9 @@ "type": "integer", "description": "The total storage used in bytes (updated periodically)" }, + "bucket_count": { + "type": "integer" + }, "data_center": { "$ref": "#/components/schemas/DataCenter" } @@ -26881,7 +26914,7 @@ } }, "DNSZoneNotVerifiedResponse": { - "description": "The DNS zone could not be verified, check the nameservers are set correctly", + "description": "The DNS zone could not be verified, check the nameservers or root TXT record are set correctly", "content": { "application/json": { "schema": { @@ -28076,4 +28109,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/next/katapult-public-openapi.json b/next/katapult-public-openapi.json index 61bf26e..beac12b 100644 --- a/next/katapult-public-openapi.json +++ b/next/katapult-public-openapi.json @@ -1,13 +1,7 @@ { "openapi": "3.0.0", "info": { - "contact": { - "name": "Katapult Support", - "email": "team@katapult.io", - "url": "https://katapult.io/contact" - }, - "termsOfService": "https://katapult.io/terms", - "x-katapult-version": "2.61.1", + "x-katapult-version": "2.64.0", "version": "1.0.0", "title": "Katapult Public API", "description": "Welcome to the documentation for the Katapult Public API" @@ -191,7 +185,7 @@ "post": { "operationId": "post:signups", "summary": "Create signup", - "description": "This will create a new signup object and e-mail the appropriate welcome e-mail to the given email address", + "description": "This will create a new signup object, which can be either verified by e-mail or by the user creating an account in Identity", "tags": [ "Signups" ], @@ -200,6 +194,10 @@ "application/json": { "schema": { "properties": { + "verify_with_email": { + "type": "boolean", + "description": "If true, the user will be sent an email to verify their e-mail address, and if false, the user will need to verify their e-mail address when they create an account in Identity" + }, "email_address": { "type": "string", "description": "The e-mail address that should receive the welcome e-mail" @@ -211,17 +209,14 @@ "campaign": { "$ref": "#/components/schemas/SignupCampaignArguments" } - }, - "required": [ - "email_address" - ] + } } } } }, "responses": { "200": { - "description": "This will create a new signup object and e-mail the appropriate welcome e-mail to the given email address", + "description": "This will create a new signup object, which can be either verified by e-mail or by the user creating an account in Identity", "content": { "application/json": { "schema": { @@ -232,12 +227,19 @@ }, "email_address": { "type": "string", - "description": "The e-mail address that was sent the welcome email" + "description": "The e-mail address that was sent the welcome email", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL for the user to continue their signup process, only available if verify_with_email is false", + "nullable": true } }, "required": [ "id", - "email_address" + "email_address", + "url" ] } } @@ -1111,4 +1113,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/next/public/public.go b/next/public/public.go index e093820..0e521c9 100644 --- a/next/public/public.go +++ b/next/public/public.go @@ -1,6 +1,6 @@ // Package public provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. +// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT. package public import ( @@ -385,7 +385,10 @@ type PostSignupsJSONBody struct { Coupon *string `json:"coupon,omitempty"` // EmailAddress The e-mail address that should receive the welcome e-mail - EmailAddress string `json:"email_address"` + EmailAddress *string `json:"email_address,omitempty"` + + // VerifyWithEmail If true, the user will be sent an email to verify their e-mail address, and if false, the user will need to verify their e-mail address when they create an account in Identity + VerifyWithEmail *bool `json:"verify_with_email,omitempty"` } // GetVirtualMachinePackagesParams defines parameters for GetVirtualMachinePackages. @@ -1145,10 +1148,13 @@ type PostSignupsResponse struct { HTTPResponse *http.Response JSON200 *struct { // EmailAddress The e-mail address that was sent the welcome email - EmailAddress string `json:"email_address"` + EmailAddress nullable.Nullable[string] `json:"email_address"` // Id The ID of the signup Id string `json:"id"` + + // Url The URL for the user to continue their signup process, only available if verify_with_email is false + Url nullable.Nullable[string] `json:"url"` } JSON403 *APIAuthenticator403Response JSON404 *InvalidCouponCodeResponse @@ -1583,10 +1589,13 @@ func ParsePostSignupsResponse(rsp *http.Response) (*PostSignupsResponse, error) case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { // EmailAddress The e-mail address that was sent the welcome email - EmailAddress string `json:"email_address"` + EmailAddress nullable.Nullable[string] `json:"email_address"` // Id The ID of the signup Id string `json:"id"` + + // Url The URL for the user to continue their signup process, only available if verify_with_email is false + Url nullable.Nullable[string] `json:"url"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err diff --git a/next/templates/imports.tmpl b/next/templates/imports.tmpl index 04206ae..fe3ab1b 100644 --- a/next/templates/imports.tmpl +++ b/next/templates/imports.tmpl @@ -28,6 +28,7 @@ import ( "github.com/oapi-codegen/runtime" "github.com/oapi-codegen/nullable" + "github.com/oapi-codegen/oapi-codegen/v2/pkg/securityprovider" strictecho "github.com/oapi-codegen/runtime/strictmiddleware/echo" strictgin "github.com/oapi-codegen/runtime/strictmiddleware/gin" strictiris "github.com/oapi-codegen/runtime/strictmiddleware/iris"