go-openapi/validate

GitHub: go-openapi/validate

Stars: 144 | Forks: 55

# validate [![Tests](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/78885fc531022550.svg)][test-url] [![Coverage](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)][cov-url] [![CI vuln scan](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/6672ddad59022551.svg)][vuln-scan-url] [![CodeQL](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/a077d33436022552.svg)][codeql-url] [![Release](https://badge.fury.io/gh/go-openapi%2Fvalidate.svg)][release-url] [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/validate)][gocard-url] [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/go-openapi/validate)][codefactor-url] [![License](http://img.shields.io/badge/license-Apache%20v2-orange.svg)][license-url] [![GoDoc](https://pkg.go.dev/badge/github.com/go-openapi/validate)][godoc-url] [![Discord Channel](https://img.shields.io/discord/1446918742398341256?logo=discord&label=discord&color=blue)][discord-url] [![go version](https://img.shields.io/github/go-mod/go-version/go-openapi/validate)][goversion-url] ![Top language](https://img.shields.io/github/languages/top/go-openapi/validate) ![Commits since latest release](https://img.shields.io/github/commits-since/go-openapi/validate/latest) A validator for OpenAPI v2 specifications and JSON schema draft 4. ## Announcements Or join our Slack channel: [![Slack Channel](https://a.slack-edge.com/e6a93c1/img/icons/favicon-32.png)![slack-badge]][slack-url] ## Status API is stable. ## Import this library in your project go get github.com/go-openapi/validate ## Contents This package provides helpers to validate Swagger 2.0. specification (aka OpenAPI 2.0). * A validator for Swagger specifications * A validator for JSON schemas draft4 * Helper functions to validate individual values (used by code generated by [go-swagger](https://github.com/go-swagger/go-swagger)). * Required, RequiredNumber, RequiredString * ReadOnly * UniqueItems, MaxItems, MinItems * Enum, EnumCase * Pattern, MinLength, MaxLength * Minimum, Maximum, MultipleOf * FormatOf ### FAQ ## Change log See ## References ## Licensing This library ships under the [SPDX-License-Identifier: Apache-2.0](./LICENSE). ## Other documentation ## Cutting a new release Maintainers can cut a new release by either: * running [this workflow](https://github.com/go-openapi/validate/actions/workflows/bump-release.yml) * or pushing a semver tag * signed tags are preferred * The tag message is prepended to release notes
标签:EVTX分析