• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H07-Feb-2021-

fixtures/H07-Feb-2021-

post/H07-Feb-2021-

.editorconfigH A D07-Feb-2021539

.gitignoreH A D07-Feb-202148

.golangci.ymlH A D07-Feb-2021637

.travis.ymlH A D07-Feb-20212 KiB

CODE_OF_CONDUCT.mdH A D07-Feb-20213.2 KiB

LICENSEH A D07-Feb-202111.1 KiB

README.mdH A D07-Feb-20212 KiB

appveyor.ymlH A D07-Feb-20211.3 KiB

context.goH A D07-Feb-20211.4 KiB

context_test.goH A D07-Feb-20211.1 KiB

debug.goH A D07-Feb-20211.3 KiB

debug_test.goH A D07-Feb-20211.4 KiB

default_validator.goH A D07-Feb-20219.4 KiB

default_validator_test.goH A D07-Feb-20213.6 KiB

doc.goH A D07-Feb-20213.8 KiB

doc_test.goH A D07-Feb-20216 KiB

example_validator.goH A D07-Feb-20219.5 KiB

example_validator_test.goH A D07-Feb-20213.6 KiB

formats.goH A D07-Feb-20211.9 KiB

formats_test.goH A D07-Feb-2021873

go.modH A D07-Feb-2021495

go.sumH A D07-Feb-202131 KiB

helpers.goH A D07-Feb-202110.2 KiB

helpers_test.goH A D07-Feb-20212.1 KiB

items_validator_test.goH A D07-Feb-20218.7 KiB

jsonschema_test.goH A D07-Feb-20216.5 KiB

messages_test.goH A D07-Feb-202114.1 KiB

object_validator.goH A D07-Feb-20219.4 KiB

object_validator_test.goH A D07-Feb-20212.5 KiB

options.goH A D07-Feb-20211.6 KiB

options_test.goH A D07-Feb-2021171

parameter_validator_test.goH A D07-Feb-20217.9 KiB

result.goH A D07-Feb-202113.3 KiB

result_test.goH A D07-Feb-20215.4 KiB

rexp.goH A D07-Feb-20211.6 KiB

rexp_test.goH A D07-Feb-20212.3 KiB

schema.goH A D07-Feb-20217.2 KiB

schema_messages.goH A D07-Feb-20213.6 KiB

schema_option.goH A D07-Feb-20211.8 KiB

schema_option_test.goH A D07-Feb-2021898

schema_props.goH A D07-Feb-20216.9 KiB

schema_props_test.goH A D07-Feb-2021974

schema_test.goH A D07-Feb-20215.9 KiB

slice_validator.goH A D07-Feb-20213 KiB

slice_validator_test.goH A D07-Feb-20211 KiB

spec.goH A D07-Feb-202122.9 KiB

spec_messages.goH A D07-Feb-202118.7 KiB

spec_test.goH A D07-Feb-202126.5 KiB

swagger_test.goH A D07-Feb-20218.1 KiB

type.goH A D07-Feb-20216.5 KiB

type_test.goH A D07-Feb-20217.6 KiB

update-fixtures.shH A D07-Feb-2021392

validator.goH A D07-Feb-202117.7 KiB

validator_test.goH A D07-Feb-20215.8 KiB

values.goH A D07-Feb-202114.4 KiB

values_test.goH A D07-Feb-202114.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