Open filiplikavcan opened 1 year ago
I think there is an inconsistency when generating custom type/interface array schema. I would expect $ref for both cases when using this config:
{ topRef: true, ref: true, aliasRef: true, }
type CardLink = { URL: string; }; type Card = { Links: CardLink[]; };
When CardLink is type the resulting schema for CardLink[] is:
{ "type": "array", "items": { "type": "object", "properties": { "URL": { "type": "string" } } } }
interface CardLink { URL: string; } type Card = { Links: CardLink[]; };
When CardLink is interface the resulting schema for CardLink[] is:
{ "type": "array", "items": { "$ref": "#/definitions/CardLink" } }
I think there is an inconsistency when generating custom type/interface array schema. I would expect $ref for both cases when using this config:
CardLink as type
When CardLink is type the resulting schema for CardLink[] is:
CardLink as interface
When CardLink is interface the resulting schema for CardLink[] is: