generated fromsv-tools/go-repo-template
- Notifications
You must be signed in to change notification settings - Fork10
OpenAPI v3.1 Spec implementation in Go with generics
License
MIT, Unknown licenses found
Licenses found
MIT
LICENSEUnknown
license.goNotificationsYou must be signed in to change notification settings
sv-tools/openapi
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The implementation of OpenAPI v3.1 Specification for Go using generics.
go get github.com/sv-tools/openapi
- v1.25
- v1.24
- v1.23
- v1.22
- v0 -Deprecated. The initial version with the full implementation of the v3.1 Specification using generics. See the
v0branch. - v1 - The current version with the in-place validation of the specification.
- The minimum version of Go is
v1.22. - Everything has been moved to the root folder. So, the import path is
github.com/sv-tools/openapi. - Added
Validatorstruct for validation of the specification and the data.Validator.ValidateSpec()method validates the specification.Validator.ValidateData()method validates the data.Validator.ValidateDataAsJSON()method validates the data by converting it intomap[string]anytype first usingjson.Marshalandjson.Unmarshal.WARNING: the function is slow due to double conversion.
- Added
ParseObjectfunction to createSchemaBuilderby parsing an object.The function supportsjson,yamlandopenapifield tags for the structs. - Use OpenAPI
v3.1.1by default.
- The minimum version of Go is
The official v3.0 and v3.1examples are tested.In most cases, the v3.0 specification can be converted to v3.1 by changing only the version parameter.
@@ -1,4 +1,4 @@-openapi: "3.0.0"+openapi: "3.1.0"
NOTE: The descriptions of most structures and their fields are taken from the official documentations.
- OpenAPI Specification:https://github.com/OAI/OpenAPI-Specification andhttps://spec.openapis.org/oas/v3.1.0
- JSON Schema:https://json-schema.org/understanding-json-schema/index.html andhttps://json-schema.org/draft/2020-12/json-schema-core.html
- The list of most popular alternatives:https://tools.openapis.org
MIT licensed. See the bundledLICENSE file for more details.
About
OpenAPI v3.1 Spec implementation in Go with generics
Topics
Resources
License
MIT, Unknown licenses found
Licenses found
MIT
LICENSEUnknown
license.goUh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.