TEMPLATES-STATS.json Documentation

Official TypeScript developer resources and documentation for projectdiscovery/TEMPLATES-STATS.json. Verified technical context for AI.

0 stars TypeScript TypeScript 1 file ยท ~1,757 tokens
RAW Doc

1. Project Overview & Quickstart (projectdiscovery/TEMPLATES-STATS.json)

TEMPLATES-STATS.json

Open-source repository projectdiscovery/TEMPLATES-STATS.json

Repository Details

Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.

2. Official Technical Reference & Guides (projectdiscovery/docs)

File: README.md

ProjectDiscovery Documentation

This is the source code for the ProjectDiscovery documentation located at https://docs.projectdiscovery.io


Development

  1. Checkout this repository
  2. Install mintlify with npm i mintlify@latest
  3. Run mintlify dev

Deploying

To build the final product, we have a couple of additional steps:

  1. Build the JS Protocol Docs
  • npm install jsdoc-to-markdown
  • ./bin/jsdocs.sh
  1. Build the PDCP API reference documentation
  • Either download the latest openapi.yaml manually or run ./bin/download-api.sh
  • Run ./bin/generate-api.sh to generate any new API files
  • OR run ./bin/generate-filtered-api.sh to generate API docs without internal/admin endpoints
  1. Deployment

After those, Mintlify handles the deployment automatically.


File: bin/README-auto-grouped-api.md

Auto-Grouped API Documentation Generator

This script automatically generates and maintains API documentation with logical grouping based on OpenAPI tags. It combines the best of both worlds: auto-generation (no missing endpoints) and logical organization.

Usage

bash
# Use default source file (Downloads directory)
./bin/generate-auto-grouped-api.sh

# Use custom source file  
./bin/generate-auto-grouped-api.sh /path/to/your/openapi.yaml

What it does

๐Ÿค– **Auto-Generation**

  • Reads OpenAPI specification
  • Filters out admin and internal APIs
  • Generates MDX files for all public endpoints
  • Never misses endpoints - everything is included automatically

๐Ÿ“ **Logical Grouping**

The script organizes endpoints into logical groups based on OpenAPI tags:

  • Assets โ†’ assets + enumerations tags
  • Templates โ†’ templates + template/v2 tags
  • Scans โ†’ scans tag
  • Results โ†’ results + retests tags
  • Configurations โ†’ configurations tag
  • Users โ†’ users + user tags
  • Logs โ†’ elog + scan_log tags
  • Export โ†’ export tag
  • Automations โ†’ automations tag
  • Integration โ†’ oauth tag
  • Utilities โ†’ chaos, vulns, leaks, billing, usage tags

๐Ÿ”„ **Auto-Updates Navigation**

  • Automatically updates mint.json with new structure
  • Maintains logical grouping
  • Sorts endpoints alphabetically within groups
  • Handles new endpoints automatically

Benefits

โœ… No Manual Maintenance - Add new endpoints to OpenAPI spec and they appear automatically
โœ… Never Miss Endpoints - All public endpoints are included
โœ… Logical Organization - Grouped by functionality, not alphabetically
โœ… Consistent Naming - Uses OpenAPI summaries and operation IDs
โœ… Future-Proof - Works with any OpenAPI specification changes

Output Structure

After running, your mint.json will have clean navigation like:

json
{
  "group": "API Reference",
  "pages": [
    "api-reference/introduction",
    {
      "group": "Assets", 
      "pages": [
        "api-reference/assets/get-asset-list",
        "api-reference/assets/upload-asset",
        "api-reference/enumerations/create-enumeration",
        "..."
      ]
    },
    {
      "group": "Templates",
      "pages": [
        "api-reference/templates/create-template",
        "api-reference/templates/get-template-list",
        "..."
      ]
    }
  ]
}

Comparison with Manual Approach

Feature Manual (generate-filtered-api.sh) Auto-Grouped (generate-auto-grouped-api.sh)
Missing Endpoints โŒ Requires manual addition to mint.json โœ… Never - all endpoints auto-included
Logical Grouping โœ… Full manual control โœ… Smart tag-based grouping
Maintenance โŒ High - update mint.json for new endpoints โœ… Zero - fully automated
Consistency โŒ Depends on manual updates โœ… Always consistent
New API Versions โŒ Manual review and updates needed โœ… Automatically handles changes

When to Use

Use Auto-Grouped when:

  • You want zero maintenance overhead
  • You frequently add/remove API endpoints
  • You have a team that might forget to update navigation
  • You want consistent organization based on API design

Use Manual when:

  • You need very specific custom grouping that doesn't match tags
  • You want to exclude certain public endpoints from docs
  • You have complex navigation requirements

Next Steps

After running this script:

  1. Preview: mintlify dev
  2. Deploy: Your CI/CD can run this script automatically when OpenAPI changes
  3. Customize: Modify the logicalGroups mapping in the script if needed

File: bin/README-filtered-api.md

Filtered API Documentation Generator

This script generates API documentation from an OpenAPI specification while excluding internal and admin endpoints.

Usage

bash
# Use default source file (Downloads directory)
./bin/generate-filtered-api.sh

# Use custom source file
./bin/generate-filtered-api.sh /path/to/your/openapi.yaml

Note: The script will create a filtered openapi.yaml file in the current directory for Mintlify to use.

What gets filtered out

The script automatically excludes:

  1. Admin APIs: All paths starting with /v1/admin/

    • Examples: /v1/admin/user/search, /v1/admin/team/change_owner
  2. Internal APIs: Endpoints tagged with internal

    • Any endpoint with "internal" in its tags array

Output

  • Creates filtered API documentation in the api-reference/ directory
  • Removes existing internal/ and admin/ folders before regenerating
  • Uses Mintlify scraping to generate MDX files for each endpoint
  • Provides detailed console output showing what was filtered

Requirements

  • Node.js and npm/npx
  • Internet connection (to download @mintlify/scraping package)
  • Valid OpenAPI 3.x specification file

Integration with existing workflow

You can replace the existing ./bin/generate-api.sh call in your build process with:

bash
# Old way (includes internal/admin APIs)
./bin/generate-api.sh

# New way (excludes internal/admin APIs)  
./bin/generate-filtered-api.sh

Troubleshooting

If you encounter errors:

  1. "OpenAPI source file not found": Ensure the file path is correct
  2. "Node.js is required": Install Node.js from https://nodejs.org
  3. Network errors: Check internet connection for npm package downloads
  4. Permission errors: Ensure the script is executable (chmod +x bin/generate-filtered-api.sh)