Closed elvince closed 1 month ago
@elvince Hi, Apologies for the delay in reply.
The Type.Strict()
function removes compositing symbols from TypeBox types. It is used in scenarios where Json Schema validators reject additional symbols properties passed on schematics. In essence, the Strict function will render a TypeBox type no longer capable with TypeBox infrastructure, so shouldn't be used unless your using a validator that mandates it.
The Strict function is a legacy function in TypeBox (which has historically has been leveraged by large , if you use the TypeCompiler, you can ignore this function.
Hope this helps, and again, apologies for the delay. S
@sinclairzx81 Thanks for the explanation. Now I know that I must create 2 types depanding of my use cases. FYI I need to use the strict type to use it in OpenAPI schema description as I need JsonSchema that conforms to OpenApi V3 specs.
Unless there is another way to do it, I will stick with Strict. Thanks,
Hi,
Following this code:
We got an erro : 'Preflight validation check failed to guard for the given schema' for PostTestBodyChecker2.
Why Type.Strict make the TypeCompile failed?
thanks,