Skip to content

Commit

Permalink
fix(core): implement {} insterd of unknown for blank schema inter…
Browse files Browse the repository at this point in the history
…face (#1219)
  • Loading branch information
soartec-lab authored Feb 13, 2024
1 parent e528e11 commit 97552e4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/core/src/getters/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,16 @@ export const getObject = ({
};
}

const useTypeOverInterfaces = context?.output.override?.useTypeOverInterfaces;
const blankValue =
item.type === 'object'
? '{ [key: string]: any }'
: useTypeOverInterfaces
? 'unknown'
: '{}';

return {
value:
(item.type === 'object' ? '{ [key: string]: any }' : 'unknown') +
nullable,
value: blankValue + nullable,
imports: [],
schemas: [],
isEnum: false,
Expand Down

0 comments on commit 97552e4

Please sign in to comment.