Discover Packages
github.com/vihuvac/go-openapi-validator
examples
directory
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Dec 31, 2025
License: MIT
Opens a new window with license information.
README
README
¶
go-openapi-validator Examples
This directory contains several examples demonstrating how to integrate go-openapi-validator with different Go web routers and frameworks. These examples cover various use cases, from basic manual route registration to advanced automated handler mapping.
Documentation Index
Key Features Demonstrated
Request Validation : Ensuring incoming requests match the OpenAPI specification.
Response Validation : Validating outgoing responses against the spec (useful for development).
Swagger UI Integration : Serving a built-in Swagger UI with live spec validation.
Automated Routing : Reducing boilerplate by mapping OpenAPI operationId to Go handlers.
Getting Started
To run any of the examples, navigate to the respective directory and use the standard go run command:
cd examples/gin
go run main.go
Once the server is running, you can access the Swagger UI at http://localhost:8081/docs.
Back to main project
Expand ▾
Collapse ▴
Directories
¶
Click to show internal directories.
Click to hide internal directories.