Documentation
¶
Overview ¶
Package oastools provides tools for parsing, validating, fixing, converting, joining, comparing, generating code from, and building OpenAPI Specification (OAS) documents from OAS 2.0 through OAS 3.2.0.
The library consists of ten packages:
- github.com/erraggy/oastools/parser - Parse OpenAPI specifications from YAML or JSON
- github.com/erraggy/oastools/validator - Validate OpenAPI specifications against their declared version
- github.com/erraggy/oastools/fixer - Automatically fix common validation errors
- github.com/erraggy/oastools/converter - Convert OpenAPI specifications between different OAS versions
- github.com/erraggy/oastools/joiner - Join multiple OpenAPI specifications into a single document
- github.com/erraggy/oastools/overlay - Apply OpenAPI Overlay transformations with JSONPath targeting
- github.com/erraggy/oastools/differ - Compare OpenAPI specifications and detect breaking changes
- github.com/erraggy/oastools/generator - Generate idiomatic Go code for API clients and server stubs
- github.com/erraggy/oastools/builder - Programmatically construct OpenAPI specifications with reflection-based schema generation
- github.com/erraggy/oastools/oaserrors - Structured error types for programmatic handling
For installation, CLI usage, and examples, see: https://github.com/erraggy/oastools
For detailed API documentation and examples, see the individual package pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildInfo ¶ added in v1.17.2
func BuildInfo() string
BuildInfo returns a formatted string with all build metadata
func BuildTime ¶ added in v1.17.2
func BuildTime() string
BuildTime returns the build timestamp or 'unknown' if run from source
func Commit ¶ added in v1.17.2
func Commit() string
Commit returns the git commit hash or 'unknown' if run from source
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package builder provides programmatic construction of OpenAPI Specification documents.
|
Package builder provides programmatic construction of OpenAPI Specification documents. |
|
cmd
|
|
|
oastools
command
|
|
|
oastools/commands
Package commands provides CLI command handlers for oastools.
|
Package commands provides CLI command handlers for oastools. |
|
Package converter provides version conversion for OpenAPI Specification documents.
|
Package converter provides version conversion for OpenAPI Specification documents. |
|
Package differ provides OpenAPI specification comparison and breaking change detection.
|
Package differ provides OpenAPI specification comparison and breaking change detection. |
|
Package fixer provides automatic fixes for common OpenAPI Specification validation errors.
|
Package fixer provides automatic fixes for common OpenAPI Specification validation errors. |
|
Package generator provides Go code generation from OpenAPI Specification documents.
|
Package generator provides Go code generation from OpenAPI Specification documents. |
|
Package httpvalidator validates HTTP requests and responses against OpenAPI specifications.
|
Package httpvalidator validates HTTP requests and responses against OpenAPI specifications. |
|
internal
|
|
|
cliutil
Package cliutil provides utilities for CLI operations.
|
Package cliutil provides utilities for CLI operations. |
|
codegen/deepcopy
command
Package main generates DeepCopy methods for parser package types.
|
Package main generates DeepCopy methods for parser package types. |
|
corpusutil
Package corpusutil provides utilities for loading and managing the integration test corpus of real-world public OpenAPI specifications.
|
Package corpusutil provides utilities for loading and managing the integration test corpus of real-world public OpenAPI specifications. |
|
httputil
Package httputil provides HTTP-related validation utilities and constants.
|
Package httputil provides HTTP-related validation utilities and constants. |
|
issues
Package issues provides a unified issue type for validation and conversion problems.
|
Package issues provides a unified issue type for validation and conversion problems. |
|
jsonpath
Package jsonpath provides a minimal JSONPath implementation for OpenAPI Overlay support.
|
Package jsonpath provides a minimal JSONPath implementation for OpenAPI Overlay support. |
|
schemautil
Package schemautil provides utilities for working with OpenAPI schema types.
|
Package schemautil provides utilities for working with OpenAPI schema types. |
|
severity
Package severity provides severity level constants and utilities for issues reported by validator, converter, differ, and generator packages.
|
Package severity provides severity level constants and utilities for issues reported by validator, converter, differ, and generator packages. |
|
testutil
Package testutil provides test utilities and fixtures for unit tests.
|
Package testutil provides test utilities and fixtures for unit tests. |
|
Package joiner provides joining for multiple OpenAPI Specification documents.
|
Package joiner provides joining for multiple OpenAPI Specification documents. |
|
Package oaserrors provides structured error types for the oastools library.
|
Package oaserrors provides structured error types for the oastools library. |
|
Package overlay provides support for OpenAPI Overlay Specification v1.0.0.
|
Package overlay provides support for OpenAPI Overlay Specification v1.0.0. |
|
Package parser provides parsing for OpenAPI Specification documents.
|
Package parser provides parsing for OpenAPI Specification documents. |
|
internal/jsonhelpers
Package jsonhelpers provides helper functions for JSON marshaling and unmarshaling with support for extension fields (x-* properties) in OpenAPI specifications.
|
Package jsonhelpers provides helper functions for JSON marshaling and unmarshaling with support for extension fields (x-* properties) in OpenAPI specifications. |
|
Package validator provides validation for OpenAPI Specification documents.
|
Package validator provides validation for OpenAPI Specification documents. |
Click to show internal directories.
Click to hide internal directories.