documentation/test/fixture/nearby_params.output.json
Tom MacWright 3da1ff6dd0 Source-sorting by default (#410)
* Source-sorting by default

Many changes

* Uses a new version of module-deps that exposes a sort key
  we use to sort documentation.
* Adds inference for methods in objects
* Groups events into a separate comment property

* Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547

* Namespaces and paths

* More powerful paths: paths now include name, kind, and scope
* comments now include a 'namespace' property with a formatted namespace

* Fix tests

* Re-ignore fonts

* Nix sourceKey from output

* Pin dependency versions

* Fix module-deps-sortable ref

* Update tests for right deps
2016-04-29 18:09:52 -04:00

516 lines
14 KiB
JSON

[
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Attempt to establish a cookie-based session in exchange for credentials.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 73,
"offset": 72
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 73,
"offset": 72
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 73,
"offset": 72
}
}
},
"tags": [
{
"title": "function",
"description": null,
"lineNumber": 1,
"name": null
},
{
"title": "name",
"description": null,
"lineNumber": 2,
"name": "sessions.create"
},
{
"title": "param",
"description": null,
"lineNumber": 3,
"type": {
"type": "NameExpression",
"name": "object"
},
"name": "credentials"
},
{
"title": "param",
"description": "Login username. Also accepted as `username` or `email`.",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "credentials.name"
},
{
"title": "param",
"description": "Login password",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "credentials.password"
},
{
"title": "param",
"description": "Gets passed `(err, { success:Boolean })`.",
"lineNumber": 6,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "function"
}
},
"name": "callback"
},
{
"title": "returns",
"description": "promise, to be resolved on success or rejected on failure",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Promise"
}
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 9,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 14,
"column": 3
}
},
"code": "/** Attempt to establish a cookie-based session in exchange for credentials.\n * @function\n * @name sessions.create\n * @param {object} credentials\n * @param {string} credentials.name Login username. Also accepted as `username` or `email`.\n * @param {string} credentials.password Login password\n * @param {function} [callback] Gets passed `(err, { success:Boolean })`.\n * @returns {Promise} promise, to be resolved on success or rejected on failure\n */\nsessions.addMethod('create', 'POST / form', {\n // normalize request body params\n before({ body }) {\n }\n});\n"
},
"errors": [],
"kind": "function",
"name": "sessions.create",
"params": [
{
"name": "credentials",
"lineNumber": 3,
"type": {
"type": "NameExpression",
"name": "object"
},
"properties": [
{
"name": "credentials.name",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Login username. Also accepted as ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 34,
"offset": 33
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "username",
"position": {
"start": {
"line": 1,
"column": 34,
"offset": 33
},
"end": {
"line": 1,
"column": 44,
"offset": 43
},
"indent": []
}
},
{
"type": "text",
"value": " or ",
"position": {
"start": {
"line": 1,
"column": 44,
"offset": 43
},
"end": {
"line": 1,
"column": 48,
"offset": 47
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "email",
"position": {
"start": {
"line": 1,
"column": 48,
"offset": 47
},
"end": {
"line": 1,
"column": 55,
"offset": 54
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 1,
"column": 55,
"offset": 54
},
"end": {
"line": 1,
"column": 56,
"offset": 55
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 56,
"offset": 55
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 56,
"offset": 55
}
}
},
"type": {
"type": "NameExpression",
"name": "string"
}
},
{
"name": "credentials.password",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Login password",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
}
}
},
"type": {
"type": "NameExpression",
"name": "string"
}
}
]
},
{
"name": "callback",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Gets passed ",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 13,
"offset": 12
},
"indent": []
}
},
{
"type": "inlineCode",
"value": "(err, { success:Boolean })",
"position": {
"start": {
"line": 1,
"column": 13,
"offset": 12
},
"end": {
"line": 1,
"column": 41,
"offset": 40
},
"indent": []
}
},
{
"type": "text",
"value": ".",
"position": {
"start": {
"line": 1,
"column": 41,
"offset": 40
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 42,
"offset": 41
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "function"
}
}
}
],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "promise, to be resolved on success or rejected on failure",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 58,
"offset": 57
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 58,
"offset": 57
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 58,
"offset": 57
}
}
},
"type": {
"type": "NameExpression",
"name": "Promise"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "sessions.create",
"kind": "function"
}
],
"namespace": "sessions.create"
}
]