Socket
Socket
Sign inDemoInstall

@api-components/api-annotation-document

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@api-components/api-annotation-document - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0-preview.1

api-annotation-document.js

1724

analysis.json

@@ -10,2 +10,49 @@ {

{
"name": "amfModel",
"type": "(Object | Array)",
"description": "Generated AMF json/ld model form the API spec.\nThe element assumes the object of the first array item to be a\ntype of `\"http://raml.org/vocabularies/document#Document`\non AMF vocabulary.\n\nIt is only usefult for the element to resolve references.",
"privacy": "public",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 128,
"column": 8
},
"end": {
"line": 128,
"column": 32
}
},
"metadata": {
"polymer": {
"attributeType": "Object"
}
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "ns",
"type": "Object | null | undefined",
"description": "A namespace for AMF model",
"privacy": "public",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 132,
"column": 8
},
"end": {
"line": 138,
"column": 9
}
},
"metadata": {
"polymer": {
"readOnly": true,
"attributeType": "Object"
}
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "shape",

@@ -17,7 +64,7 @@ "type": "Object | null | undefined",

"start": {
"line": 88,
"line": 90,
"column": 8
},
"end": {
"line": 91,
"line": 93,
"column": 9

@@ -40,7 +87,7 @@ }

"start": {
"line": 95,
"line": 97,
"column": 8
},
"end": {
"line": 101,
"line": 103,
"column": 9

@@ -66,7 +113,7 @@ }

"start": {
"line": 107,
"line": 109,
"column": 8
},
"end": {
"line": 110,
"line": 112,
"column": 9

@@ -85,2 +132,1580 @@ }

{
"name": "_getAmfKey",
"description": "Returns compact model key for given value.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 147,
"column": 4
},
"end": {
"line": 179,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "property",
"type": "String",
"description": "AMF orioginal property"
}
],
"return": {
"type": "String",
"desc": "Compact model property name or the same value if\nvalue not found in the context."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_ensureAmfModel",
"description": "Ensures that the model is AMF object.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 186,
"column": 4
},
"end": {
"line": 196,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "amf",
"type": "(Object | Array)",
"description": "AMF json/ld model"
}
],
"return": {
"type": "(Object | undefined)",
"desc": "API spec"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_ensureArray",
"description": "Ensures that the value is an array.\nIt returns undefined when there's no value.\nIt returns the same array if the value is already an array.\nIt returns new array of the item is not an array.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 206,
"column": 4
},
"end": {
"line": 214,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "value",
"type": "(Array | any)",
"description": "An item to test"
}
],
"return": {
"type": "(Array | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getValue",
"description": "Gets a signle scalar value from a model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 221,
"column": 4
},
"end": {
"line": 238,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "Object",
"description": "Amf model to extract the value from."
},
{
"name": "key",
"type": "String",
"description": "Model key to search for the value"
}
],
"return": {
"type": "any",
"desc": "Value for key"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getValueArray",
"description": "Gets values from a model as an array of `@value` properties.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 245,
"column": 4
},
"end": {
"line": 252,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "Object",
"description": "Amf model to extract the value from."
},
{
"name": "key",
"type": "String",
"description": "Model key to search for the value"
}
],
"return": {
"type": "Array.<any>",
"desc": "Value for key"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_hasType",
"description": "Checks if a model has a type.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 259,
"column": 4
},
"end": {
"line": 271,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "Object",
"description": "Model to test"
},
{
"name": "type",
"type": "String",
"description": "Type name"
}
],
"return": {
"type": "Boolean",
"desc": "True if model has a type."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_hasProperty",
"description": "Checks if a shape has a property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 278,
"column": 4
},
"end": {
"line": 281,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "?Object",
"description": "The shape to test"
},
{
"name": "key",
"type": "?String",
"description": "Property name to test"
}
],
"return": {
"type": "Boolean"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computePropertyArray",
"description": "Computes array value of a property in a model (shape).",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 289,
"column": 4
},
"end": {
"line": 299,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "Object",
"description": "AMF shape object"
},
{
"name": "key",
"type": "String",
"description": "Property name"
}
],
"return": {
"type": "(Array.<any> | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computePropertyObject",
"description": "Computes a value of a property in a model (shape).\nIt takes first value of a property, if exists.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 308,
"column": 4
},
"end": {
"line": 312,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "Object",
"description": "AMF shape object"
},
{
"name": "key",
"type": "String",
"description": "Property name"
}
],
"return": {
"type": "(any | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeHasStringValue",
"description": "Tests if a passed argumet exists.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 319,
"column": 4
},
"end": {
"line": 321,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "value",
"type": "(String | Object | Number)",
"description": "A value to test"
}
],
"return": {
"type": "Boolean"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeHasArrayValue",
"description": "Computes if passed argument is an array and has a value.\nIt does not check for type or value of the array items.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 328,
"column": 4
},
"end": {
"line": 330,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "value",
"type": "Array",
"description": "Value to test"
}
],
"return": {
"type": "Boolean"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeDescription",
"description": "Computes description for a shape.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 336,
"column": 4
},
"end": {
"line": 338,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "Object",
"description": "AMF shape"
}
],
"return": {
"type": "String",
"desc": "Description value."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeHeaders",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 340,
"column": 4
},
"end": {
"line": 342,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeQueryParameters",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 344,
"column": 4
},
"end": {
"line": 346,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeResponses",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 348,
"column": 4
},
"end": {
"line": 350,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeApiVersion",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 352,
"column": 4
},
"end": {
"line": 359,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "amfModel"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeServerVariables",
"description": "Computes value for `serverVariables` property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 367,
"column": 4
},
"end": {
"line": 369,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "server",
"type": "Object",
"description": "AMF API model for Server."
}
],
"return": {
"type": "(Array.<Object> | undefined)",
"desc": "Variables if defined."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEndpointVariables",
"description": "Computes value for `endpointVariables` property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 376,
"column": 4
},
"end": {
"line": 378,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "endpoint",
"type": "Object",
"description": "Endpoint model"
}
],
"return": {
"type": "(Array.<Object> | undefined)",
"desc": "Parameters if defined."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computePayload",
"description": "Computes value for the `payload` property",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 385,
"column": 4
},
"end": {
"line": 387,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "expects",
"type": "Object",
"description": "Current value of `expects` property."
}
],
"return": {
"type": "(Array.<Object> | undefined)",
"desc": "Payload model if defined."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeReturns",
"description": "Computes value for `returns` property",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 394,
"column": 4
},
"end": {
"line": 396,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "method",
"type": "Object",
"description": "AMF `supportedOperation` model"
}
],
"return": {
"type": "(Array.<Object> | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeSecurity",
"description": "Computes value for `security` property",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 403,
"column": 4
},
"end": {
"line": 405,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "method",
"type": "Object",
"description": "AMF `supportedOperation` model"
}
],
"return": {
"type": "(Array.<Object> | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeHasCustomProperties",
"description": "Computes value for `hasCustomProperties` property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 412,
"column": 4
},
"end": {
"line": 414,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "Object",
"description": "AMF `supportedOperation` model"
}
],
"return": {
"type": "Boolean"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEncodes",
"description": "Computes model's `encodes` property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 421,
"column": 4
},
"end": {
"line": 433,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "?Object",
"description": "AMF data model"
}
],
"return": {
"type": "Array.<Object>",
"desc": "List of encodes"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeDeclares",
"description": "Computes list of declarations in the AMF api model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 440,
"column": 4
},
"end": {
"line": 453,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "(Array | Object)",
"description": "AMF json/ld model for an API"
}
],
"return": {
"type": "Array.<Object>",
"desc": "List of declarations"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeReferences",
"description": "Computes list of references in the AMF api model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 460,
"column": 4
},
"end": {
"line": 473,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "(Array | Object)",
"description": "AMF json/ld model for an API"
}
],
"return": {
"type": "Array.<Object>",
"desc": "List of declarations"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeWebApi",
"description": "Computes AMF's `http://schema.org/WebAPI` model",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 480,
"column": 4
},
"end": {
"line": 488,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "(Array | Object)",
"description": "AMF json/ld model for an API"
}
],
"return": {
"type": "Object",
"desc": "Web API declaration."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeServer",
"description": "Computes value for `server` property that is later used with other computations.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 495,
"column": 4
},
"end": {
"line": 503,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "(Array | Object)",
"description": "AMF model for an API"
}
],
"return": {
"type": "Object",
"desc": "The server model"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEndpointUri",
"description": "Computes endpoint's URI based on `amfModel` and `endpoint` models.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 513,
"column": 4
},
"end": {
"line": 525,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "server",
"type": "Object",
"description": "Server model of AMF API."
},
{
"name": "endpoint",
"type": "Object",
"description": "Endpoint model"
},
{
"name": "baseUri",
"type": "?String",
"description": "Current value of `baseUri` property"
},
{
"name": "version",
"type": "?String",
"description": "API current version"
}
],
"return": {
"type": "String",
"desc": "Endpoint's URI"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getBaseUri",
"description": "Computes base URI value from either `baseUri`, `iron-meta` with\n`ApiBaseUri` key or `amfModel` value (in this order).",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 535,
"column": 4
},
"end": {
"line": 546,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "baseUri",
"type": "String",
"description": "Value of `baseUri` property"
},
{
"name": "server",
"type": "Object",
"description": "AMF API model for Server."
},
{
"name": "protocols",
"type": "?Array.<String>",
"description": "List of supported protocols"
}
],
"return": {
"type": "String",
"desc": "Base uri value. Can be empty string."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getAmfBaseUri",
"description": "Computes base URI from AMF model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 556,
"column": 4
},
"end": {
"line": 560,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "server",
"type": "Object",
"description": "AMF API model for Server."
},
{
"name": "protocols",
"type": "?Array.<String>",
"description": "Listy of supporte dprotocols. If not\nprovided and required to compute the url it uses `amfModel` to compute\nprotocols"
}
],
"return": {
"type": "(String | undefined)",
"desc": "Base uri value if exists."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_ensureUrlScheme",
"description": "A function that makes sure that the URL has a scheme definition.\nIf no supported protocols information is available it assumes `http`.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 572,
"column": 4
},
"end": {
"line": 586,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "value",
"type": "String",
"description": "A url value"
},
{
"name": "protocols",
"type": "?Array.<String>",
"description": "List of supported by the API protocols\nAn array of string like: `['HTTP', 'HTTPS']`. It lowercase the value.\nIf not set it tries to read supported protocols value from `amfModel`\nproperty."
}
],
"return": {
"type": "String",
"desc": "Url with scheme."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeProtocols",
"description": "Computes supported protocols by the API.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 593,
"column": 4
},
"end": {
"line": 599,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "(Object | Array)",
"description": "AMF data model"
}
],
"return": {
"type": "(Array.<String> | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeExpects",
"description": "Computes value for the `expects` property.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 606,
"column": 4
},
"end": {
"line": 614,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "method",
"type": "Object",
"description": "AMF `supportedOperation` model"
}
],
"return": {
"type": "Object"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computePropertyValue",
"description": "Tries to find an example value (whether it's default value or from an\nexample) to put it into snippet's values.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 622,
"column": 4
},
"end": {
"line": 640,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "item",
"type": "Object",
"description": "A http://raml.org/vocabularies/http#Parameter property"
}
],
"return": {
"type": "(String | undefined)"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEndpoints",
"description": "Computes list of endpoints from a WebApi model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 646,
"column": 4
},
"end": {
"line": 652,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object"
}
],
"return": {
"type": "Array",
"desc": "Always returns an array of endpoints."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEndpointModel",
"description": "Computes model for an endpoint documentation.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 660,
"column": 4
},
"end": {
"line": 663,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "Current value of `webApi` property"
},
{
"name": "id",
"type": "String",
"description": "Selected shape ID"
}
],
"return": {
"type": "Object",
"desc": "An endponit definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeEndpointByPath",
"description": "Computes model for an endpoint documentation using it's path.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 671,
"column": 4
},
"end": {
"line": 682,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "Current value of `webApi` property"
},
{
"name": "path",
"type": "String",
"description": "Endpoint path"
}
],
"return": {
"type": "(Object | undefined)",
"desc": "An endponit definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeMethodModel",
"description": "Computes method for the method documentation.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 690,
"column": 4
},
"end": {
"line": 696,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "Current value of `webApi` property"
},
{
"name": "selected",
"type": "String",
"description": "Selected shape"
}
],
"return": {
"type": "Object",
"desc": "A method definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeOperations",
"description": "Computes list of operations in an endpoint",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 703,
"column": 4
},
"end": {
"line": 710,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "The WebApi AMF model"
},
{
"name": "id",
"type": "String",
"description": "Endpoint ID"
}
],
"return": {
"type": "Array.<Object>",
"desc": "List of SupportedOperation objects"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeMethodEndpoint",
"description": "Computes an endpoint for a method.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 717,
"column": 4
},
"end": {
"line": 738,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "The WebApi AMF model"
},
{
"name": "methodId",
"type": "String",
"description": "Method id"
}
],
"return": {
"type": "(Object | undefined)",
"desc": "An endpoint model of undefined."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "__computeMethodsListForMethod",
"description": "Computes a list of methods for an endpoint that contains a method with\ngiven id.",
"privacy": "private",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 747,
"column": 4
},
"end": {
"line": 754,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "WebApi model"
},
{
"name": "methodId",
"type": "String",
"description": "Method id."
}
],
"return": {
"type": "(Array.<Object> | undefined)",
"desc": "A list of sibling methods or undefined."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeType",
"description": "Computes a type documentation model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 763,
"column": 4
},
"end": {
"line": 780,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "declares",
"type": "Array",
"description": "Current value of `declares` property"
},
{
"name": "references",
"type": "?Array",
"description": "Current value of `references` property"
},
{
"name": "selected",
"type": "String",
"description": "Selected shape"
}
],
"return": {
"type": "Object",
"desc": "A type definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeReferenceType",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 781,
"column": 4
},
"end": {
"line": 787,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "reference"
},
{
"name": "selected"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeSecurityModel",
"description": "Computes model for selected security definition.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 795,
"column": 4
},
"end": {
"line": 800,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "declares",
"type": "Array",
"description": "Current value of `declares` property"
},
{
"name": "selected",
"type": "String",
"description": "Selected shape"
}
],
"return": {
"type": "Object",
"desc": "A security definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeDocument",
"description": "Computes a documentation model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 808,
"column": 4
},
"end": {
"line": 815,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "webApi",
"type": "Object",
"description": "Current value of `webApi` property"
},
{
"name": "selected",
"type": "String",
"description": "Selected shape"
}
],
"return": {
"type": "Object",
"desc": "A method definition"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_resolve",
"description": "Resolves a reference to an external fragment.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 822,
"column": 4
},
"end": {
"line": 871,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape",
"type": "Object",
"description": "A shape to resolve"
}
],
"return": {
"type": "Object",
"desc": "Resolved shape."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getLinkTarget",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 873,
"column": 4
},
"end": {
"line": 895,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "amf"
},
{
"name": "id"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getReferenceId",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 897,
"column": 4
},
"end": {
"line": 916,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "amf"
},
{
"name": "id"
}
],
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_resolveRecursive",
"description": "",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 918,
"column": 4
},
"end": {
"line": 929,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "shape"
}
],
"return": {
"type": "void"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_getExampleValue",
"description": "Gets string value for an example data model.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 938,
"column": 4
},
"end": {
"line": 951,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "item",
"type": "Object",
"description": "Example item model"
},
{
"name": "isJson",
"type": "Boolean",
"description": "If set it checks if the `raw` value is valid JSON.\nIf it isn't then it parses structured value."
}
],
"return": {
"type": "String"
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeExampleFromStructuredValue",
"description": "Computes an example from example structured value.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 958,
"column": 4
},
"end": {
"line": 979,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "Object",
"description": "`structuredValue` item model."
}
],
"return": {
"type": "(Object | Array)",
"desc": "Javascript object or array with structured value."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_computeStructuredExampleValue",
"description": "Computes value with propert data type for a structured example.",
"privacy": "protected",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 985,
"column": 4
},
"end": {
"line": 1011,
"column": 5
}
},
"metadata": {},
"params": [
{
"name": "model",
"type": "Object",
"description": "Structured example item model."
}
],
"return": {
"type": "(String | Boolean | Number)",
"desc": "Value for the example."
},
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "_shapeChanged",

