-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Generate titles from definition names
All root child definitions have a 'title' added to their definition if the opt-in definitionTitles option is set
- Loading branch information
Showing
7 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export interface ExportInterface { | ||
exportValue: string; | ||
} | ||
export type ExportAlias = ExportInterface; | ||
|
||
interface PrivateInterface { | ||
privateValue: string; | ||
} | ||
type PrivateAlias = PrivateInterface; | ||
|
||
interface MixedInterface { | ||
mixedValue: ExportAlias; | ||
} | ||
export type MixedAlias = PrivateInterface; | ||
|
||
export type PublicAnonymousTypeLiteral = { | ||
publicValue: string; | ||
}; | ||
|
||
type PrivateAnonymousTypeLiteral = { | ||
privateValue: string; | ||
}; | ||
|
||
export interface MyObject { | ||
exportInterface: ExportInterface; | ||
exportAlias: ExportAlias; | ||
|
||
privateInterface: PrivateInterface; | ||
privateAlias: PrivateAlias; | ||
|
||
mixedInterface: MixedInterface; | ||
mixedAlias: MixedAlias; | ||
|
||
publicAnonymousTypeLiteral: PublicAnonymousTypeLiteral; | ||
privateAnonymousTypeLiteral: PrivateAnonymousTypeLiteral; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"definitions": { | ||
"ExportAlias": { | ||
"$ref": "#/definitions/ExportInterface", | ||
"title": "ExportAlias" | ||
}, | ||
"ExportInterface": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"exportValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"exportValue" | ||
], | ||
"title": "ExportInterface", | ||
"type": "object" | ||
}, | ||
"MixedAlias": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"privateValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"privateValue" | ||
], | ||
"title": "MixedAlias", | ||
"type": "object" | ||
}, | ||
"PublicAnonymousTypeLiteral": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"publicValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"publicValue" | ||
], | ||
"title": "PublicAnonymousTypeLiteral", | ||
"type": "object" | ||
} | ||
}, | ||
"properties": { | ||
"exportAlias": { | ||
"$ref": "#/definitions/ExportAlias" | ||
}, | ||
"exportInterface": { | ||
"$ref": "#/definitions/ExportInterface" | ||
}, | ||
"mixedAlias": { | ||
"$ref": "#/definitions/MixedAlias" | ||
}, | ||
"mixedInterface": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"mixedValue": { | ||
"$ref": "#/definitions/ExportAlias" | ||
} | ||
}, | ||
"required": [ | ||
"mixedValue" | ||
], | ||
"type": "object" | ||
}, | ||
"privateAlias": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"privateValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"privateValue" | ||
], | ||
"type": "object" | ||
}, | ||
"privateAnonymousTypeLiteral": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"privateValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"privateValue" | ||
], | ||
"type": "object" | ||
}, | ||
"privateInterface": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"privateValue": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"privateValue" | ||
], | ||
"type": "object" | ||
}, | ||
"publicAnonymousTypeLiteral": { | ||
"$ref": "#/definitions/PublicAnonymousTypeLiteral" | ||
} | ||
}, | ||
"required": [ | ||
"exportInterface", | ||
"exportAlias", | ||
"privateInterface", | ||
"privateAlias", | ||
"mixedInterface", | ||
"mixedAlias", | ||
"publicAnonymousTypeLiteral", | ||
"privateAnonymousTypeLiteral" | ||
], | ||
"type": "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters