|
|
|
@ -8,6 +8,7 @@ import { |
|
|
|
} from './generics'; |
|
|
|
import { parseNamespace } from './namespace'; |
|
|
|
import { relativePathToModel } from './path'; |
|
|
|
import { isValidProp } from './prop'; |
|
|
|
import { camel } from './text'; |
|
|
|
import { parseGenerics } from './tree'; |
|
|
|
import { |
|
|
|
@ -134,7 +135,8 @@ export function createImportRefToInterfaceReducerCreator(params: ModelGeneratorP |
|
|
|
genericsCollector.reset(); |
|
|
|
|
|
|
|
typeDef.properties?.forEach(prop => { |
|
|
|
const name = prop.jsonName || camel(prop.name); |
|
|
|
let name = prop.jsonName || camel(prop.name); |
|
|
|
name = isValidProp(name) ? name : `'${name}'`; |
|
|
|
const type = simplifyType(prop.typeSimple); |
|
|
|
const refs = parseType(prop.type).reduce( |
|
|
|
(acc: string[], r) => acc.concat(parseGenerics(r).toGenerics()), |
|
|
|
|