Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pb33f/libopenapi-validator

Repository files navigation

libopenapi

Enterprise grade OpenAPI validation tools for golang.

Pipeline codecov discord Docs

A validation module for libopenapi.

libopenapi-validator will validate the following elements against an OpenAPI 3+ specification

  • http.Request - Validates the request against the OpenAPI specification
  • http.Response - Validates the response against the OpenAPI specification
  • libopenapi.Document - Validates the OpenAPI document against the OpenAPI specification
  • base.Schema - Validates a schema against a JSON or YAML blob / unmarshalled object

πŸ‘‰πŸ‘‰ Check out the full documentation πŸ‘ˆπŸ‘ˆ


Installation

go get github.com/pb33f/libopenapi-validator

Validate OpenAPI Document

go run github.com/pb33f/libopenapi-validator/cmd/validate@latest [--regexengine] <file>

πŸ” Example: Use a custom regex engine/flag (e.g., ecmascript)

go run github.com/pb33f/libopenapi-validator/cmd/validate@latest --regexengine=ecmascript <file>

πŸ”§ Supported --regexengine flags/values (i️ Default: re2)

  • none
  • ignorecase
  • multiline
  • explicitcapture
  • compiled
  • singleline
  • ignorepatternwhitespace
  • righttoleft
  • debug
  • ecmascript
  • re2
  • unicode

Documentation

libopenapi and libopenapi-validator are products of Princess Beef Heavy Industries, LLC

Packages

No packages published

Contributors 20

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /