Skip to content

Commit f7b71ad

Browse files
committed
chore: add missing io-ts-types known codecs
1 parent ee9d522 commit f7b71ad

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/openapi-generator/src/knownImports.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,19 @@ export const KNOWN_IMPORTS: KnownImports = {
9696
brand: (_, arg) => E.right(arg),
9797
},
9898
'io-ts-types': {
99+
BigIntFromString: () => E.right({ type: 'primitive', value: 'string' }),
100+
BooleanFromNumber: () => E.right({ type: 'primitive', value: 'number' }),
101+
BooleanFromString: () => E.right({ type: 'primitive', value: 'string' }),
102+
DateFromISOString: () => E.right({ type: 'primitive', value: 'string' }),
103+
DateFromNumber: () => E.right({ type: 'primitive', value: 'number' }),
104+
DateFromUnixTime: () => E.right({ type: 'primitive', value: 'number' }),
105+
IntFromString: () => E.right({ type: 'primitive', value: 'string' }),
106+
JsonFromString: () => E.right({ type: 'primitive', value: 'string' }),
99107
nonEmptyArray: (_, innerSchema) => E.right({ type: 'array', items: innerSchema }),
100108
NonEmptyString: () => E.right({ type: 'primitive', value: 'string' }),
101-
DateFromISOString: () => E.right({ type: 'primitive', value: 'string' }),
102-
NumberFromString: () => E.right({ type: 'primitive', value: 'number' }),
103-
BooleanFromString: () => E.right({ type: 'primitive', value: 'boolean' }),
109+
NumberFromString: () => E.right({ type: 'primitive', value: 'string' }),
110+
readonlyNonEmptyArray: (_, innerSchema) =>
111+
E.right({ type: 'array', items: innerSchema }),
104112
UUID: () => E.right({ type: 'primitive', value: 'string' }),
105113
},
106114
'@api-ts/io-ts-http': {

0 commit comments

Comments
 (0)