GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - go-openapi/validate: openapi toolkit validation helpers

BranchesTags
Open more actions menu

Latest commit

 

History

447 Commits
447 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.github
.github
 
 
docs
docs
 
 
hack
hack
 
 
post
post
 
 
testdata
testdata
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
AGENTS.md
AGENTS.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTORS.md
CONTRIBUTORS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
benchmark_test.go
benchmark_test.go
 
 
collection_format.go
collection_format.go
 
 
collection_format_test.go
collection_format_test.go
 
 
context.go
context.go
 
 
context_test.go
context_test.go
 
 
debug.go
debug.go
 
 
debug_test.go
debug_test.go
 
 
default_validator.go
default_validator.go
 
 
default_validator_test.go
default_validator_test.go
 
 
deterministic_test.go
deterministic_test.go
 
 
discriminator.go
discriminator.go
 
 
discriminator_test.go
discriminator_test.go
 
 
doc.go
doc.go
 
 
doc_test.go
doc_test.go
 
 
error_location_test.go
error_location_test.go
 
 
example_validator.go
example_validator.go
 
 
example_validator_test.go
example_validator_test.go
 
 
formats.go
formats.go
 
 
formats_test.go
formats_test.go
 
 
gen_expectations_test.go
gen_expectations_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
helpers.go
helpers.go
 
 
helpers_test.go
helpers_test.go
 
 
items_validator_test.go
items_validator_test.go
 
 
jsonschema_test.go
jsonschema_test.go
 
 
messages_test.go
messages_test.go
 
 
object_validator.go
object_validator.go
 
 
object_validator_test.go
object_validator_test.go
 
 
options.go
options.go
 
 
options_test.go
options_test.go
 
 
param_locations.go
param_locations.go
 
 
param_locations_test.go
param_locations_test.go
 
 
parameter_validator_test.go
parameter_validator_test.go
 
 
path.go
path.go
 
 
path_test.go
path_test.go
 
 
pointer_conformance_test.go
pointer_conformance_test.go
 
 
pointer_resolution_test.go
pointer_resolution_test.go
 
 
pools.go
pools.go
 
 
pools_leak_test.go
pools_leak_test.go
 
 
pools_test.go
pools_test.go
 
 
ref_locations.go
ref_locations.go
 
 
ref_locations_test.go
ref_locations_test.go
 
 
ref_redirects.go
ref_redirects.go
 
 
ref_redirects_test.go
ref_redirects_test.go
 
 
required_walk.go
required_walk.go
 
 
required_walk_test.go
required_walk_test.go
 
 
resolvable.go
resolvable.go
 
 
resolvable_test.go
resolvable_test.go
 
 
result.go
result.go
 
 
result_location_test.go
result_location_test.go
 
 
result_test.go
result_test.go
 
 
rexp.go
rexp.go
 
 
rexp_test.go
rexp_test.go
 
 
schema.go
schema.go
 
 
schema_composition_test.go
schema_composition_test.go
 
 
schema_loader_test.go
schema_loader_test.go
 
 
schema_messages.go
schema_messages.go
 
 
schema_option.go
schema_option.go
 
 
schema_option_test.go
schema_option_test.go
 
 
schema_props.go
schema_props.go
 
 
schema_props_test.go
schema_props_test.go
 
 
schema_test.go
schema_test.go
 
 
security_requirements.go
security_requirements.go
 
 
security_requirements_test.go
security_requirements_test.go
 
 
slice_validator.go
slice_validator.go
 
 
slice_validator_test.go
slice_validator_test.go
 
 
sorted.go
sorted.go
 
 
spec.go
spec.go
 
 
spec_messages.go
spec_messages.go
 
 
spec_ref_warnings.go
spec_ref_warnings.go
 
 
spec_ref_warnings_test.go
spec_ref_warnings_test.go
 
 
spec_test.go
spec_test.go
 
 
swagger_test.go
swagger_test.go
 
 
type.go
type.go
 
 
type_test.go
type_test.go
 
 
validator.go
validator.go
 
 
validator_test.go
validator_test.go
 
 
values.go
values.go
 
 
values_test.go
values_test.go
 
 

Repository files navigation

validate

Tests Coverage CI vuln scan CodeQL

Release CodeFactor Grade License

GoDoc Discord Channel go version Top language Commits since latest release


A validator for OpenAPI v2 specifications and JSON schema draft 4.

Announcements

  • 2025-12-19 : new community chat on discord
    • a new discord community channel is available to be notified of changes and support users

You may join the discord community by clicking the invite link on the discord badge (also above). Discord Channel

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).
    • Required, RequiredNumber, RequiredString
    • ReadOnly
    • UniqueItems, MaxItems, MinItems
    • Enum, EnumCase
    • Pattern, MinLength, MaxLength
    • Minimum, Maximum, MultipleOf
    • FormatOf

FAQ

  • Does this library support OpenAPI 3?

No. This package currently only supports OpenAPI 2.0 (aka Swagger 2.0). There is no plan to make it evolve toward supporting OpenAPI 3.x. This discussion thread relates the full story.

An early attempt to support Swagger 3 may be found at: https://github.com/go-openapi/spec3

Change log

See https://github.com/go-openapi/validate/releases

References

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md

Licensing

This library ships under the SPDX-License-Identifier: Apache-2.0.

Other documentation

  • All-time contributors
  • Contributing guidelines
  • Maintainers documentation
  • Code style

Cutting a new release

Maintainers can cut a new release by either:

  • running this workflow
  • or pushing a semver tag
    • signed tags are preferred
    • The tag message is prepended to release notes

About

openapi toolkit validation helpers

Topics

openapiswagger2

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

147 stars

Watchers

6 watching

Forks

57 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.