{"id":19262745,"url":"https://github.com/documentationjs/documentation-schema","last_synced_at":"2025-04-21T18:31:13.763Z","repository":{"id":32397231,"uuid":"35973825","full_name":"documentationjs/documentation-schema","owner":"documentationjs","description":"A standard schema for JSDoc comments","archived":false,"fork":false,"pushed_at":"2017-04-10T19:36:38.000Z","size":12,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-10T20:55:37.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/documentationjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-20T20:57:38.000Z","updated_at":"2022-09-13T16:14:00.000Z","dependencies_parsed_at":"2022-07-12T10:31:05.732Z","dependency_job_id":null,"html_url":"https://github.com/documentationjs/documentation-schema","commit_stats":null,"previous_names":["documentationjs/api-json"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/documentationjs%2Fdocumentation-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/documentationjs%2Fdocumentation-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/documentationjs%2Fdocumentation-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/documentationjs%2Fdocumentation-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/documentationjs","download_url":"https://codeload.github.com/documentationjs/documentation-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250110900,"owners_count":21376551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:33:19.408Z","updated_at":"2025-04-21T18:31:13.517Z","avatar_url":"https://github.com/documentationjs.png","language":"JavaScript","readme":"# api-json\n\n`api-json` is a **documentation data standard**. It can be generated by\ndocumentation engines like [documentationjs](https://github.com/documentationjs)\nor written by hand.\n\n`api-json` enables a two stage documentation process:\n\n1. documentation extraction or authorship\n2. output formatting\n\n### Maximum example\n\n```js\n{\n  \"name\": \"sort\",\n  \"kind\": \"function\",\n  \"description\": \"Create a stream.Transform that sorts its input of comments\\nby the name tag, if any, and otherwise by filename.\",\n  \"memberof\": \"module\",\n  \"scope\": \"static\",\n  \"context\": {\n    \"loc\": {\n      \"start\": {\n        \"line\": 9,\n        \"column\": 0\n      },\n      \"end\": {\n        \"line\": 23,\n        \"column\": 2\n      }\n    },\n    \"file\": \"/Users/tmcw/src/documentation/streams/sort.js\",\n    \"code\": \"var sort = require('sort-stream');\\n\\n/**\\n * Create a stream.Transform that sorts its input of comments\\n * by the name tag, if any, and otherwise by filename.\\n * @name sort\\n * @return {stream.Transform} a transform stream\\n */\\nmodule.exports = function () {\\n\\n  function getSortKey(comment) {\\n    for (var i = 0; i \u003c comment.tags.length; i++) {\\n      if (comment.tags[i].title === 'name') {\\n        return comment.tags[i].name;\\n      }\\n    }\\n    return comment.context.file;\\n  }\\n\\n  return sort(function (a, b) {\\n    return getSortKey(a).localeCompare(getSortKey(b));\\n  });\\n};\"\n  },\n  \"returns\": [\n    {\n      \"title\": \"returns\",\n      \"description\": \"a transform stream\",\n      \"type\": {\n        \"type\": \"NameExpression\",\n        \"name\": \"stream.Transform\"\n      }\n    }\n  ]\n}\n```\n\n### Minimal example\n\n```js\n{\n  \"name\": \"sort\",\n  \"kind\": \"function\",\n  \"description\": \"Create a stream.Transform that sorts its input of comments\\nby the name tag, if any, and otherwise by filename.\",\n  \"memberof\": \"module\",\n  \"scope\": \"static\",\n  \"returns\": [\n    {\n      \"title\": \"returns\",\n      \"description\": \"a transform stream\",\n      \"type\": {\n        \"type\": \"NameExpression\",\n        \"name\": \"stream.Transform\"\n      }\n    }\n  ]\n}\n```\n\n## Meaning\n\n```\n{\n  \"name\": // this is the name of the function, object, class, or namespace\n  \"kind\": // http://usejsdoc.org/tags-type.html\n  \"description\": // http://usejsdoc.org/tags-description.html\n  \"memberof\": // http://usejsdoc.org/tags-memberof.html\n  \"scope\": // http://usejsdoc.org/tags-instance.html\n  \"context\": {\n    \"loc\": {\n      // this contains 'start' and 'end' objects in the same style\n      // as the esprima javascript parser\n    },\n    \"file\": // absolute path to the relevant source code\n    \"code\": // extracted source code, potentially excerpted\n  },\n  \"returns\": [\n    {\n      \"title\": \"returns\",\n      \"description\": \"a transform stream\",\n      \"type\": {\n        \"type\": \"NameExpression\",\n        \"name\": \"stream.Transform\"\n      }\n    }\n  ],\n  \"params\": [\n    ...\n  ],\n  \"throws\": [\n    ...\n  ]\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocumentationjs%2Fdocumentation-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocumentationjs%2Fdocumentation-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocumentationjs%2Fdocumentation-schema/lists"}