Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.github/ | H | 07-Feb-2021 | - | |||
fixtures/ | H | 07-Feb-2021 | - | |||
post/ | H | 07-Feb-2021 | - | |||
.editorconfig | H A D | 07-Feb-2021 | 539 | |||
.gitignore | H A D | 07-Feb-2021 | 48 | |||
.golangci.yml | H A D | 07-Feb-2021 | 637 | |||
.travis.yml | H A D | 07-Feb-2021 | 2 KiB | |||
CODE_OF_CONDUCT.md | H A D | 07-Feb-2021 | 3.2 KiB | |||
LICENSE | H A D | 07-Feb-2021 | 11.1 KiB | |||
README.md | H A D | 07-Feb-2021 | 2 KiB | |||
appveyor.yml | H A D | 07-Feb-2021 | 1.3 KiB | |||
context.go | H A D | 07-Feb-2021 | 1.4 KiB | |||
context_test.go | H A D | 07-Feb-2021 | 1.1 KiB | |||
debug.go | H A D | 07-Feb-2021 | 1.3 KiB | |||
debug_test.go | H A D | 07-Feb-2021 | 1.4 KiB | |||
default_validator.go | H A D | 07-Feb-2021 | 9.4 KiB | |||
default_validator_test.go | H A D | 07-Feb-2021 | 3.6 KiB | |||
doc.go | H A D | 07-Feb-2021 | 3.8 KiB | |||
doc_test.go | H A D | 07-Feb-2021 | 6 KiB | |||
example_validator.go | H A D | 07-Feb-2021 | 9.5 KiB | |||
example_validator_test.go | H A D | 07-Feb-2021 | 3.6 KiB | |||
formats.go | H A D | 07-Feb-2021 | 1.9 KiB | |||
formats_test.go | H A D | 07-Feb-2021 | 873 | |||
go.mod | H A D | 07-Feb-2021 | 495 | |||
go.sum | H A D | 07-Feb-2021 | 31 KiB | |||
helpers.go | H A D | 07-Feb-2021 | 10.2 KiB | |||
helpers_test.go | H A D | 07-Feb-2021 | 2.1 KiB | |||
items_validator_test.go | H A D | 07-Feb-2021 | 8.7 KiB | |||
jsonschema_test.go | H A D | 07-Feb-2021 | 6.5 KiB | |||
messages_test.go | H A D | 07-Feb-2021 | 14.1 KiB | |||
object_validator.go | H A D | 07-Feb-2021 | 9.4 KiB | |||
object_validator_test.go | H A D | 07-Feb-2021 | 2.5 KiB | |||
options.go | H A D | 07-Feb-2021 | 1.6 KiB | |||
options_test.go | H A D | 07-Feb-2021 | 171 | |||
parameter_validator_test.go | H A D | 07-Feb-2021 | 7.9 KiB | |||
result.go | H A D | 07-Feb-2021 | 13.3 KiB | |||
result_test.go | H A D | 07-Feb-2021 | 5.4 KiB | |||
rexp.go | H A D | 07-Feb-2021 | 1.6 KiB | |||
rexp_test.go | H A D | 07-Feb-2021 | 2.3 KiB | |||
schema.go | H A D | 07-Feb-2021 | 7.2 KiB | |||
schema_messages.go | H A D | 07-Feb-2021 | 3.6 KiB | |||
schema_option.go | H A D | 07-Feb-2021 | 1.8 KiB | |||
schema_option_test.go | H A D | 07-Feb-2021 | 898 | |||
schema_props.go | H A D | 07-Feb-2021 | 6.9 KiB | |||
schema_props_test.go | H A D | 07-Feb-2021 | 974 | |||
schema_test.go | H A D | 07-Feb-2021 | 5.9 KiB | |||
slice_validator.go | H A D | 07-Feb-2021 | 3 KiB | |||
slice_validator_test.go | H A D | 07-Feb-2021 | 1 KiB | |||
spec.go | H A D | 07-Feb-2021 | 22.9 KiB | |||
spec_messages.go | H A D | 07-Feb-2021 | 18.7 KiB | |||
spec_test.go | H A D | 07-Feb-2021 | 26.5 KiB | |||
swagger_test.go | H A D | 07-Feb-2021 | 8.1 KiB | |||
type.go | H A D | 07-Feb-2021 | 6.5 KiB | |||
type_test.go | H A D | 07-Feb-2021 | 7.6 KiB | |||
update-fixtures.sh | H A D | 07-Feb-2021 | 392 | |||
validator.go | H A D | 07-Feb-2021 | 17.7 KiB | |||
validator_test.go | H A D | 07-Feb-2021 | 5.8 KiB | |||
values.go | H A D | 07-Feb-2021 | 14.4 KiB | |||
values_test.go | H A D | 07-Feb-2021 | 14.1 KiB |
README.md
1# Validation helpers 2[![Build Status](https://travis-ci.org/go-openapi/validate.svg?branch=master)](https://travis-ci.org/go-openapi/validate) 3[![Build status](https://ci.appveyor.com/api/projects/status/d6epy6vipueyh5fs/branch/master?svg=true)](https://ci.appveyor.com/project/fredbi/validate/branch/master) 4[![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) 5[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 6[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/validate/master/LICENSE) 7[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/validate.svg)](https://pkg.go.dev/github.com/go-openapi/validate) 8[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/validate)](https://goreportcard.com/report/github.com/go-openapi/validate) 9 10This package provides helpers to validate Swagger 2.0. specification (aka OpenAPI 2.0). 11 12Reference can be found here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md. 13 14## What's inside? 15 16* A validator for Swagger specifications 17* A validator for JSON schemas draft4 18* Helper functions to validate individual values (used by code generated by [go-swagger](https://github.com/go-swagger/go-swagger)). 19 * Required, RequiredNumber, RequiredString 20 * ReadOnly 21 * UniqueItems, MaxItems, MinItems 22 * Enum, EnumCase 23 * Pattern, MinLength, MaxLength 24 * Minimum, Maximum, MultipleOf 25 * FormatOf 26 27[Documentation](https://godoc.org/github.com/go-openapi/validate) 28 29## FAQ 30 31* Does this library support OpenAPI 3? 32 33> No. 34> This package currently only supports OpenAPI 2.0 (aka Swagger 2.0). 35> There is no plan to make it evolve toward supporting OpenAPI 3.x. 36> This [discussion thread](https://github.com/go-openapi/spec/issues/21) relates the full story. 37> 38> An early attempt to support Swagger 3 may be found at: https://github.com/go-openapi/spec3 39