# Surnet/swagger-jsdoc

Generates swagger/openapi specification based on jsDoc comments and YAML files.

Repository: https://github.com/Surnet/swagger-jsdoc
Canonical: https://ross.abutalabs.com/products/swagger-jsdoc
Language: JavaScript
License: MIT
License Family: permissive
Topics: swagger, jsdoc, swagger-jsdoc, openapi
Last push: 2026-08-23T17:04:07+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 53, longevity 100
- inputs: {"age_days": 4106, "days_push": 10, "days_rel": 103, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1788, forks 228 (observed 2026-08-28T04:05:36.418264+00:00)

## What it is
A Node.js library that reads JSDoc-annotated source code and YAML files to generate OpenAPI (Swagger) specifications. It supports OpenAPI 3.x, Swagger 2, and AsyncAPI 2.0, with optional validation that throws on parsing errors.

## Use cases
- generate openapi spec from jsdoc comments
- document express api routes with swagger annotations
- keep api docs in sync with code
- validate swagger docs in unit tests
- generate openapi 3.0 specification from yaml files
- document nodejs rest api

## When to choose
- you want API documentation defined inline next to route handlers as JSDoc comments
- you need a validated OpenAPI/Swagger/AsyncAPI spec generated at build or runtime in Node.js
- you prefer documenting APIs in YAML blocks within source files

## When to avoid
- you want to write OpenAPI specs by hand without code annotations
- your project is not JavaScript/Node.js based
- you need spec generation from other sources like TypeScript types or runtime request inspection

## Facets
- artifact type: library
- maturity: active
- function: api-documentation, documentation, parser, developer-tools
- domain: apis, documentation, web-development, developer-tools
- platform: -
- tags: openapi, swagger, jsdoc, api-specification, code-generation, nodejs, javascript

## Member repositories
- Surnet/swagger-jsdoc (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:36.418264+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:23:20.057192+00:00, confidence not recorded.
  - readme: https://github.com/Surnet/swagger-jsdoc (fetched 2026-08-28T04:05:36.418264+00:00, sha e3cae7aa49c7)
  - registry_npm: https://registry.npmjs.org/swagger-jsdoc (fetched 2026-08-29T11:02:34.018440+00:00, sha d1d1da341538)
- Data as of 2026-08-30T08:39:29.467469+00:00.
