podman/test/tools/vendor/github.com/go-openapi/validate
Paul Holzinger 5e9725983d
install swagger from source
First of all this removes the need for a network connection, second
renovate can update the version as it is tracked in go.mod.

However the real important part is that the binary downloads are
broken[1]. For some reason the swagger created with them does not
include all the type information for the examples. However when building
from source the same thing works fine.

[1] https://github.com/go-swagger/go-swagger/issues/2842

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-12 15:26:34 +02:00
..
.editorconfig install swagger from source 2024-04-12 15:26:34 +02:00
.gitattributes install swagger from source 2024-04-12 15:26:34 +02:00
.gitignore install swagger from source 2024-04-12 15:26:34 +02:00
.golangci.yml install swagger from source 2024-04-12 15:26:34 +02:00
CODE_OF_CONDUCT.md install swagger from source 2024-04-12 15:26:34 +02:00
LICENSE install swagger from source 2024-04-12 15:26:34 +02:00
README.md install swagger from source 2024-04-12 15:26:34 +02:00
appveyor.yml install swagger from source 2024-04-12 15:26:34 +02:00
context.go install swagger from source 2024-04-12 15:26:34 +02:00
debug.go install swagger from source 2024-04-12 15:26:34 +02:00
default_validator.go install swagger from source 2024-04-12 15:26:34 +02:00
doc.go install swagger from source 2024-04-12 15:26:34 +02:00
example_validator.go install swagger from source 2024-04-12 15:26:34 +02:00
formats.go install swagger from source 2024-04-12 15:26:34 +02:00
helpers.go install swagger from source 2024-04-12 15:26:34 +02:00
object_validator.go install swagger from source 2024-04-12 15:26:34 +02:00
options.go install swagger from source 2024-04-12 15:26:34 +02:00
result.go install swagger from source 2024-04-12 15:26:34 +02:00
rexp.go install swagger from source 2024-04-12 15:26:34 +02:00
schema.go install swagger from source 2024-04-12 15:26:34 +02:00
schema_messages.go install swagger from source 2024-04-12 15:26:34 +02:00
schema_option.go install swagger from source 2024-04-12 15:26:34 +02:00
schema_props.go install swagger from source 2024-04-12 15:26:34 +02:00
slice_validator.go install swagger from source 2024-04-12 15:26:34 +02:00
spec.go install swagger from source 2024-04-12 15:26:34 +02:00
spec_messages.go install swagger from source 2024-04-12 15:26:34 +02:00
type.go install swagger from source 2024-04-12 15:26:34 +02:00
update-fixtures.sh install swagger from source 2024-04-12 15:26:34 +02:00
validator.go install swagger from source 2024-04-12 15:26:34 +02:00
values.go install swagger from source 2024-04-12 15:26:34 +02:00

README.md

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