@@ -91,7 +1716,7 @@ "description": "Called when the shape property change.\nSets `hasCustomProperties` and `customList` properties.\n\nNote that for performance reasons, if the element determine that there's\nno custom properties wit will not clear `customList`.\nIt will be updated only if tha vlue actually change.",

"start": {
"line": 123,
"line": 125,
"column": 4
},
"end": {
"line": 133,
"line": 136,
"column": 5

@@ -118,7 +1743,7 @@ }

"start": {
"line": 139,
"line": 142,
"column": 4
},
"end": {
"line": 150,
"line": 153,
"column": 5

@@ -145,7 +1770,7 @@ }

"start": {
"line": 152,
"line": 155,
"column": 4
},
"end": {
"line": 158,
"line": 157,
"column": 5

@@ -167,7 +1792,7 @@ }

"start": {
"line": 165,
"line": 164,
"column": 4
},
"end": {
"line": 178,
"line": 177,
"column": 5

@@ -194,7 +1819,7 @@ }

"start": {
"line": 185,
"line": 184,
"column": 4
},
"end": {
"line": 191,
"line": 186,
"column": 5

@@ -221,7 +1846,7 @@ }

"start": {
"line": 198,
"line": 193,
"column": 4
},
"end": {
"line": 207,
"line": 198,
"column": 5

@@ -248,7 +1873,7 @@ }

