openapi-fixer

command module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

openapi-fixer

A powerful tool to fix OpenAPI spec to ensure compatibility with various code generators and tools

Go Reference Go Report Card

Introduction

openapi-fixer is a Go-based tool designed to help developers automatically apply fixups to OpenAPI specification files. It provides tooling to modify OpenAPI 3.0 specification file to ensure it's compatibility with various code generators and tools while maintaining the integrity of the API specification.

Install

go install github.com/zguydev/openapi-fixer@latest

Usage

//go:generate go run github.com/zguydev/openapi-fixer openapi.yaml fixed.openapi.yaml --fixups ./fixups/ --config .openapi-fixer.yaml

Planned

  • Helper package for comon repeated schema validation and access patterns
  • Feature to use YAML config files for mappings and targets instead of hardcoding to fixups
  • Generic fixup types
  • Logging to track fixups apply
  • More descriptive error messages, include context in errors (to tell which schema/property failed)
  • Fixup chaining to allow them depend on each other
  • Fixups progress reporting
  • Improved type safety - enums for common types
  • Dry run mode to report what would change
  • Feature to check what parts of spec are wrong
  • Fixups dir generator via CLI

Examples

Explore ready-to-use examples:

Example Name Description Path
🤖 OpenAI Example Fixups for the OpenAI API schema on example of POST /chat/completions endpoint examples/OpenAI

License

This project is licensed under the terms of the Apache License 2.0. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
cli
examples
OpenAI/fixups command
internal
pkg

Jump to

Keyboard shortcuts

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