Open klaseca opened 1 year ago
@klaseca Any thoughts on review comments?
The PR is long enough to forget the detail on why it happen. The raise of this PR is that the current types is too strict to support only limited amount of library (only ajv). https://github.com/fastify/env-schema/issues/138
Even fluent-json-schema
cannot be directly supported.
The PR is long enough to forget the detail on why it happen. The raise of this PR is that the current types is too strict to support only limited amount of library (only ajv). #138
Even
fluent-json-schema
cannot be directly supported.
Not exactly. Not only ajv
is supported. We have tests for typebox
, and they work. Only problem is desire to pass fluent-json-schema
schemas without explicitly calling valueOf
attn: @fastify/typescript
Checklist
npm run test
andnpm run benchmark
Description:
As discussed in #138,
env-schema
should supportfluent-json-schema
library out-of-the-box (without explicitly callingvalueOf
method). Given this requirement, we cannot use a narrower type for schema (reasons why we cannot use code fromfluent-json-schema
are described in #137)In future, if we remove this requirement, it will be possible to return a more strict type