"start": {
"line": 214,
"line": 205,
"column": 4
},
"end": {
"line": 229,
"line": 227,
"column": 5

@@ -280,7 +1905,7 @@ }

"start": {
"line": 78,
"line": 80,
"column": 2
},
"end": {
"line": 230,
"line": 228,
"column": 3

@@ -290,6 +1915,42 @@ }

"privacy": "public",
"superclass": "Polymer.Element",
"superclass": "HTMLElement",
"name": "ApiElements.ApiAnnotationDocument",
"attributes": [
{
"name": "amf-model",
"description": "Generated AMF json/ld model form the API spec.\nThe element assumes the object of the first array item to be a\ntype of `\"http://raml.org/vocabularies/document#Document`\non AMF vocabulary.\n\nIt is only usefult for the element to resolve references.",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 128,
"column": 8
},
"end": {
"line": 128,
"column": 32
}
},
"metadata": {},
"type": "(Object | Array)",
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "ns",
"description": "A namespace for AMF model",
"sourceRange": {
"file": "../amf-helper-mixin/amf-helper-mixin.html",
"start": {
"line": 132,
"column": 8
},
"end": {
"line": 138,
"column": 9
}
},
"metadata": {},
"type": "Object | null | undefined",
"inheritedFrom": "ApiElements.AmfHelperMixin"
},
{
"name": "shape",

@@ -299,7 +1960,7 @@ "description": "A property shape definition of AMF.\nThe element looks for `http://raml.org/vocabularies/document#customDomainProperties`\nkey in the property and renders custom properties view if any\nproperty is defined.",

"start": {
"line": 88,
"line": 90,
"column": 8
},
"end": {
"line": 91,
"line": 93,
"column": 9

@@ -316,7 +1977,7 @@ }

"start": {
"line": 95,
"line": 97,
"column": 8
},
"end": {
"line": 101,
"line": 103,
"column": 9

@@ -333,7 +1994,7 @@ }

"start": {
"line": 107,
"line": 109,
"column": 8
},
"end": {
"line": 110,
"line": 112,
"column": 9

@@ -359,5 +2020,8 @@ }

"slots": [],
"tagname": "api-annotation-document"
"tagname": "api-annotation-document",
"mixins": [
"ApiElements.AmfHelperMixin"
]
}
]
}

