diff --git a/go.mod b/go.mod index f6a1b4aaf..bfcf86dab 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/danicc097/openapi-go-gin-postgres-sqlc go 1.21 +toolchain go1.22.5 replace ( // all 3 are branches named `custom`. @@ -36,7 +37,7 @@ require ( github.com/jackc/pgx-zap v0.0.0-20221202020421-94b1cb2f889f github.com/jackc/pgx/v5 v5.6.0 github.com/joho/godotenv v1.5.1 - github.com/kenshaw/inflector v0.2.0 + github.com/kenshaw/inflector v0.3.0 github.com/kenshaw/snaker v0.2.0 github.com/oapi-codegen/runtime v1.1.1 github.com/oapi-codegen/testutil v1.1.0 diff --git a/go.sum b/go.sum index cc9cb1ea4..b9e80ea33 100644 --- a/go.sum +++ b/go.sum @@ -237,8 +237,8 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= -github.com/kenshaw/inflector v0.2.0 h1:6HuXXlzqIIptlIkKvZ4fFSgfr0opnV6/LVIg+1+DlqY= -github.com/kenshaw/inflector v0.2.0/go.mod h1:g5nxVgwZsIPE0eesk201Sp4YBwDDHZDfJHl6L2PUTM4= +github.com/kenshaw/inflector v0.3.0 h1:kmtnvXa/sMt2ONdg3xHxxSy5m910Zbxsn4SG0BGa4wg= +github.com/kenshaw/inflector v0.3.0/go.mod h1:Xe6PQ221cg7vLb02JR6yKODGIBxhpJySzbnWot/v9Pk= github.com/kenshaw/snaker v0.2.0 h1:DPlxCtAv9mw1wSsvIN1khUAPJUIbFJUckMIDWSQ7TC8= github.com/kenshaw/snaker v0.2.0/go.mod h1:DNyRUqHMZ18/zioxr6R7m4kSxxf2+QmB0BXoORsXRaY= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/base.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/base.yml deleted file mode 100644 index ff8240eb0..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/base.yml +++ /dev/null @@ -1,16 +0,0 @@ -openapi: "3.0.3" -info: - title: Recursive cyclic refs example - version: "1.0" -components: - schemas: - Foo: - properties: - foo2: - $ref: "other.yml#/components/schemas/Foo2" - bar: - $ref: "#/components/schemas/Bar" - Bar: - properties: - foo: - $ref: "#/components/schemas/Foo" diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/other.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/other.yml deleted file mode 100644 index 29b72d98c..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/circularRef/other.yml +++ /dev/null @@ -1,10 +0,0 @@ -openapi: "3.0.3" -info: - title: Recursive cyclic refs example - version: "1.0" -components: - schemas: - Foo2: - properties: - id: - type: string diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Bar.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Bar.yml deleted file mode 100644 index cc59fc27b..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Bar.yml +++ /dev/null @@ -1,2 +0,0 @@ -type: string -example: bar diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Cat.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Cat.yml deleted file mode 100644 index c476aa1a5..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Cat.yml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -properties: - cat: - $ref: ../openapi.yml#/components/schemas/Cat diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo.yml deleted file mode 100644 index 53a233666..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo.yml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -properties: - bar: - $ref: ../openapi.yml#/components/schemas/Bar diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo/Foo2.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo/Foo2.yml deleted file mode 100644 index aeac81f48..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/Foo/Foo2.yml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -properties: - foo: - $ref: ../../openapi.yml#/components/schemas/Foo diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/models/error.yaml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/models/error.yaml deleted file mode 100644 index b4d404793..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/components/models/error.yaml +++ /dev/null @@ -1,2 +0,0 @@ -type: object -title: ErrorDetails diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/issue615.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/issue615.yml deleted file mode 100644 index d1370e32e..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/issue615.yml +++ /dev/null @@ -1,60 +0,0 @@ -openapi: "3.0.3" -info: - title: Deep recursive cyclic refs example - version: "1.0" -paths: - /foo: - $ref: ./paths/foo.yml -components: - schemas: - FilterColumnIncludes: - type: object - properties: - $includes: - $ref: '#/components/schemas/FilterPredicate' - additionalProperties: false - maxProperties: 1 - minProperties: 1 - FilterPredicate: - oneOf: - - $ref: '#/components/schemas/FilterValue' - - type: array - items: - $ref: '#/components/schemas/FilterPredicate' - minLength: 1 - - $ref: '#/components/schemas/FilterPredicateOp' - - $ref: '#/components/schemas/FilterPredicateRangeOp' - FilterPredicateOp: - type: object - properties: - $any: - oneOf: - - type: array - items: - $ref: '#/components/schemas/FilterPredicate' - $none: - oneOf: - - $ref: '#/components/schemas/FilterPredicate' - - type: array - items: - $ref: '#/components/schemas/FilterPredicate' - additionalProperties: false - maxProperties: 1 - minProperties: 1 - FilterPredicateRangeOp: - type: object - properties: - $lt: - $ref: '#/components/schemas/FilterRangeValue' - additionalProperties: false - maxProperties: 2 - minProperties: 2 - FilterRangeValue: - oneOf: - - type: number - - type: string - FilterValue: - oneOf: - - type: number - - type: string - - type: boolean \ No newline at end of file diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml deleted file mode 100644 index 9f884c710..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml +++ /dev/null @@ -1,33 +0,0 @@ -openapi: "3.0.3" -info: - title: Recursive refs example - version: "1.0" -paths: - /foo: - $ref: ./paths/foo.yml - /double-ref-foo: - get: - summary: Double ref response - description: Reference response with double reference. - responses: - "400": - $ref: "#/components/responses/400" -components: - schemas: - Foo: - $ref: ./components/Foo.yml - Foo2: - $ref: ./components/Foo/Foo2.yml - Bar: - $ref: ./components/Bar.yml - Cat: - $ref: ./components/Cat.yml - Error: - $ref: ./components/models/error.yaml - responses: - "400": - description: 400 Bad Request - content: - application/json: - schema: - $ref: "#/components/schemas/Error" diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml.internalized.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml.internalized.yml deleted file mode 100644 index 0d508527a..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/openapi.yml.internalized.yml +++ /dev/null @@ -1,110 +0,0 @@ -{ - "components": { - "parameters": { - "number": { - "in": "query", - "name": "someNumber", - "schema": { - "type": "string" - } - } - }, - "responses": { - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - }, - "description": "400 Bad Request" - } - }, - "schemas": { - "Bar": { - "example": "bar", - "type": "string" - }, - "Error":{ - "title":"ErrorDetails", - "type":"object" - }, - "Foo": { - "properties": { - "bar": { - "$ref": "#/components/schemas/Bar" - } - }, - "type": "object" - }, - "Foo2": { - "properties": { - "foo": { - "$ref": "#/components/schemas/Foo" - } - }, - "type": "object" - }, - "error":{ - "title":"ErrorDetails", - "type":"object" - }, - "Cat": { - "properties": { - "cat": { - "$ref": "#/components/schemas/Cat" - } - }, - "type": "object" - } - } - }, - "info": { - "title": "Recursive refs example", - "version": "1.0" - }, - "openapi": "3.0.3", - "paths": { - "/double-ref-foo": { - "get": { - "description": "Reference response with double reference.", - "responses": { - "400": { - "$ref": "#/components/responses/400" - } - }, - "summary": "Double ref response" - } - }, - "/foo": { - "get": { - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "foo2": { - "$ref": "#/components/schemas/Foo2" - } - }, - "type": "object" - } - } - }, - "description": "OK" - }, - "400": { - "$ref": "#/components/responses/400" - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/number" - } - ] - } - } -} diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/parameters/number.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/parameters/number.yml deleted file mode 100644 index 29f0f2640..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/parameters/number.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: someNumber -in: query -schema: - type: string diff --git a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/paths/foo.yml b/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/paths/foo.yml deleted file mode 100644 index 4c845b532..000000000 --- a/vendor/github.com/getkin/kin-openapi/openapi3/testdata/recursiveRef/paths/foo.yml +++ /dev/null @@ -1,15 +0,0 @@ -parameters: - - $ref: ../parameters/number.yml -get: - responses: - "200": - description: OK - content: - application/json: - schema: - type: object - properties: - foo2: - $ref: ../openapi.yml#/components/schemas/Foo2 - "400": - $ref: "../openapi.yml#/components/responses/400" diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.down.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.down.sql deleted file mode 100644 index 4267951a5..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.down.sql +++ /dev/null @@ -1 +0,0 @@ -1 down diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.up.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.up.sql deleted file mode 100644 index 046fd5a5d..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/1_foobar.up.sql +++ /dev/null @@ -1 +0,0 @@ -1 up diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/3_foobar.up.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/3_foobar.up.sql deleted file mode 100644 index 77c1b77dc..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/3_foobar.up.sql +++ /dev/null @@ -1 +0,0 @@ -3 up diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.down.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.down.sql deleted file mode 100644 index b405d8bd0..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.down.sql +++ /dev/null @@ -1 +0,0 @@ -4 down diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.up.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.up.sql deleted file mode 100644 index eba61bb94..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/4_foobar.up.sql +++ /dev/null @@ -1 +0,0 @@ -4 up diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/5_foobar.down.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/5_foobar.down.sql deleted file mode 100644 index 6dc96e206..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/5_foobar.down.sql +++ /dev/null @@ -1 +0,0 @@ -5 down diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.down.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.down.sql deleted file mode 100644 index 46636016b..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.down.sql +++ /dev/null @@ -1 +0,0 @@ -7 down diff --git a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.up.sql b/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.up.sql deleted file mode 100644 index cdbc410ee..000000000 --- a/vendor/github.com/golang-migrate/migrate/v4/source/iofs/testdata/migrations/7_foobar.up.sql +++ /dev/null @@ -1 +0,0 @@ -7 up diff --git a/vendor/github.com/kenshaw/inflector/inflector.go b/vendor/github.com/kenshaw/inflector/inflector.go index fb7e60ba3..2ac42308d 100644 --- a/vendor/github.com/kenshaw/inflector/inflector.go +++ b/vendor/github.com/kenshaw/inflector/inflector.go @@ -3,10 +3,9 @@ // // Example: // -// inflector.Singularize("People") // returns "Person" -// -// inflector.Pluralize("octopus) // returns "octopuses" +// inflector.Singularize("People") // returns "Person" // +// inflector.Pluralize("octopus) // returns "octopuses" package inflector import ( @@ -105,7 +104,7 @@ func init() { {`(?i)(matr|vert|ind)(ix|ex)$`, `${1}ices`}, {`(?i)(x|ch|ss|sh)$`, `${1}es`}, {`(?i)([^aeiouy]|qu)y$`, `${1}ies`}, - {`(?i)(hive)$`, `$1s`}, + {`(?i)(hive)s$`, `$1`}, {`(?i)(?:([^f])fe|([lre])f)$`, `${1}${2}ves`}, {`(?i)sis$`, `ses`}, {`(?i)([ti])um$`, `${1}a`}, @@ -185,6 +184,7 @@ func init() { {`(?i)([^aeiouy]|qu)ies$`, `${1}y`}, {`(?i)(tive)s$`, `$1`}, {`(?i)([lre])ves$`, `${1}f`}, + {`(?i)hives$`, `hive`}, {`(?i)([^fo])ves$`, `${1}fe`}, {`(?i)(hive)s$`, `$1`}, {`(?i)(drive)s$`, `$1`}, diff --git a/vendor/modules.txt b/vendor/modules.txt index 6e377357e..bfab43ff2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -301,8 +301,8 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/kenshaw/inflector v0.2.0 -## explicit; go 1.17 +# github.com/kenshaw/inflector v0.3.0 +## explicit; go 1.22 github.com/kenshaw/inflector # github.com/kenshaw/snaker v0.2.0 ## explicit; go 1.16