Closed gabro closed 5 years ago
The change introduced in #70 does not take into account optional parameters.
Suppose you have a POST route that takes a single optional parameter, then metarpheus-io-ts produces this output, that does not compile:
// ... data: { foo: m.Foo.encode(foo) } // ...
the correct encoding would be
// ... data: { foo: t.union([m.Foo, t.undefined]).encode(foo) } // ...
The change introduced in #70 does not take into account optional parameters.
Suppose you have a POST route that takes a single optional parameter, then metarpheus-io-ts produces this output, that does not compile:
the correct encoding would be