Closed lsdch closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.74%. Comparing base (
a93ebe6
) to head (a1757e6
). Report is 5 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds the
contentMediaType
property to the generated schema spec for binary field. This is mainly for the purpose of compatibility with API documentation tools such as Stoplight Elements (see #397).Note that #415 sets
contentType
property in the schema, but that is not sufficient for Stoplight to show the file upload UI component, event though the OpenAPI spec sayscontentMediaType
is not required whencontentType
is defined. Although that may rather be an issue in Stoplight, in my understanding it does not hurt to add this redundancy to Huma.Thus, this PR can be considered independently from #415. I hope I'm not mistaken about what the OpenAPI specs say, let me know if you think this rather belongs to Stoplight issues.
Example schema:
Sample UI screenshot: