env-schema icon indicating copy to clipboard operation
env-schema copied to clipboard

Return previous schema type

Open klaseca opened this issue 3 years ago • 4 comments

Checklist

Description:

As discussed in #138, env-schema should support fluent-json-schema library out-of-the-box (without explicitly calling valueOf method). Given this requirement, we cannot use a narrower type for schema (reasons why we cannot use code from fluent-json-schema are described in #137)

In future, if we remove this requirement, it will be possible to return a more strict type

klaseca avatar Dec 24 '22 13:12 klaseca

@klaseca Any thoughts on review comments?

Fdawgs avatar Aug 12 '23 19:08 Fdawgs

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.

climba03003 avatar Aug 13 '23 07:08 climba03003

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

klaseca avatar Aug 13 '23 11:08 klaseca

attn: @fastify/typescript

jsumners avatar Feb 23 '24 14:02 jsumners