Replies: 3 comments
-
Yes, and |
Beta Was this translation helpful? Give feedback.
0 replies
-
Working on it in #2390 |
Beta Was this translation helpful? Give feedback.
0 replies
-
🚀 The feature is now available in v22.9.0, @mlms13 import { Routing, DependsOnMethod } from "express-zod-api";
import { z } from "zod";
const someEndpoint = factory.build({
deprecated: true, // deprecates all routes the endpoint assigned to
input: z.object({
prop: z.string().deprecated(), // deprecates the property or a path parameter
}),
});
const routing: Routing = {
v1: oldEndpoint.deprecated(), // deprecates the /v1 path
v2: new DependsOnMethod({ get: oldEndpoint }).deprecated(), // deprecates the /v2 path
v3: someEndpoint, // the path is assigned with initially deprecated endpoint (also deprecated)
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I believe that OpenAPI allows marking endpoints as deprecated by including
"deprecated": true
in the JSON. I was wondering if express-zod-api includes any way to set this property when generating the documentation/openapi spec.Similarly, in addition to marking entire endpoints as deprecated, specific fields in the schema can also be marked as deprecated in OpenAPI. I'd love to have a way to do this with ez if one doesn't already exist.
Beta Was this translation helpful? Give feedback.
All reactions