astahmer / openapi-zod-client

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)
openapi-zod-client.vercel.app
717 stars 80 forks source link

fix: multiline description #279

Closed dgadelha closed 4 months ago

dgadelha commented 4 months ago

Properly handles multiline descriptions (currently, it's producing invalid code if it has more than 2 lines [because replace is used instead of replaceAll]. fixed to not ignore multiple lines at all)

Tests updated accordingly

Also kept the current behavior of using double quotes if the description hasn't multiple lines, to avoid updating lots of tests and unnecessary change in currently generated code

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openapi-zod-client-rim4 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 2:57pm
astahmer commented 4 months ago

LGTM ! thanks, could you add a patch changeset so I can merge it ?

dgadelha commented 4 months ago

There you go @astahmer