File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,11 @@ export function jsonToDocumentation(obj) {
54
54
return `- **${ startTable } to ${ endTable } **: ${ r . cardinality } \n` ;
55
55
} ) . join ( "" ) : "" ;
56
56
57
- const documentationTypes = obj . types . map ( ( type ) => {
57
+ const documentationTypes = databases [ obj . database ] . hasTypes && obj . types . length > 0 ? obj . types . map ( ( type ) => {
58
58
return `| Name | fields | Note |\n` +
59
59
`|-------------|---------------|--------------------------------|\n` +
60
60
`| ${ type . name } | ${ type . fields . map ( ( field ) => field . name ) . join ( ", " ) } | ${ type . comment ? type . comment : "" } |` ;
61
- } ) . join ( "\n" ) ;
61
+ } ) . join ( "\n" ) : "" ;
62
62
63
63
return `# ${ obj . title } documentation\n## Summary\n\n- [Introduction](#introduction)\n- [Database Type](#database-type)\n` +
64
64
`- [Table Structure](#table-structure)\n${ documentationSummary } \n- [Relationships](#relationships)\n- [Database Diagram](#database-Diagram)\n\n` +
You can’t perform that action at this time.
0 commit comments