mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
This pull request updates the logic in `golangTypeToOAIType` to improve how Go types are mapped to OpenAPI types. The most important changes are focused on handling specific struct and slice types more accurately, ensuring better compatibility with OpenAPI specifications. Type mapping improvements: * Added explicit handling for `[]uint8` and `uuid.UUID` types, mapping both to `TypeString`. This ensures these commonly used types are correctly represented in OpenAPI schemas. * Refactored the switch statement to check for specific struct types (`time.Time`, `gtime.Time`, `ghttp.UploadFile`, `[]uint8`, and `uuid.UUID`) before falling back to the kind-based mapping. This improves accuracy for special-case types.