specfmt

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package specfmt provides utilities for refactoring OpenAPI 3.0 YAML specs to extract inline schemas into named components/schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFile

func FormatFile(inPath, outPath string, opts Options) (err error)

FormatFile reads an OpenAPI YAML file, refactors inline response schemas into components/schemas, and writes the result to outPath.

func RefactorInlineResponseSchemas

func RefactorInlineResponseSchemas(root *yaml.Node, opts Options) (bool, error)

RefactorInlineResponseSchemas walks all paths/operations/responses and extracts inline schemas into components/schemas.

Types

type Options

type Options struct {
	DryRun  bool
	Verbose bool
}

Options configures the formatting behavior.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL