anatine / zod-plugins

Plugins and utilities for Zod
591 stars 84 forks source link

fix(zod-openapi): do not mutate original schema with extendApi #174

Closed Ugzuzg closed 5 months ago

Ugzuzg commented 7 months ago

I was trying to describe some fields of the same "primitive" type that I created with zod in different places of the API, but extendApi was overriding the description on that type instead of changing the description for that specific use case.

A solution is to not mutate the original schema with extendApi.

nx-cloud[bot] commented 7 months ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit af16fa867caddbea3e5b36abc00169522acee00f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx affected:test --base=origin/main --codeCoverage`](https://cloud.nx.app/runs/EWIfyZKl07) - [`nx affected:lint --base=origin/main`](https://cloud.nx.app/runs/pM1fbuP0ds)

Sent with 💌 from NxCloud.

Brian-McBride commented 5 months ago

@Ugzuzg Can you resolve the conflicts and push again? This seems like a logical fix.

nx-cloud[bot] commented 5 months ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 6684ca6b54e49afc1ccedc701e9b7e289e2e9b42. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx affected:test --base=origin/main --codeCoverage`](https://cloud.nx.app/runs/VlYGRgbcAp?utm_source=pull-request&utm_medium=comment) - [`nx affected:lint --base=origin/main`](https://cloud.nx.app/runs/vG9hKPZkbF?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

Ugzuzg commented 5 months ago

@Brian-McBride, it is done.