miyaji255 / hono-typia-openapi

Open API Schema Generator for Hono with typia
MIT License
11 stars 1 forks source link

Support the union schema (from Hono 4.6.5) #9

Closed wighawag closed 3 weeks ago

wighawag commented 3 weeks ago

Here is the reproduction repo: https://github.com/bug-reproduction/hono-typia-openapi-test

git clone https://github.com/bug-reproduction/hono-typia-openapi-test
cd hono-typia-openapi-test
pnpm i
pnpm openapi
# see ./openapi.json
miyaji255 commented 3 weeks ago

Sorry, I will deal with the inferred types for simplicity's sake.

wighawag commented 3 weeks ago

Sorry for the confusion but the type used is actually infered, I just outputed it in ts format to make the reproduction step easier.

Otherwise I would have to import my whole project.

miyaji255 commented 3 weeks ago

Oh, sorry about that. I investigated based on your code and found that it was caused by the following PR that changed the intersection type to the union type. Thank you for the info!

https://github.com/honojs/hono/pull/3443