ogen-fixbinary

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

ogen-fixbinary fixes nullable binary file fields in ogen-generated multipart form encoders.

Problem: When OpenAPI spec has a binary field with nullable: true, ogen generates OptNilString instead of OptMultipartFile, and encodes it as a string form field instead of a proper multipart file attachment.

This tool fixes:

  • oas_schemas_gen.go: Changes File OptNilString to File OptMultipartFile
  • oas_request_encoders_gen.go: Changes encoding from string field to multipart file

Usage:

ogen-fixbinary oas_schemas_gen.go oas_request_encoders_gen.go

Jump to

Keyboard shortcuts

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