Replies: 2 comments 2 replies
-
Hello @arlyon . I'd rather consider reusing express-zod-api/src/endpoints-factory.ts Line 38 in 30a69d9 |
Beta Was this translation helpful? Give feedback.
-
@arlyon , I'm going to improve the configuration of the descriptions in the next major release (v16). Those descriptions do also affect the component naming in the generated documentation (when the As described above, for each of your endpoint you can specify its new Documentation({
composition: "components",
descriptions: {
requestBody: () => "the body of request",
requestParameter: ({ method, path }) => `parameter of ${method} ${path}`,
negativeResponse: ({ operationId }) => `very negative response of ${operationId}`, // <——— this one
positiveResponse: ({ path }) => `Super positive response of ${path}`,
},
}) So the component name will be the clean id shaped from the description you can make out of its properties and additional alphanumeric assets of your choice. I believe it provides enough flexibility for your needs. |
Beta Was this translation helpful? Give feedback.
-
Hello
The default schema naming is verbose, and I would like to be able to tune the results. I looked at potentially overriding some method on Documentation however no such luck. An alternative would be to be able to tune the naming with a withMeta call with the added benefit that we can deduplicate identical schemas used across multiple resources using reference equality.
Thanks for this great lib! (and happy holidays, if you celebrate)
Alex
Beta Was this translation helpful? Give feedback.
All reactions