Welcome to the NotiDocs Wiki. Here you’ll find a complete reference of all tags supported by the npm library, including their properties, examples, and use cases. Use the sidebar to navigate or search for a specific tag.
Defines the root project and its general metadata.
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes | Project name |
version | String | No | Project version |
description | String | Yes | Project description |
instructions | String | No | Instructions to run the project |
entrypoint | String | No | Main entry file |
/* @ND_Project { name: "TestApp", version: "1.0.0", description: "A test application for NotiDocs", instructions: "Run 'node src/index.js' to start", entrypoint: "src/index.js" } */
Groups related functionalities into a module.
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes | Module name |
description | String | Yes | Module description |
parent | String | No | Parent module or project name |
/* @ND_Module { name: "UtilsModule", description: "Utility functions", parent: "TestApp" } */
Documents a class in the code.
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes | Class name |
description | String | Yes | Class description |
parent | String | No | Parent module or class |
status | String | No | Status (e.g., 'in progress', 'done') |
/* @ND_Class { name: "Calculator", description: "A calculator utility class", parent: "UtilsModule", status: "done" } */
Documents the constructor of a class.
Name | Type | Required | Description |
---|---|---|---|
description | String | Yes | Constructor description |
parent | String | Yes | Parent class name |
inputs | Object | No | Input parameters (e.g., { name: { type, required, desc } }) |
/* @ND_Constructor { description: "Initializes the calculator", parent: "Calculator", inputs: { initialValue: { type: "Number", required: true, desc: "Starting value" } } } */
Documents the destructor or cleanup method of a class.
Name | Type | Required | Description |
---|---|---|---|
description | String | Yes | Destructor description |
parent | String | Yes | Parent class name |
/* @ND_Destructor { description: "Resets the calculator", parent: "Calculator" } */
Documents a standalone method or one within a class.
Name | Type | Required | Description |
---|---|---|---|
description | String | Yes | Method description |
parent | String | No | Parent class or module |
params | Object | No | Parameters (e.g., { name: { type, required, desc } }) |
returns | Object | No | Return value (e.g., { type, desc }) |
async | Boolean | No | Indicates if it’s asynchronous |
examples | Array | No | Usage examples |
/* @ND_Method { description: "Adds a number to the current value", parent: "Calculator", params: { x: { type: "Number", required: true, desc: "Number to add" } }, returns: { type: "Number", desc: "New value" } } */
Documents a reusable component (e.g., UI).
Name | Type | Required | Description |
---|---|---|---|
description | String | Yes | Component description |
parent | String | No | Parent module |
inputs | Object | No | Component inputs |
events | Object | No | Emitted events |
render | String | No | Rendering description |
/* @ND_Component { description: "A reusable button", parent: "ComponentsModule", inputs: { label: { type: "String", required: true, desc: "Button text" } }, events: { onClick: { desc: "Triggered on click" } } } */
Defines a group of routes for an API.
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes | Router name |
path | String | Yes | Base route of the router |
description | String | Yes | Router description |
parent | String | No | Parent module |
/* @ND_Router { name: "AuthRouter", path: "/auth", description: "Handles authentication routes", parent: "MainModule" } */
Documents a specific API endpoint.
Name | Type | Required | Description |
---|---|---|---|
method | String | Yes | HTTP method (e.g., GET, POST) |
path | String | Yes | Endpoint path |
description | String | Yes | Endpoint description |
parent | String | No | Parent router |
auth | String | No | Authentication type |
params | Object | No | Route parameters |
query | Object | No | Query parameters |
body | Object | No | Request body |
responses | Object | No | Possible responses (e.g., { '200': { code, desc } }) |
/* @ND_Endpoint { method: "POST", path: "/auth/login", description: "Logs in a user", parent: "AuthRouter", body: { username: { type: "String", required: true } } } */
Documents a middleware for an API.
Name | Type | Required | Description |
---|---|---|---|
description | String | Yes | Middleware description |
params | Object | No | Parameters (req, res, next) |
throws | Object | No | Possible errors |
async | Boolean | No | Indicates if it’s asynchronous |
examples | Array | No | Usage examples |
/* @ND_Middleware { description: "Validates JWT token", params: { req: { type: "Request", required: true } }, async: true } */
Documents a service or logical utility.
Name | Type | Required | Description |
---|---|---|---|
name | String | Yes | Service name |
description | String | Yes | Service description |
parent | String | No | Parent module |
/* @ND_Service { name: "AuthService", description: "Authentication utilities", parent: "MainModule" } */