{"id":13563310,"url":"https://github.com/getkin/kin-openapi","last_synced_at":"2025-05-12T03:48:23.575Z","repository":{"id":38816442,"uuid":"94029207","full_name":"getkin/kin-openapi","owner":"getkin","description":"OpenAPI 3.0 (and Swagger v2) implementation for Go (parsing, converting, validation, and more)","archived":false,"fork":false,"pushed_at":"2025-05-09T00:19:30.000Z","size":2109,"stargazers_count":2874,"open_issues_count":110,"forks_count":451,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-09T01:25:16.846Z","etag":null,"topics":["api","documentation","golang","hacktoberfest","openapi","openapi2","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["fenollp"]}},"created_at":"2017-06-11T20:12:06.000Z","updated_at":"2025-05-09T00:19:35.000Z","dependencies_parsed_at":"2023-11-08T04:31:04.429Z","dependency_job_id":"d07fe204-84e9-47e2-9f31-5f560f1f73a0","html_url":"https://github.com/getkin/kin-openapi","commit_stats":{"total_commits":553,"total_committers":209,"mean_commits":2.645933014354067,"dds":0.6419529837251357,"last_synced_commit":"c41a06863174e3aa1f5516108781b8c081c9611c"},"previous_names":["jban332/kin-openapi","jban332/kinapi"],"tags_count":136,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getkin%2Fkin-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getkin%2Fkin-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getkin%2Fkin-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getkin%2Fkin-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getkin","download_url":"https://codeload.github.com/getkin/kin-openapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672531,"owners_count":21945475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","documentation","golang","hacktoberfest","openapi","openapi2","openapi3","swagger"],"created_at":"2024-08-01T13:01:17.653Z","updated_at":"2025-05-12T03:48:23.554Z","avatar_url":"https://github.com/getkin.png","language":"Go","funding_links":["https://github.com/sponsors/fenollp"],"categories":["Go","HarmonyOS","api"],"sub_categories":["Windows Manager"],"readme":"[![CI](https://github.com/getkin/kin-openapi/workflows/go/badge.svg)](https://github.com/getkin/kin-openapi/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/getkin/kin-openapi)](https://goreportcard.com/report/github.com/getkin/kin-openapi)\n[![GoDoc](https://godoc.org/github.com/getkin/kin-openapi?status.svg)](https://godoc.org/github.com/getkin/kin-openapi)\n[![Join Gitter Chat Channel -](https://badges.gitter.im/getkin/kin.svg)](https://gitter.im/getkin/kin?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n# Introduction\nA [Go](https://golang.org) project for handling [OpenAPI](https://www.openapis.org/) files. We target:\n* [OpenAPI `v2.0`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) (formerly known as Swagger)\n* [OpenAPI `v3.0`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md)\n* [OpenAPI `v3.1`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md) Soon! [Tracking issue here.](https://github.com/getkin/kin-openapi/issues/230)\n\nLicensed under the [MIT License](./LICENSE).\n\n## Contributors, users and sponsors\nThe project has received pull requests [from many people](https://github.com/getkin/kin-openapi/graphs/contributors). Thanks to everyone!\n\nPlease, [give back to this project](https://github.com/sponsors/fenollp) by becoming a sponsor.\n\nHere's some projects that depend on _kin-openapi_:\n  * [github.com/go-fuego/fuego](https://github.com/go-fuego/fuego) - \"Framework generating OpenAPI 3 spec from source code\"\n  * [github.com/a-h/rest](https://github.com/a-h/rest) - \"Generate OpenAPI 3.0 specifications from Go code without annotations or magic comments\"\n  * [github.com/Tufin/oasdiff](https://github.com/Tufin/oasdiff) - \"A diff tool for OpenAPI Specification 3\"\n  * [github.com/danielgtaylor/apisprout](https://github.com/danielgtaylor/apisprout) - \"Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation\"\n  * [github.com/deepmap/oapi-codegen](https://github.com/deepmap/oapi-codegen) - \"Generate Go client and server boilerplate from OpenAPI 3 specifications\"\n  * [github.com/dunglas/vulcain](https://github.com/dunglas/vulcain) - \"Use HTTP/2 Server Push to create fast and idiomatic client-driven REST APIs\"\n  * [github.com/danielgtaylor/restish](https://github.com/danielgtaylor/restish) - \"...a CLI for interacting with REST-ish HTTP APIs with some nice features built-in\"\n  * [github.com/goadesign/goa](https://github.com/goadesign/goa) - \"Design-based APIs and microservices in Go\"\n  * [github.com/hashicorp/nomad-openapi](https://github.com/hashicorp/nomad-openapi) - \"Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.\"\n  * [gitlab.com/jamietanna/httptest-openapi](https://gitlab.com/jamietanna/httptest-openapi) ([*blog post*](https://www.jvt.me/posts/2022/05/22/go-openapi-contract-test/)) - \"Go OpenAPI Contract Verification for use with `net/http`\"\n  * [github.com/SIMITGROUP/openapigenerator](https://github.com/SIMITGROUP/openapigenerator) - \"Openapi v3 microservices generator\"\n  * [https://github.com/projectsveltos/addon-controller](https://github.com/projectsveltos/addon-controller) - \"Kubernetes add-on controller designed to manage tens of clusters.\"\n  * (Feel free to add your project by [creating an issue](https://github.com/getkin/kin-openapi/issues/new) or a pull request)\n\n## Alternatives\n* [libopenapi](https://github.com/pb33f/libopenapi) a fully featured, high performance OpenAPI 3.1, 3.0 and Swagger parser, library, validator and toolkit\n* [go-swagger](https://github.com/go-swagger/go-swagger) stated [*OpenAPIv3 won't be supported*](https://github.com/go-swagger/go-swagger/issues/1122#issuecomment-575968499)\n* [swaggo](https://github.com/swaggo/swag) has an [open issue on OpenAPIv3](https://github.com/swaggo/swag/issues/386)\n* [go-openapi](https://github.com/go-openapi)'s [spec3](https://github.com/go-openapi/spec3)\n\t* an iteration on [spec](https://github.com/go-openapi/spec) (for OpenAPIv2)\n\t* see [README](https://github.com/go-openapi/spec3/tree/3fab9faa9094e06ebd19ded7ea96d156c2283dca#oai-object-model---) for the missing parts\n\nBe sure to check [OpenAPI Initiative](https://github.com/OAI)'s [great tooling list](https://github.com/OAI/OpenAPI-Specification/blob/master/IMPLEMENTATIONS.md) as well as [OpenAPI.Tools](https://openapi.tools/).\n\n# Structure\n  * _openapi2_ ([godoc](https://godoc.org/github.com/getkin/kin-openapi/openapi2))\n    * Support for OpenAPI 2 files, including serialization, deserialization, and validation.\n  * _openapi2conv_ ([godoc](https://godoc.org/github.com/getkin/kin-openapi/openapi2conv))\n    * Converts OpenAPI 2 files into OpenAPI 3 files.\n  * _openapi3_ ([godoc](https://godoc.org/github.com/getkin/kin-openapi/openapi3))\n    * Support for OpenAPI 3 files, including serialization, deserialization, and validation.\n  * _openapi3filter_ ([godoc](https://godoc.org/github.com/getkin/kin-openapi/openapi3filter))\n    * Validates HTTP requests and responses\n    * Provides a [gorilla/mux](https://github.com/gorilla/mux) router for OpenAPI operations\n  * _openapi3gen_ ([godoc](https://godoc.org/github.com/getkin/kin-openapi/openapi3gen))\n    * Generates `*openapi3.Schema` values for Go types.\n\n# Some recipes\n## Validating an OpenAPI document\n```shell\ngo run github.com/getkin/kin-openapi/cmd/validate@latest [--circular] [--defaults] [--examples] [--ext] [--patterns] -- \u003clocal YAML or JSON file\u003e\n```\n\n## Loading OpenAPI document\nUse `openapi3.Loader`, which resolves all references:\n```go\nloader := openapi3.NewLoader()\ndoc, err := loader.LoadFromFile(\"my-openapi-spec.json\")\n```\n\n## Getting OpenAPI operation that matches request\n```go\nloader := openapi3.NewLoader()\ndoc, _ := loader.LoadFromData([]byte(`...`))\n_ = doc.Validate(loader.Context)\nrouter, _ := gorillamux.NewRouter(doc)\nroute, pathParams, _ := router.FindRoute(httpRequest)\n// Do something with route.Operation\n```\n\n## Validating HTTP requests/responses\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/getkin/kin-openapi/openapi3\"\n\t\"github.com/getkin/kin-openapi/openapi3filter\"\n\t\"github.com/getkin/kin-openapi/routers/gorillamux\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tloader := \u0026openapi3.Loader{Context: ctx, IsExternalRefsAllowed: true}\n\tdoc, _ := loader.LoadFromFile(\".../My-OpenAPIv3-API.yml\")\n\t// Validate document\n\t_ = doc.Validate(ctx)\n\trouter, _ := gorillamux.NewRouter(doc)\n\thttpReq, _ := http.NewRequest(http.MethodGet, \"/items\", nil)\n\n\t// Find route\n\troute, pathParams, _ := router.FindRoute(httpReq)\n\n\t// Validate request\n\trequestValidationInput := \u0026openapi3filter.RequestValidationInput{\n\t\tRequest:    httpReq,\n\t\tPathParams: pathParams,\n\t\tRoute:      route,\n\t}\n\t_ = openapi3filter.ValidateRequest(ctx, requestValidationInput)\n\n\t// Handle that request\n\t// --\u003e YOUR CODE GOES HERE \u003c--\n\tresponseHeaders := http.Header{\"Content-Type\": []string{\"application/json\"}}\n\tresponseCode := 200\n\tresponseBody := []byte(`{}`)\n\n\t// Validate response\n\tresponseValidationInput := \u0026openapi3filter.ResponseValidationInput{\n\t\tRequestValidationInput: requestValidationInput,\n\t\tStatus:                 responseCode,\n\t\tHeader:                 responseHeaders,\n\t}\n\tresponseValidationInput.SetBodyBytes(responseBody)\n\t_ = openapi3filter.ValidateResponse(ctx, responseValidationInput)\n}\n```\n\n## Custom content type for body of HTTP request/response\n\nBy default, the library parses a body of the HTTP request and response of [a few content types](https://github.com/getkin/kin-openapi/blob/6da871e0e170b7637eb568c265c08bc2b5d6e7a3/openapi3filter/req_resp_decoder.go#L1264) e.g. `\"text/plain\"` or `\"application/json\"`.\nTo support other content types you must register decoders for them:\n\n```go\nfunc main() {\n\t// ...\n\n\t// Register a body's decoder for content type \"application/xml\".\n\topenapi3filter.RegisterBodyDecoder(\"application/xml\", xmlBodyDecoder)\n\n\t// Now you can validate HTTP request that contains a body with content type \"application/xml\".\n\trequestValidationInput := \u0026openapi3filter.RequestValidationInput{\n\t\tRequest:    httpReq,\n\t\tPathParams: pathParams,\n\t\tRoute:      route,\n\t}\n\tif err := openapi3filter.ValidateRequest(ctx, requestValidationInput); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// ...\n\n\t// And you can validate HTTP response that contains a body with content type \"application/xml\".\n\tif err := openapi3filter.ValidateResponse(ctx, responseValidationInput); err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc xmlBodyDecoder(body io.Reader, h http.Header, schema *openapi3.SchemaRef, encFn openapi3filter.EncodingFn) (decoded any, err error) {\n\t// Decode body to a primitive, []any, or map[string]any.\n}\n```\n\n## Custom function to check uniqueness of array items\n\nBy default, the library checks unique items using the following predefined function:\n\n```go\nfunc isSliceOfUniqueItems(xs []any) bool {\n\ts := len(xs)\n\tm := make(map[string]struct{}, s)\n\tfor _, x := range xs {\n\t\tkey, _ := json.Marshal(\u0026x)\n\t\tm[string(key)] = struct{}{}\n\t}\n\treturn s == len(m)\n}\n```\n\nIn the predefined function `json.Marshal` is used to generate a string that can\nbe used as a map key which is to check the uniqueness of an array\nwhen the array items are objects or arrays. You can register\nyou own function according to your input data to get better performance:\n\n```go\nfunc main() {\n\t// ...\n\n\t// Register a customized function used to check uniqueness of array.\n\topenapi3.RegisterArrayUniqueItemsChecker(arrayUniqueItemsChecker)\n\n\t// ... other validate codes\n}\n\nfunc arrayUniqueItemsChecker(items []any) bool {\n\t// Check the uniqueness of the input slice\n}\n```\n\n## Custom function to change schema error messages\n\nBy default, the error message returned when validating a value includes the error reason, the schema, and the input value.\n\nFor example, given the following schema:\n\n```json\n{\n  \"type\": \"string\",\n  \"allOf\": [\n    { \"pattern\": \"[A-Z]\" },\n    { \"pattern\": \"[a-z]\" },\n    { \"pattern\": \"[0-9]\" },\n    { \"pattern\": \"[!@#$%^\u0026*()_+=-?~]\" }\n  ]\n}\n```\n\nPassing the input value `\"secret\"` to this schema will produce the following error message:\n\n```\nstring doesn't match the regular expression \"[A-Z]\"\nSchema:\n  {\n    \"pattern\": \"[A-Z]\"\n  }\n\nValue:\n  \"secret\"\n```\n\nIncluding the original value in the error message can be helpful for debugging, but it may not be appropriate for sensitive information such as secrets.\n\nTo disable the extra details in the schema error message, you can set the `openapi3.SchemaErrorDetailsDisabled` option to `true`:\n\n```go\nfunc main() {\n\t// ...\n\n\t// Disable schema error detailed error messages\n\topenapi3.SchemaErrorDetailsDisabled = true\n\n\t// ... other validate codes\n}\n```\n\nThis will shorten the error message to present only the reason:\n\n```\nstring doesn't match the regular expression \"[A-Z]\"\n```\n\nFor more fine-grained control over the error message, you can pass a custom `openapi3filter.Options` object to `openapi3filter.RequestValidationInput` that includes a `openapi3filter.CustomSchemaErrorFunc`.\n\n```go\nfunc validationOptions() *openapi3filter.Options {\n\toptions := \u0026openapi3filter.Options{}\n\toptions.WithCustomSchemaErrorFunc(safeErrorMessage)\n\treturn options\n}\n\nfunc safeErrorMessage(err *openapi3.SchemaError) string {\n\treturn err.Reason\n}\n```\n\nThis will change the schema validation errors to return only the `Reason` field, which is guaranteed to not include the original value.\n\n## Reconciling component $ref types\n\n`ReferencesComponentInRootDocument` is a useful helper function to check if a component reference\ncoincides with a reference in the root document's component objects fixed fields.\n\nThis can be used to determine if two schema definitions are of the same structure, helpful for\ncode generation tools when generating go type models.\n\n```go\ndoc, err = loader.LoadFromFile(\"openapi.yml\")\n\nfor _, path := range doc.Paths.InMatchingOrder() {\n\tpathItem := doc.Paths.Find(path)\n\n\tif pathItem.Get == nil || pathItem.Get.Responses.Status(200) {\n\t\tcontinue\n\t}\n\n\tfor _, s := range pathItem.Get.Responses.Status(200).Value.Content {\n\t\tname, match := ReferencesComponentInRootDocument(doc, s.Schema)\n\t\tfmt.Println(path, match, name) // /record true #/components/schemas/BookRecord\n\t}\n}\n```\n\n## CHANGELOG: Sub-v1 breaking API changes\n\n### v0.131.0\n* No longer `openapi3filter.RegisterBodyDecoder` the `openapi3filter.ZipFileBodyDecoder` by default.\n\n### v0.129.0\n* `openapi3.Discriminator.Mapping` and `openapi3.OAuthFlow.Scopes` fields went from a `map[string]string` to the new type `StringMap`\n\n### v0.127.0\n* Downgraded `github.com/gorilla/mux` dep from `1.8.1` to `1.8.0`.\n\n### v0.126.0\n* `openapi3.CircularReferenceError` and `openapi3.CircularReferenceCounter` are removed. `openapi3.Loader` now implements reference backtracking, so any kind of circular references should be properly resolved.\n* `InternalizeRefs` now takes a refNameResolver that has access to `openapi3.T` and more properties of the reference needing resolving.\n* The `DefaultRefNameResolver` has been updated, choosing names that will be less likely to collide with each other. Because of this internalized specs will likely change slightly.\n* `openapi3.Format` and `openapi3.FormatCallback` are removed and the type of `openapi3.SchemaStringFormats` has changed.\n\n### v0.125.0\n* The `openapi3filter.ErrFunc` and `openapi3filter.LogFunc` func types now take the validated request's context as first argument.\n\n### v0.124.0\n* `openapi3.Schema.Type` \u0026 `openapi2.Parameter.Type` fields went from a `string` to the type `*Type` with methods: `Includes`, `Is`, `Permits` \u0026 `Slice`.\n\n### v0.122.0\n* `Paths` field of `openapi3.T` is now a pointer\n* `Responses` field of `openapi3.Operation` is now a pointer\n* `openapi3.Paths` went from `map[string]*PathItem` to a struct with an `Extensions` field and methods: `Set`, `Value`, `Len`, `Map`, and `New*`.\n* `openapi3.Callback` went from `map[string]*PathItem` to a struct with an `Extensions` field and methods: `Set`, `Value`, `Len`, `Map`, and `New*`.\n* `openapi3.Responses` went from `map[string]*ResponseRef` to a struct with an `Extensions` field and methods: `Set`, `Value`, `Len`, `Map`, and `New*`.\n* `(openapi3.Responses).Get(int)` renamed to `(*openapi3.Responses).Status(int)`\n\n### v0.121.0\n* Introduce `openapi3.RequestBodies` (an alias on `map[string]*openapi3.ResponseRef`) and use it in place of `openapi3.Responses` for field `openapi3.Components.Responses`.\n\n### v0.116.0\n* Dropped `openapi3filter.DefaultOptions`. Use `\u0026openapi3filter.Options{}` directly instead.\n\n### v0.113.0\n* The string format `email` has been removed by default. To use it please call `openapi3.DefineStringFormat(\"email\", openapi3.FormatOfStringForEmail)`.\n* Field `openapi3.T.Components` is now a pointer.\n* Fields `openapi3.Schema.AdditionalProperties` and `openapi3.Schema.AdditionalPropertiesAllowed` are replaced by `openapi3.Schema.AdditionalProperties.Schema` and `openapi3.Schema.AdditionalProperties.Has` respectively.\n* Type `openapi3.ExtensionProps` is now just `map[string]any` and extensions are accessible through the `Extensions` field.\n\n### v0.112.0\n* `(openapi3.ValidationOptions).ExamplesValidationDisabled` has been unexported.\n* `(openapi3.ValidationOptions).SchemaFormatValidationEnabled` has been unexported.\n* `(openapi3.ValidationOptions).SchemaPatternValidationDisabled` has been unexported.\n\n### v0.111.0\n* Changed `func (*_) Validate(ctx context.Context) error` to `func (*_) Validate(ctx context.Context, opts ...ValidationOption) error`.\n* `openapi3.WithValidationOptions(ctx context.Context, opts *ValidationOptions) context.Context` prototype changed to `openapi3.WithValidationOptions(ctx context.Context, opts ...ValidationOption) context.Context`.\n\n### v0.101.0\n* `openapi3.SchemaFormatValidationDisabled` has been removed in favour of an option `openapi3.EnableSchemaFormatValidation()` passed to `openapi3.T.Validate`. The default behaviour is also now to not validate formats, as the OpenAPI spec mentions the `format` is an open value.\n\n### v0.84.0\n* The prototype of `openapi3gen.NewSchemaRefForValue` changed:\n\t* It no longer returns a map but that is still accessible under the field `(*Generator).SchemaRefs`.\n\t* It now takes in an additional argument (basically `doc.Components.Schemas`) which gets written to so `$ref` cycles can be properly handled.\n\n### v0.61.0\n* Renamed `openapi2.Swagger` to `openapi2.T`.\n* Renamed `openapi2conv.FromV3Swagger` to `openapi2conv.FromV3`.\n* Renamed `openapi2conv.ToV3Swagger` to `openapi2conv.ToV3`.\n* Renamed `openapi3.LoadSwaggerFromData` to `openapi3.LoadFromData`.\n* Renamed `openapi3.LoadSwaggerFromDataWithPath` to `openapi3.LoadFromDataWithPath`.\n* Renamed `openapi3.LoadSwaggerFromFile` to `openapi3.LoadFromFile`.\n* Renamed `openapi3.LoadSwaggerFromURI` to `openapi3.LoadFromURI`.\n* Renamed `openapi3.NewSwaggerLoader` to `openapi3.NewLoader`.\n* Renamed `openapi3.Swagger` to `openapi3.T`.\n* Renamed `openapi3.SwaggerLoader` to `openapi3.Loader`.\n* Renamed `openapi3filter.ValidationHandler.SwaggerFile` to `openapi3filter.ValidationHandler.File`.\n* Renamed `routers.Route.Swagger` to `routers.Route.Spec`.\n\n### v0.51.0\n* Type `openapi3filter.Route` moved to `routers` (and `Route.Handler` was dropped. See https://github.com/getkin/kin-openapi/issues/329)\n* Type `openapi3filter.RouteError` moved to `routers` (so did `ErrPathNotFound` and `ErrMethodNotAllowed` which are now `RouteError`s)\n* Routers' `FindRoute(...)` method now takes only one argument: `*http.Request`\n* `getkin/kin-openapi/openapi3filter.Router` moved to `getkin/kin-openapi/routers/legacy`\n* `openapi3filter.NewRouter()` and its related `WithSwaggerFromFile(string)`, `WithSwagger(*openapi3.Swagger)`, `AddSwaggerFromFile(string)` and `AddSwagger(*openapi3.Swagger)` are all replaced with a single `\u003crouter package\u003e.NewRouter(*openapi3.Swagger)`\n\t* NOTE: the `NewRouter(doc)` call now requires that the user ensures `doc` is valid (`doc.Validate() != nil`). This used to be asserted.\n\n### v0.47.0\nField `(*openapi3.SwaggerLoader).LoadSwaggerFromURIFunc` of type `func(*openapi3.SwaggerLoader, *url.URL) (*openapi3.Swagger, error)` was removed after the addition of the field `(*openapi3.SwaggerLoader).ReadFromURIFunc` of type `func(*openapi3.SwaggerLoader, *url.URL) ([]byte, error)`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetkin%2Fkin-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetkin%2Fkin-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetkin%2Fkin-openapi/lists"}