Discover Packages
github.com/codejavu-llc/swaggervu
internal
spec
package
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Jun 23, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package spec loads and normalizes Swagger 2.0 / OpenAPI 3.x definitions from
JSON, YAML, or JavaScript-embedded sources into a single openapi3 document.
Kind identifies the family/version of a parsed definition.
const (
KindSwagger2 Kind = "Swagger 2.0"
KindOpenAPI30 Kind = "OpenAPI 3.0"
KindOpenAPI31 Kind = "OpenAPI 3.1"
KindUnknown Kind = "Unknown"
)
Detect inspects raw bytes and returns the Kind plus the raw version string
without fully parsing. Handles JSON and YAML (a JSON superset).
Spec is a normalized API definition. Doc is always a v3 document (v2 is
converted on load) so downstream code only handles one shape.
Load parses raw bytes into a normalized Spec.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.