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
Click to show internal directories.
Click to hide internal directories.