Skip to content

Commit 90e0f5a

Browse files
committed
refactor: add codec for Optional
TICKET: WP-6196
1 parent be54765 commit 90e0f5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/express/openapi-generator.rc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
22
* OpenAPI Generator Configuration
3-
* No custom configuration needed for Express module so far.
4-
* NOTE: This file is not being passed into the openapi-generator
3+
* Custom codec handlers for OpenAPI generation
54
*/
65

76
module.exports = (E) => {
87
return {
98
'.': {
109
JsonFromStringifiedJson: () => E.right({ type: 'string' }),
10+
Optional: (args) => E.right({ ...args[0], nullable: true }),
1111
},
1212
'io-ts-types': {
1313
Json: () => E.right({ type: 'object', properties: {}, required: [] }),

0 commit comments

Comments
 (0)