File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ plugin documentation {
155155| ` cleanOutput ` | ` boolean ` | ` false ` | When ` true ` , the output directory is removed before generation to ensure a clean build (use with caution) |
156156| ` title ` | ` string ` | ` "Schema Documentation" ` | Heading on the index page |
157157| ` fieldOrder ` | ` "declaration" ` or ` "alphabetical" ` | ` "declaration" ` | How fields are ordered in tables |
158- | ` includeInternalModels ` | ` boolean ` | ` false ` | Include models marked ` @@ignore ` in output |
158+ | ` includeInternalModels ` | ` boolean ` | ` false ` | Include models marked ` @@ignore ` or annotated with ` @@meta('doc:ignore', true) ` in output |
159159| ` includeRelationships ` | ` boolean ` | ` true ` | Generate relationship sections and ` relationships.md ` |
160160| ` includePolicies ` | ` boolean ` | ` true ` | Generate access policy tables |
161161| ` includeValidation ` | ` boolean ` | ` true ` | Generate validation rule tables |
Original file line number Diff line number Diff line change @@ -306,7 +306,24 @@ export function isFieldRequired(field: DataField): boolean {
306306 * Returns `true` if the model has the `@@ignore` attribute.
307307 */
308308export function isIgnoredModel ( model : DataModel ) : boolean {
309- return model . attributes . some ( ( a ) => a . decl . ref ?. name === '@@ignore' ) ;
309+ if ( model . attributes . some ( ( a ) => a . decl . ref ?. name === '@@ignore' ) ) {
310+ return true ;
311+ }
312+
313+ // Support @@meta ('doc:ignore', true)
314+ for ( const attribute of model . attributes ) {
315+ if ( attribute . decl . ref ?. name !== '@@meta' ) {
316+ continue ;
317+ }
318+
319+ const key = stripQuotes ( attribute . args [ 0 ] ?. $cstNode ?. text ?? '' ) ;
320+ const value = stripQuotes ( attribute . args [ 1 ] ?. $cstNode ?. text ?? '' ) ;
321+ if ( key === 'doc:ignore' && value === 'true' ) {
322+ return true ;
323+ }
324+ }
325+
326+ return false ;
310327}
311328
312329/**
You can’t perform that action at this time.
0 commit comments