Open artsiommiksiuk opened 3 days ago
Okay, seems like I figured answer to my question.
if I do the hard copy, instead of .extend()
,
export const AgentUserSchema = z.object({
...PublicUserSchema.shape,
state: AgentUserStateSchema,
}).openapi("User");
Then it produces hard type (without anyOf). Makes sense.
Still, with the inline part, I think it is a bug of itself.
This leads to that schema being inlined into request as:
I'd expect it to be as well extracted to components.schema.
So, I'd like it to be extracted into components.schema part.
As another possibility I'm looking for, is to avoid allOf usage for extension, and have a hard merged objects. Is it possible?