@@ -5,3 +5,3 @@ /**

* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
* https://github.com/Polymer/tools/tree/master/packages/gen-typescript-declarations
*

@@ -12,2 +12,7 @@ * To modify these typings, edit the source file(s):

/// <reference path="../polymer/types/polymer-element.d.ts" />
/// <reference path="../polymer/types/lib/elements/dom-repeat.d.ts" />
/// <reference path="../polymer/types/lib/elements/dom-if.d.ts" />
/// <reference path="../amf-helper-mixin/amf-helper-mixin.d.ts" />
declare namespace ApiElements {

@@ -35,3 +40,5 @@

*/
class ApiAnnotationDocument extends Polymer.Element {
class ApiAnnotationDocument extends
ApiElements.AmfHelperMixin(
Object) {

@@ -38,0 +45,0 @@ /**

@@ -0,1 +1,55 @@

<a name="2.0.3"></a>
## 2.0.3 (2019-01-12)
### Docs
* Updating documentation ([2accad3828b161fe553f41915e3f20d1a7c3172f](https://github.com/advanced-rest-client/api-annotation-document/commit/2accad3828b161fe553f41915e3f20d1a7c3172f))
### Fix
* Fixing sauce labs configuration ([bba8a7395f60ba256d9c8c5a3fa7f5dcfe516414](https://github.com/advanced-rest-client/api-annotation-document/commit/bba8a7395f60ba256d9c8c5a3fa7f5dcfe516414))
### New
* Addig support for compact model ([e26f9ab64723d5b0f2413aa8d49ef2776c192f95](https://github.com/advanced-rest-client/api-annotation-document/commit/e26f9ab64723d5b0f2413aa8d49ef2776c192f95))
### Update
* Updated Travis configuration to connect to Sauce Labs. ([22c3312144a3fd85c71e83b89de470f3c0349494](https://github.com/advanced-rest-client/api-annotation-document/commit/22c3312144a3fd85c71e83b89de470f3c0349494))
<a name="2.0.2"></a>
## 2.0.2 (2018-08-28)
### Docs
* Updating documentation ([2accad3828b161fe553f41915e3f20d1a7c3172f](https://github.com/advanced-rest-client/api-annotation-document/commit/2accad3828b161fe553f41915e3f20d1a7c3172f))
### Fix
* Fixing sauce labs configuration ([bba8a7395f60ba256d9c8c5a3fa7f5dcfe516414](https://github.com/advanced-rest-client/api-annotation-document/commit/bba8a7395f60ba256d9c8c5a3fa7f5dcfe516414))
### New
* Addig support for compact model ([e26f9ab64723d5b0f2413aa8d49ef2776c192f95](https://github.com/advanced-rest-client/api-annotation-document/commit/e26f9ab64723d5b0f2413aa8d49ef2776c192f95))
### Update
* Updated Travis configuration to connect to Sauce Labs. ([22c3312144a3fd85c71e83b89de470f3c0349494](https://github.com/advanced-rest-client/api-annotation-document/commit/22c3312144a3fd85c71e83b89de470f3c0349494))
<a name="2.0.1"></a>
## 2.0.1 (2018-06-26)
### Update
* Updated Travis configuration to connect to Sauce Labs. ([22c3312144a3fd85c71e83b89de470f3c0349494](https://github.com/advanced-rest-client/api-annotation-document/commit/22c3312144a3fd85c71e83b89de470f3c0349494))
<a name="2.0.0"></a>

@@ -2,0 +56,0 @@ # 2.0.0 (2018-05-18)

{
"description": "An element to render RAML annotations based on AMF data model",
"keywords": [
"api-components",
"RAML",
"annotations"
],
"repository": {
"type": "git",
"url": "git://github.com/advanced-rest-client/api-annotation-document.git"
},
"name": "@api-components/api-annotation-document",
"description": "An element to render RAML annotations based on AMF data model",
"version": "2.0.1",
"version": "3.0.0-preview.1",
"license": "Apache-2.0",
"main": "api-annotation-document.html",
"main": "api-annotation-document.js",
"authors": [

@@ -12,5 +21,18 @@ "Pawel Psztyc",

"devDependencies": {
"@polymer/gen-typescript-declarations": "^1.1.1"
"@api-components/api-model-generator": "^0.1.10",
"@polymer/gen-typescript-declarations": "^1.6.1",
"@polymer/iron-demo-helpers": "^3.0.0",
"@polymer/iron-component-page": "^4.0.0",
"@polymer/iron-test-helpers": "^3.0.0",
"@polymer/test-fixture": "^4.0.2",
"@webcomponents/webcomponentsjs": "^2.0.0",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"sinon": "^7.2.3",
"wct-mocha": "^1.0.0",
"@polymer/paper-dropdown-menu": "^3.0.0",
"@polymer/paper-listbox": "^3.0.0",
"@polymer/paper-item": "^3.0.0",
"web-animations-js": "^2.3.1"
},
"private": false,
"scripts": {

@@ -22,10 +44,22 @@ "lint": "polymer lint api-annotation-document.html",

},
"repository": {
"type": "git",
"url": "git://github.com/advanced-rest-client/api-annotation-document.git"
},
"bugs": {
"url": "https://github.com/advanced-rest-client/api-annotation-document/issues",
"email": "arc@mulesoft.com"
},
"resolutions": {
"inherits": "2.0.3",
"samsam": "1.1.3",
"supports-color": "3.1.2",
"type-detect": "1.0.0"
},
"contributors": [
"Pawel Psztyc",
"The Advanced REST client authors <arc@mulesoft.com>"
],
"dependencies": {
"@api-components/amf-helper-mixin": "^3.0.0-preview.1",
"@api-components/api-console-default-theme": "^3.0.0-preview.1",
"@api-components/api-navigation": "^3.0.0-preview.1",
"@polymer/polymer": "^3.0.0"
}
}

3

polymer.json
{
"npm": true,
"lint": {
"rules": [
"polymer-2"
"polymer-3"
]
}
}
const AmfLoader = {};
AmfLoader.load = function(typeIndex) {
typeIndex = typeIndex || 0;
AmfLoader.load = function(compact) {
const file = '/demo-api' + (compact ? '-compact' : '') + '.json';
const url = location.protocol + '//' + location.host +
location.pathname.substr(0, location.pathname.lastIndexOf('/'))
.replace('/test', '/demo') + '/amf-model.json';
.replace('/test', '/demo') + file;
return new Promise((resolve, reject) => {

@@ -8,0 +8,0 @@ const xhr = new XMLHttpRequest();

@@ -32,6 +32,2 @@ {

"browserName": "safari",
"platform": "OS X 10.11",
"version": "9.0"
}, {
"browserName": "safari",
"platform": "macOS 10.12",

@@ -41,7 +37,27 @@ "version": "10.1"

"browserName": "safari",
"platform": "macOS 10.12",
"version": "11.0"
"platform": "macOS 10.13",
"version": "11.1"
}]
},
"istanbul": {
"dir": "./coverage",
"reporters": ["text-summary", "lcov"],
"include": [
"**/*.js"
],
"exclude": [
"**/test/**",
"**/demo/**",
"**/tasks/**"
],
"thresholds": {
"global": {
"statements": 80,
"branches": 80,
"functions": 90,
"lines": 80
}
}
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc