An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

rivaas.dev/openapi

Package openapi provides OpenAPI 3.0.4 and 3.1.2 specification generation for Go applications. This package enables automatic generation of OpenAPI specifications from Go code using struct tags and reflection. It provides a pure, stateless API for building specifications with minimal boilerplate. The package uses two distinct types of options, both with the With* prefix: Example: The package automatically discovers API parameters from struct tags compatible with the binding package: Example: This automatically generates OpenAPI parameters without manual specification. Component schema names use the format "pkgname.TypeName" to prevent cross-package type name collisions. For example, types from different packages with the same name (e.g., "api.User" and "models.User") will generate distinct schema names in the OpenAPI specification. Operation IDs are automatically generated from HTTP method and path using semantic naming: Custom operation IDs can be set using the WithOperationID option. Generated specifications can be validated against the official OpenAPI meta-schemas. Validation is opt-in to avoid performance overhead: The validate subpackage provides standalone validation for external OpenAPI specs: Example_warnings demonstrates how to work with warnings from spec generation. Example_warningsFiltering demonstrates advanced warning filtering. Example_warningsStrictMode demonstrates strict downlevel mode.

Ecosystem
proxy.golang.org
Latest Release
v0.7.0
about 1 month ago
Versions
12
Links
Registry proxy.golang.org
Homepage Homepage
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/rivaas.dev/openapi
spec
License Apache-2.0
Namespace rivaas.dev
First Release 5 months ago
Last Synced 14 days ago
Rankings on proxy.golang.org
Overall Top 5.2%