peridot/vendor/github.com/go-openapi/validate
2022-07-07 22:13:21 +02:00
..
.editorconfig Initial commit 2022-07-07 22:13:21 +02:00
.gitignore Initial commit 2022-07-07 22:13:21 +02:00
.golangci.yml Initial commit 2022-07-07 22:13:21 +02:00
.travis.yml Initial commit 2022-07-07 22:13:21 +02:00
appveyor.yml Initial commit 2022-07-07 22:13:21 +02:00
BUILD.bazel Initial commit 2022-07-07 22:13:21 +02:00
CODE_OF_CONDUCT.md Initial commit 2022-07-07 22:13:21 +02:00
context.go Initial commit 2022-07-07 22:13:21 +02:00
debug.go Initial commit 2022-07-07 22:13:21 +02:00
default_validator.go Initial commit 2022-07-07 22:13:21 +02:00
doc.go Initial commit 2022-07-07 22:13:21 +02:00
example_validator.go Initial commit 2022-07-07 22:13:21 +02:00
formats.go Initial commit 2022-07-07 22:13:21 +02:00
go.mod Initial commit 2022-07-07 22:13:21 +02:00
go.sum Initial commit 2022-07-07 22:13:21 +02:00
helpers.go Initial commit 2022-07-07 22:13:21 +02:00
LICENSE Initial commit 2022-07-07 22:13:21 +02:00
object_validator.go Initial commit 2022-07-07 22:13:21 +02:00
options.go Initial commit 2022-07-07 22:13:21 +02:00
README.md Initial commit 2022-07-07 22:13:21 +02:00
result.go Initial commit 2022-07-07 22:13:21 +02:00
rexp.go Initial commit 2022-07-07 22:13:21 +02:00
schema.go Initial commit 2022-07-07 22:13:21 +02:00
schema_messages.go Initial commit 2022-07-07 22:13:21 +02:00
schema_option.go Initial commit 2022-07-07 22:13:21 +02:00
schema_props.go Initial commit 2022-07-07 22:13:21 +02:00
slice_validator.go Initial commit 2022-07-07 22:13:21 +02:00
spec.go Initial commit 2022-07-07 22:13:21 +02:00
spec_messages.go Initial commit 2022-07-07 22:13:21 +02:00
type.go Initial commit 2022-07-07 22:13:21 +02:00
update-fixtures.sh Initial commit 2022-07-07 22:13:21 +02:00
validator.go Initial commit 2022-07-07 22:13:21 +02:00
values.go Initial commit 2022-07-07 22:13:21 +02:00

Validation helpers

Build Status Build status codecov Slack Status license Go Reference Go Report Card

This package provides helpers to validate Swagger 2.0. specification (aka OpenAPI 2.0).

Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md.

What's inside?

  • 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

Documentation

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