Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-snippet

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

openapi-snippet - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

.prettierignore

151

index.js

@@ -9,6 +9,6 @@ /**

*/
'use strict'
'use strict';
const OpenAPIToHar = require('./openapi-to-har.js')
const HTTPSnippet = require('httpsnippet')
const OpenAPIToHar = require('./openapi-to-har.js');
const HTTPSnippet = require('httpsnippet');

@@ -22,3 +22,3 @@ /**

* @param {string} method HTTP method identifying endpoint, e.g., 'get'
* @param {array} targets List of languages to create snippets in, e.g,
* @param {array} targets List of languages to create snippets in, e.g,
* ['cURL', 'Node']

@@ -30,18 +30,21 @@ * @param {object} values Optional: Values for the query parameters if present

if (typeof values === 'undefined') {
values = {}
values = {};
}
const har = OpenAPIToHar.getEndpoint(openApi, path, method, values)
const har = OpenAPIToHar.getEndpoint(openApi, path, method, values);
const snippet = new HTTPSnippet(har)
const snippet = new HTTPSnippet(har);
const snippets = []
const snippets = [];
for (let j in targets) {
const target = formatTarget(targets[j])
if (!target) throw new Error('Invalid target: ' + targets[j])
const target = formatTarget(targets[j]);
if (!target) throw new Error('Invalid target: ' + targets[j]);
snippets.push({
id: targets[j],
title: target.title,
content: snippet.convert(target.language, typeof target.library !== 'undefined' ? target.library : null)
})
content: snippet.convert(
target.language,
typeof target.library !== 'undefined' ? target.library : null
),
});
}

@@ -54,31 +57,34 @@

resource: getResourceName(har.url),
snippets: snippets
}
}
snippets: snippets,
};
};
/**
* Return snippets for all endpoints in the given OpenAPI document.
*
*
* @param {object} openApi OpenAPI document
* @param {array} targets List of languages to create snippets in, e.g,
* @param {array} targets List of languages to create snippets in, e.g,
* ['cURL', 'Node']
*/
const getSnippets = function (openApi, targets) {
const harList = OpenAPIToHar.getAll(openApi)
const harList = OpenAPIToHar.getAll(openApi);
const results = []
const results = [];
for (let i in harList) {
// create HTTPSnippet object:
const har = harList[i]
const snippet = new HTTPSnippet(har.har)
const har = harList[i];
const snippet = new HTTPSnippet(har.har);
const snippets = []
const snippets = [];
for (let j in targets) {
const target = formatTarget(targets[j])
if (!target) throw new Error('Invalid target: ' + targets[j])
const target = formatTarget(targets[j]);
if (!target) throw new Error('Invalid target: ' + targets[j]);
snippets.push({
id: targets[j],
title: target.title,
content: snippet.convert(target.language, typeof target.library !== 'undefined' ? target.library : null)
})
content: snippet.convert(
target.language,
typeof target.library !== 'undefined' ? target.library : null
),
});
}

@@ -91,4 +97,4 @@

resource: getResourceName(har.url),
snippets
})
snippets,
});
}

@@ -99,12 +105,12 @@

if (a.resource < b.resource) {
return -1
return -1;
} else if (a.resource > b.resource) {
return 1
return 1;
} else {
return getMethodOrder(a.method.toLowerCase(), b.method.toLowerCase())
return getMethodOrder(a.method.toLowerCase(), b.method.toLowerCase());
}
})
});
return results
}
return results;
};

@@ -119,15 +125,15 @@ /**

const getMethodOrder = function (a, b) {
const order = ['get', 'post', 'put', 'delete', 'patch']
const order = ['get', 'post', 'put', 'delete', 'patch'];
if (order.indexOf(a) === -1) {
return 1
return 1;
} else if (order.indexOf(b) === -1) {
return -1
return -1;
} else if (order.indexOf(a) < order.indexOf(b)) {
return -1
return -1;
} else if (order.indexOf(a) > order.indexOf(b)) {
return 1
return 1;
} else {
return 0
return 0;
}
}
};

@@ -142,10 +148,10 @@ /**

const getResourceName = function (urlStr) {
const pathComponents = urlStr.split('/')
const pathComponents = urlStr.split('/');
for (let i = pathComponents.length - 1; i >= 0; i--) {
const cand = pathComponents[i]
const cand = pathComponents[i];
if (cand !== '' && !/^{/.test(cand)) {
return cand
return cand;
}
}
}
};

@@ -160,22 +166,22 @@ /**

const formatTarget = function (targetStr) {
const language = targetStr.split('_')[0]
const title = capitalizeFirstLetter(language)
let library = targetStr.split('_')[1]
const language = targetStr.split('_')[0];
const title = capitalizeFirstLetter(language);
let library = targetStr.split('_')[1];
const validTargets = HTTPSnippet.availableTargets()
let validLanguage = false
let validLibrary = false
const validTargets = HTTPSnippet.availableTargets();
let validLanguage = false;
let validLibrary = false;
for (let i in validTargets) {
const target = validTargets[i]
const target = validTargets[i];
if (language === target.key) {
validLanguage = true
validLanguage = true;
if (typeof library === 'undefined') {
library = target.default
validLibrary = true
library = target.default;
validLibrary = true;
} else {
for (let j in target.clients) {
const client = target.clients[j]
const client = target.clients[j];
if (library === client.key) {
validLibrary = true
break
validLibrary = true;
break;
}

@@ -188,20 +194,23 @@ }

if (!validLanguage || !validLibrary) {
return null
return null;
}
return {
title: typeof library !== 'undefined' ? title + ' + ' + capitalizeFirstLetter(library) : title,
title:
typeof library !== 'undefined'
? title + ' + ' + capitalizeFirstLetter(library)
: title,
language,
library
}
}
library,
};
};
const capitalizeFirstLetter = function (string) {
return string.charAt(0).toUpperCase() + string.slice(1)
}
return string.charAt(0).toUpperCase() + string.slice(1);
};
module.exports = {
getSnippets,
getEndpointSnippets
}
getEndpointSnippets,
};

@@ -212,3 +221,3 @@ // The if is only for when this is run from the browser

// if it doesn't exist
let OpenAPISnippets = window.OpenAPISnippets || {}
let OpenAPISnippets = window.OpenAPISnippets || {};

@@ -218,7 +227,7 @@ // define that object

getSnippets,
getEndpointSnippets
}
getEndpointSnippets,
};
// replace/create the global namespace
window.OpenAPISnippets = OpenAPISnippets
window.OpenAPISnippets = OpenAPISnippets;
}

@@ -21,3 +21,3 @@ /**

*/
const OpenAPISampler = require('openapi-sampler')
const OpenAPISampler = require('openapi-sampler');

@@ -37,6 +37,6 @@ /**

if (typeof queryParamValues === 'undefined') {
queryParamValues = {}
queryParamValues = {};
}
const baseUrl = getBaseUrl(openApi)
const baseUrl = getBaseUrl(openApi, path, method);

@@ -51,11 +51,11 @@ const har = {

headersSize: 0,
bodySize: 0
}
bodySize: 0,
};
// get payload data, if available:
const postData = getPayload(openApi, path, method)
if (postData) har.postData = postData
const postData = getPayload(openApi, path, method);
if (postData) har.postData = postData;
return har
}
return har;
};

@@ -75,34 +75,55 @@ /**

for (let i in openApi.paths[path][method].parameters) {
const param = openApi.paths[path][method].parameters[i]
if (typeof param.in !== 'undefined' && param.in.toLowerCase() === 'body' &&
typeof param.schema !== 'undefined') {
try {
const sample = OpenAPISampler.sample(param.schema, {skipReadOnly: true}, openApi)
return {
mimeType: 'application/json',
text: JSON.stringify(sample)
}
} catch (err) {
console.log(err)
return null
}
const param = openApi.paths[path][method].parameters[i];
if (
typeof param.in !== 'undefined' &&
param.in.toLowerCase() === 'body' &&
typeof param.schema !== 'undefined'
) {
try {
const sample = OpenAPISampler.sample(
param.schema,
{ skipReadOnly: true },
openApi
);
return {
mimeType: 'application/json',
text: JSON.stringify(sample),
};
} catch (err) {
console.log(err);
return null;
}
}
}
}
if (openApi.paths[path][method].requestBody && openApi.paths[path][method].requestBody['$ref']) {
openApi.paths[path][method].requestBody = resolveRef(openApi, openApi.paths[path][method].requestBody['$ref']);
if (
openApi.paths[path][method].requestBody &&
openApi.paths[path][method].requestBody['$ref']
) {
openApi.paths[path][method].requestBody = resolveRef(
openApi,
openApi.paths[path][method].requestBody['$ref']
);
}
if (openApi.paths[path][method].requestBody && openApi.paths[path][method].requestBody.content &&
openApi.paths[path][method].requestBody.content['application/json'] &&
openApi.paths[path][method].requestBody.content['application/json'].schema) {
const sample = OpenAPISampler.sample(openApi.paths[path][method].requestBody.content['application/json'].schema, {skipReadOnly: true}, openApi)
return {
mimeType: 'application/json',
text: JSON.stringify(sample)
}
}
return null
}
if (
openApi.paths[path][method].requestBody &&
openApi.paths[path][method].requestBody.content &&
openApi.paths[path][method].requestBody.content['application/json'] &&
openApi.paths[path][method].requestBody.content['application/json'].schema
) {
const sample = OpenAPISampler.sample(
openApi.paths[path][method].requestBody.content['application/json']
.schema,
{ skipReadOnly: true },
openApi
);
return {
mimeType: 'application/json',
text: JSON.stringify(sample),
};
}
return null;
};

@@ -115,20 +136,23 @@ /**

*/
const getBaseUrl = function (openApi) {
if (openApi.servers)
return openApi.servers[0].url
let baseUrl = ''
const getBaseUrl = function (openApi, path, method) {
if (openApi.paths[path][method].servers)
return openApi.paths[path][method].servers[0].url;
if (openApi.paths[path].servers) return openApi.paths[path].servers[0].url;
if (openApi.servers) return openApi.servers[0].url;
let baseUrl = '';
if (typeof openApi.schemes !== 'undefined') {
baseUrl += openApi.schemes[0]
baseUrl += openApi.schemes[0];
} else {
baseUrl += 'http'
baseUrl += 'http';
}
if (openApi.basePath === '/') {
baseUrl += '://' + openApi.host
baseUrl += '://' + openApi.host;
} else {
baseUrl += '://' + openApi.host + openApi.basePath
baseUrl += '://' + openApi.host + openApi.basePath;
}
return baseUrl
}
return baseUrl;
};

@@ -148,19 +172,21 @@ /**

if (typeof values === 'undefined') {
values = {}
values = {};
}
const queryStrings = []
const queryStrings = [];
if (typeof openApi.paths[path][method].parameters !== 'undefined') {
for (let i in openApi.paths[path][method].parameters) {
let param = openApi.paths[path][method].parameters[i]
if (typeof param['$ref'] === 'string' &&
/^#/.test(param['$ref'])) {
param = resolveRef(openApi, param['$ref'])
let param = openApi.paths[path][method].parameters[i];
if (typeof param['$ref'] === 'string' && /^#/.test(param['$ref'])) {
param = resolveRef(openApi, param['$ref']);
}
if (typeof param.schema !== 'undefined') {
if (typeof param.schema['$ref'] === 'string' &&
/^#/.test(param.schema['$ref'])) {
param.schema = resolveRef(openApi, param.schema['$ref'])
if (typeof param.schema.type === 'undefined') { // many schemas don't have an explicit type
if (
typeof param.schema['$ref'] === 'string' &&
/^#/.test(param.schema['$ref'])
) {
param.schema = resolveRef(openApi, param.schema['$ref']);
if (typeof param.schema.type === 'undefined') {
// many schemas don't have an explicit type
param.schema.type = 'object';

@@ -170,15 +196,24 @@ }

}
if (typeof param.in !== 'undefined' && param.in.toLowerCase() === 'query') {
let value = 'SOME_' + (param.type || param.schema.type).toUpperCase() + '_VALUE'
if (
typeof param.in !== 'undefined' &&
param.in.toLowerCase() === 'query'
) {
let value =
'SOME_' + (param.type || param.schema.type).toUpperCase() + '_VALUE';
if (typeof values[param.name] !== 'undefined') {
value = values[param.name] + '' /* adding a empty string to convert to string */
value =
values[param.name] +
''; /* adding a empty string to convert to string */
} else if (typeof param.default !== 'undefined') {
value = param.default + ''
} else if (typeof param.schema !== 'undefined' && typeof param.schema.example !== 'undefined') {
value = param.schema.example + ''
value = param.default + '';
} else if (
typeof param.schema !== 'undefined' &&
typeof param.schema.example !== 'undefined'
) {
value = param.schema.example + '';
}
queryStrings.push({
name: param.name,
value: value
})
value: value,
});
}

@@ -188,4 +223,4 @@ }

return queryStrings
}
return queryStrings;
};

@@ -201,15 +236,19 @@ /**

const getFullPath = function (openApi, path, method) {
let fullPath = path
const parameters = openApi.paths[path].parameters || openApi.paths[path][method].parameters;
let fullPath = path;
const parameters =
openApi.paths[path].parameters || openApi.paths[path][method].parameters;
if (typeof parameters !== 'undefined') {
for (let i in parameters) {
let param = parameters[i]
if (typeof param['$ref'] === 'string' &&
/^#/.test(param['$ref'])) {
param = resolveRef(openApi, param['$ref'])
let param = parameters[i];
if (typeof param['$ref'] === 'string' && /^#/.test(param['$ref'])) {
param = resolveRef(openApi, param['$ref']);
}
if (typeof param.in !== 'undefined' && param.in.toLowerCase() === 'path') {
if (typeof param.example !== 'undefined') { // only if the schema has an example value
fullPath = fullPath.replace("{" + param.name + "}", param.example)
if (
typeof param.in !== 'undefined' &&
param.in.toLowerCase() === 'path'
) {
if (typeof param.example !== 'undefined') {
// only if the schema has an example value
fullPath = fullPath.replace('{' + param.name + '}', param.example);
}

@@ -219,4 +258,4 @@ }

}
return fullPath
}
return fullPath;
};

@@ -233,4 +272,4 @@ /**

const getHeadersArray = function (openApi, path, method) {
const headers = []
const pathObj = openApi.paths[path][method]
const headers = [];
const pathObj = openApi.paths[path][method];

@@ -240,7 +279,7 @@ // 'accept' header:

for (let i in pathObj.consumes) {
const type = pathObj.consumes[i]
const type = pathObj.consumes[i];
headers.push({
name: 'accept',
value: type
})
value: type,
});
}

@@ -252,7 +291,7 @@ }

for (let j in pathObj.produces) {
const type2 = pathObj.produces[j]
const type2 = pathObj.produces[j];
headers.push({
name: 'content-type',
value: type2
})
value: type2,
});
}

@@ -263,8 +302,8 @@ }

if (pathObj.requestBody && pathObj.requestBody.content) {
for (const type3 of Object.keys(pathObj.requestBody.content)) {
headers.push({
name: 'content-type',
value: type3
});
}
for (const type3 of Object.keys(pathObj.requestBody.content)) {
headers.push({
name: 'content-type',
value: type3,
});
}
}

@@ -275,8 +314,14 @@

for (let k in pathObj.parameters) {
const param = pathObj.parameters[k]
if (typeof param.in !== 'undefined' && param.in.toLowerCase() === 'header') {
const param = pathObj.parameters[k];
if (
typeof param.in !== 'undefined' &&
param.in.toLowerCase() === 'header'
) {
headers.push({
name: param.name,
value: 'SOME_' + (param.type||param.schema.type).toUpperCase() + '_VALUE'
})
value:
'SOME_' +
(param.type || param.schema.type).toUpperCase() +
'_VALUE',
});
}

@@ -287,15 +332,15 @@ }

// security:
let basicAuthDef
let apiKeyAuthDef
let oauthDef
let basicAuthDef;
let apiKeyAuthDef;
let oauthDef;
if (typeof pathObj.security !== 'undefined') {
for (var l in pathObj.security) {
const secScheme = Object.keys(pathObj.security[l])[0]
const secDefinition = openApi.securityDefinitions ?
openApi.securityDefinitions[secScheme] :
openApi.components.securitySchemes[secScheme];
const secScheme = Object.keys(pathObj.security[l])[0];
const secDefinition = openApi.securityDefinitions
? openApi.securityDefinitions[secScheme]
: openApi.components.securitySchemes[secScheme];
const authType = secDefinition.type.toLowerCase();
let authScheme = null;
if(authType !== 'apikey' && secDefinition.scheme != null){
if (authType !== 'apikey' && secDefinition.scheme != null) {
authScheme = secDefinition.scheme.toLowerCase();

@@ -306,22 +351,22 @@ }

case 'basic':
basicAuthDef = secScheme
break
basicAuthDef = secScheme;
break;
case 'apikey':
if (secDefinition.in === 'header') {
apiKeyAuthDef = secDefinition
apiKeyAuthDef = secDefinition;
}
break
break;
case 'oauth2':
oauthDef = secScheme
break
oauthDef = secScheme;
break;
case 'http':
switch(authScheme){
switch (authScheme) {
case 'bearer':
oauthDef = secScheme
break
oauthDef = secScheme;
break;
case 'basic':
basicAuthDef = secScheme
break
basicAuthDef = secScheme;
break;
}
break
break;
}

@@ -332,33 +377,33 @@ }

for (let m in openApi.security) {
const secScheme = Object.keys(openApi.security[m])[0]
const secScheme = Object.keys(openApi.security[m])[0];
const secDefinition = openApi.components.securitySchemes[secScheme];
const authType = secDefinition.type.toLowerCase();
let authScheme = null;
if(authType !== 'apikey' && authType !== 'oauth2'){
if (authType !== 'apikey' && authType !== 'oauth2') {
authScheme = secDefinition.scheme.toLowerCase();
}
switch (authType) {
case 'http':
switch(authScheme){
case 'bearer':
oauthDef = secScheme
break
switch (authScheme) {
case 'bearer':
oauthDef = secScheme;
break;
case 'basic':
basicAuthDef = secScheme
break
basicAuthDef = secScheme;
break;
}
break
break;
case 'basic':
basicAuthDef = secScheme
break
basicAuthDef = secScheme;
break;
case 'apikey':
if (secDefinition.in === 'header') {
apiKeyAuthDef = secDefinition
apiKeyAuthDef = secDefinition;
}
break
break;
case 'oauth2':
oauthDef = secScheme
break
oauthDef = secScheme;
break;
}

@@ -371,18 +416,18 @@ }

name: 'Authorization',
value: 'Basic ' + 'REPLACE_BASIC_AUTH'
})
value: 'Basic ' + 'REPLACE_BASIC_AUTH',
});
} else if (apiKeyAuthDef) {
headers.push({
name: apiKeyAuthDef.name,
value: 'REPLACE_KEY_VALUE'
})
value: 'REPLACE_KEY_VALUE',
});
} else if (oauthDef) {
headers.push({
name: 'Authorization',
value: 'Bearer ' + 'REPLACE_BEARER_TOKEN'
})
value: 'Bearer ' + 'REPLACE_BEARER_TOKEN',
});
}
return headers
}
return headers;
};

@@ -397,25 +442,24 @@ /**

try {
// determine basePath:
const baseUrl = getBaseUrl(openApi)
// iterate openApi and create har objects:
const harList = []
const harList = [];
for (let path in openApi.paths) {
for (let method in openApi.paths[path]) {
const url = baseUrl + path
const har = createHar(openApi, path, method)
const url = getBaseUrl(openApi, path, method) + path;
const har = createHar(openApi, path, method);
harList.push({
method: method.toUpperCase(),
url: url,
description: openApi.paths[path][method].description || 'No description available',
har: har
})
description:
openApi.paths[path][method].description ||
'No description available',
har: har,
});
}
}
return harList
return harList;
} catch (e) {
console.log(e);
}
}
};

@@ -430,20 +474,21 @@ /**

const resolveRef = function (openApi, ref) {
const parts = ref.split('/')
const parts = ref.split('/');
if (parts.length <= 1) return {} // = 3
if (parts.length <= 1) return {}; // = 3
const recursive = function (obj, index) {
if (index + 1 < parts.length) { // index = 1
let newCount = index + 1
return recursive(obj[parts[index]], newCount)
if (index + 1 < parts.length) {
// index = 1
let newCount = index + 1;
return recursive(obj[parts[index]], newCount);
} else {
return obj[parts[index]]
return obj[parts[index]];
}
}
return recursive(openApi, 1)
}
};
return recursive(openApi, 1);
};
module.exports = {
getAll: openApiToHarList,
getEndpoint: createHar
}
getEndpoint: createHar,
};
{
"name": "openapi-snippet",
"version": "0.9.2",
"version": "0.9.3",
"description": "Generates code snippets from Open API (previously Swagger) documents.",

@@ -28,3 +28,4 @@ "repository": {

"browserify": "^16.2.3",
"tap-spec": "^5.0.0",
"prettier": "2.3.0",
"tap-spec": "^2.2.2",
"tape": "^4.10.1",

@@ -31,0 +32,0 @@ "uglifyify": "^5.0.2"

@@ -1,1 +0,953 @@

{"swagger":"2.0","info":{"title":"IBM Alchemy Data News","version":"1.0","description":"Alchemy Data News provides news and blog content enriched with natural language processing to allow for highly targeted search and trend analysis. Now you can query the world's news sources and blogs like a database.","x-tags":["News","Natural Language Processing","Blogs"],"contact":{"url":"https://support.ng.bluemix.net/supportticket/"}},"externalDocs":{"url":"https://www.ibm.com/watson/developercloud/alchemydata-news/api/v1/"},"host":"gateway-a.watsonplatform.net","schemes":["https"],"basePath":"/calls","paths":{"/data/GetNews":{"get":{"tags":["News"],"summary":"Analyze news","description":"Analyze news using Natural Language Processing (NLP) queries and sophisticated filters.","operationId":"GetNews","produces":["application/json","application/xml"],"parameters":[{"in":"query","description":"API key (optional in the API explorer)","name":"apikey","required":true,"type":"string"},{"in":"query","description":"Output mode","name":"outputMode","type":"string","enum":["xml","json"],"default":"json"},{"in":"query","description":"Start date","name":"start","required":true,"type":"string","default":"now-1d"},{"in":"query","description":"End date","name":"end","required":true,"type":"string","default":"now"},{"in":"query","description":"Maximum results","name":"maxResults","default":10,"type":"integer"},{"in":"query","description":"Time slice","name":"timeSlice","type":"string"},{"in":"query","description":"Fields to return for each document (comma separated). e.g. enriched.url.title,enriched.url.author,enriched.url.keywords","name":"return","type":"string","collectionFormat":"csv"},{"in":"query","description":"Example filter query parameter (title relations)","name":"q.enriched.url.enrichedTitle.relations.relation","type":"string"},{"in":"query","description":"Example filter query parameter (title entity)","name":"q.enriched.url.enrichedTitle.entities.entity","type":"string"},{"in":"query","description":"Example filter query parameter (title taxonomy)","name":"q.enriched.url.enrichedTitle.taxonomy.taxonomy_","type":"string"},{"in":"query","description":"Example filter query parameter (sentiment)","name":"q.enriched.url.enrichedTitle.docSentiment.type","type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/NewsResponse"}}},"x-apih-advice":{"totalUsageCount":26,"topQueryParams":[{"paramName":"apikey","paramValues":[{"value":"<Hiding desensitized value>","count":3,"source":["https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221"]},{"value":"<Hiding desensitized value>","count":2,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"]},{"value":"<Hiding desensitized value>","count":2,"source":["https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]},{"value":"<Hiding desensitized value>","count":2,"source":["https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56"]}],"bestSources":null,"count":10},{"paramName":"end","paramValues":[{"value":"now","count":10,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221","https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]}],"bestSources":[{"url":"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","sourceId":2},{"url":"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414","sourceId":3}],"count":10},{"paramName":"outputMode","paramValues":[{"value":"json","count":10,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221","https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]}],"bestSources":[{"url":"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","sourceId":2},{"url":"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414","sourceId":3}],"count":10},{"paramName":"return","paramValues":[{"value":"enriched.url.url,enriched.url.title","count":7,"source":["https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221","https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]},{"value":"enriched.url.url,enriched.url.title,enriched.url.text","count":2,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"]},{"value":"q.enriched.url.title,q.enriched.url.entities","count":1,"source":["https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26"]}],"bestSources":null,"count":10},{"paramName":"start","paramValues":[{"value":"now-1d","count":5,"source":["https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221"]},{"value":"now-3.0d","count":2,"source":["https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]},{"value":"now-7d","count":2,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"]},{"value":"now-3d","count":1,"source":["https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26"]}],"bestSources":null,"count":10},{"paramName":"count","paramValues":[{"value":"5","count":9,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221","https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]}],"bestSources":[{"url":"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","sourceId":2},{"url":"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414","sourceId":3}],"count":9},{"paramName":"q.enriched.url.enrichedTitle.keywords.keyword.text","paramValues":[{"value":"{candidateNameArray.0 candidateNameArray.1}","count":2,"source":["https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]},{"value":"{newsTopic}","count":2,"source":["https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52","https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56"]}],"bestSources":null,"count":7},{"paramName":"q.enriched.url.title","paramValues":[{"value":"Asian Carp","count":2,"source":["https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64","https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"]}],"bestSources":null,"count":2}],"topPayloadParams":[{"paramName":"end","paramValues":[{"value":"now","count":1,"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}],"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"count":1},{"paramName":"maxResults","paramValues":[{"value":"10","count":1,"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}],"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"count":1},{"paramName":"outputMode","paramValues":[{"value":"json","count":1,"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}],"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"count":1},{"paramName":"return","paramValues":[{"value":"enriched.url.title,enriched.url.url,enriched.url.author","count":1,"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}],"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"count":1},{"paramName":"start","paramValues":[{"value":"now-10d","count":1,"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}],"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"count":1}],"topJQueryAjaxParams":null,"topResponseFields":[{"fieldName":"result.docs.length","count":5,"total":26,"bestSources":[{"url":"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","sourceId":2},{"url":"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414","sourceId":3}],"source":["https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222","https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222","https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221","https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414","https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"]},{"fieldName":"result.docs","count":1,"total":26,"bestSources":[{"url":"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47","sourceId":1}],"source":["https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"]}]}}}},"definitions":{"NewsResponse":{"type":"object","properties":{"status":{"type":"string"},"usage":{"type":"string"},"totalTransactions":{"type":"string"},"result":{"type":"object","properties":{"docs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"object","properties":{"enriched":{"type":"object","properties":{"url":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]}},"required":["url"]}},"required":["enriched"]},"timestamp":{"type":"integer"}},"required":["id","source","timestamp"]}},"next":{"type":"string"},"status":{"type":"string"}},"required":["docs","next","status"]}},"required":["status","usage","totalTransactions","result"]}},"x-apih-id":"ibm_watson_alchemy_data_news_api","x-apih-ghusage":{"count":0,"topUsages":[{"repository":"likethecolor/Alchemy-API","repoUrl":"https://github.com/likethecolor/Alchemy-API","description":"Java client for the service provided by AlchemyAPI (a cloud-based text mining platform http://www.alchemyapi.com/)","language":"Java","stargazers":9,"watchers":9,"forks":13,"subscribers":3,"sources":["https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/AbstractParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/RelationsParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/ConceptParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/KeywordParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomyParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomiesParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/entity/ResponseTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/MicroformatParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/LanguageParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/entity/HeaderAlchemyEntityTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TitleParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/AuthorParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/SentimentParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/AbstractParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/RelationsParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/KeywordParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/ConceptParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomyParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomiesParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/entity/ResponseTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/MicroformatParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/LanguageParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/entity/HeaderAlchemyEntityTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TitleParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/SentimentParserTest.java","https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/AuthorParserTest.java"]},{"repository":"xiagu/plotlines","repoUrl":"https://github.com/xiagu/plotlines","description":"Generate a narrative chart for a well-known book or movie","language":"HTML","stargazers":6,"watchers":6,"forks":2,"subscribers":4,"sources":["https://github.com/xiagu/plotlines/blob/053f60b65e7fb95e701d71d5b61ff5efef2adf2d/data/mock.js"]},{"repository":"zemanel/HNMood","repoUrl":"https://github.com/zemanel/HNMood","description":null,"language":"Python","stargazers":4,"watchers":4,"forks":0,"subscribers":1,"sources":["https://github.com/zemanel/HNMood/blob/bd6d1f230f8a612f665e334cd653afb59bc056b2/docs/alchemy_response.js"]},{"repository":"mollywhitnack/the-daily-feels","repoUrl":"https://github.com/mollywhitnack/the-daily-feels","description":null,"language":"JavaScript","stargazers":2,"watchers":2,"forks":2,"subscribers":4,"sources":["https://github.com/mollywhitnack/the-daily-feels/blob/e5cb50c7ae82e04ab17e529584fb3ad023165c3f/src/api/mockNewsApi.js","https://github.com/mollywhitnack/the-daily-feels/blob/74eb040adddc473d278921b94fbdbb566cd17882/src/api/mockNewsApi.js"]},{"repository":"wjohnson1000/Frontend_Personal_Project","repoUrl":"https://github.com/wjohnson1000/Frontend_Personal_Project","description":"Repo for g15 1st quarter project","language":"JavaScript","stargazers":2,"watchers":2,"forks":0,"subscribers":2,"sources":["https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js"]},{"repository":"Soaring-Outliers/news_graph","repoUrl":"https://github.com/Soaring-Outliers/news_graph","description":"Graph gathering news","language":"JavaScript","stargazers":1,"watchers":1,"forks":0,"subscribers":1,"sources":["https://github.com/Soaring-Outliers/news_graph/blob/ae7cde461e49b6ee8fe932fcf6c581f3a5574da4/graph/models.py"]},{"repository":"collective/eea.alchemy","repoUrl":"https://github.com/collective/eea.alchemy","description":"Auto-discover geographical coverage, temporal coverage and keywords from documents common metadata (title, description, body, etc).","language":"Python","stargazers":1,"watchers":1,"forks":1,"subscribers":168,"sources":["https://github.com/collective/eea.alchemy/blob/6bf1ac036272423877639414d6e06fc55969d756/eea/alchemy/tests/fake.py","https://github.com/collective/eea.alchemy/blob/25a833a7fa73024ad8cc2dd239b854a702348e59/eea/alchemy/tests/fake.py"]},{"repository":"ErikTillberg/SentimentVsStockPriceAnalyzer","repoUrl":"https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer","description":"Using Watson's text sentiment analysis to map twitter sentiment against stock prices","language":"Python","stargazers":0,"watchers":0,"forks":0,"subscribers":2,"sources":["https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer/blob/f7fbb1594bb0ecba9f983664e155c694694d759a/alchemy_sentiment.py","https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer/blob/79db784d4d5f109c6bf0e4776b4244a2dec5f8a9/alchemy_sentiment.py"]},{"repository":"annaet/spotlight-news","repoUrl":"https://github.com/annaet/spotlight-news","description":null,"language":"JavaScript","stargazers":0,"watchers":0,"forks":0,"subscribers":4,"sources":["https://github.com/annaet/spotlight-news/blob/05d43e011357ee32e87921e54bc9fbb4a4c77066/app/scripts/controllers/dendrogram.js"]},{"repository":"adalrsjr1/www","repoUrl":"https://github.com/adalrsjr1/www","description":null,"language":"PHP","stargazers":0,"watchers":0,"forks":0,"subscribers":1,"sources":["https://github.com/adalrsjr1/www/blob/eaaf400107ba0cd03c678af076e66ec1d98f8326/ccbeu.com/ccbeu-perfil/AppCore.php"]}]},"x-apih-relationships":[{"relatedApiId":"ibm_watson_alchemy_language_api","commonUsages":[{"github_repo_name":"wjohnson1000/Frontend_Personal_Project","stargazers_count":2},{"github_repo_name":"wjohnson1000/wjohnson1000.github.io","stargazers_count":0},{"github_repo_name":"sfaries/AlchemyNews","stargazers_count":0},{"github_repo_name":"sickle5stone/FishyBusiness","stargazers_count":0},{"github_repo_name":"kongyujian/Fishackathon2016_Geospatial","stargazers_count":0},{"github_repo_name":"alexbtk/amos-ss16-proj9","stargazers_count":0},{"github_repo_name":"Liux0047/watsonapp","stargazers_count":0},{"github_repo_name":"ljm7b2/advSftwrEngnrTest","stargazers_count":0},{"github_repo_name":"cmoulika009/ASE-Lab-Assignments","stargazers_count":0},{"github_repo_name":"FlyMoe/Candidus-Informatio","stargazers_count":0},{"github_repo_name":"alexlcortes/another-test-repo","stargazers_count":0}]},{"relatedApiId":"ibm_watson_alchemy_vision_api","commonUsages":[{"github_repo_name":"wjohnson1000/Frontend_Personal_Project","stargazers_count":2},{"github_repo_name":"wjohnson1000/wjohnson1000.github.io","stargazers_count":0},{"github_repo_name":"sfaries/AlchemyNews","stargazers_count":0},{"github_repo_name":"sickle5stone/FishyBusiness","stargazers_count":0},{"github_repo_name":"kongyujian/Fishackathon2016_Geospatial","stargazers_count":0},{"github_repo_name":"alexbtk/amos-ss16-proj9","stargazers_count":0},{"github_repo_name":"Liux0047/watsonapp","stargazers_count":0},{"github_repo_name":"ljm7b2/advSftwrEngnrTest","stargazers_count":0},{"github_repo_name":"cmoulika009/ASE-Lab-Assignments","stargazers_count":0},{"github_repo_name":"FlyMoe/Candidus-Informatio","stargazers_count":0},{"github_repo_name":"alexlcortes/another-test-repo","stargazers_count":0}]},{"relatedApiId":"yahoo_weather_api","commonUsages":[{"github_repo_name":"sickle5stone/FishyBusiness","stargazers_count":0},{"github_repo_name":"kongyujian/Fishackathon2016_Geospatial","stargazers_count":0}]},{"relatedApiId":"google_civic_info_api","commonUsages":[{"github_repo_name":"FlyMoe/Candidus-Informatio","stargazers_count":0},{"github_repo_name":"alexlcortes/another-test-repo","stargazers_count":0}]},{"relatedApiId":"google_civicinfo_api","commonUsages":[{"github_repo_name":"FlyMoe/Candidus-Informatio","stargazers_count":0},{"github_repo_name":"alexlcortes/another-test-repo","stargazers_count":0}]},{"relatedApiId":"google_blogger_api","commonUsages":[{"github_repo_name":"atrijitdasgupta/streetbuzz-investor","stargazers_count":0}]},{"relatedApiId":"amazon_product_advertising_api","commonUsages":[{"github_repo_name":"atrijitdasgupta/streetbuzz-investor","stargazers_count":0}]},{"relatedApiId":"quizlet_api_v2","commonUsages":[{"github_repo_name":"jaxball/hackthenorth16","stargazers_count":0}]}],"x-apih-sdks":[{"name":"rest-api-client","downloads":{"last-day":0,"last-month":100,"last-week":26},"description":"Simple REST client built on the request module","url":"https://www.npmjs.com/package/rest-api-client","repoUrl":"https://github.com/ryanlelek/rest-api-client","language":"JavaScript"},{"language":"JavaScript","description":"Node.js REST API client for Parse.com","url":"https://www.npmjs.com/package/parse-rest-api","name":"parse-rest-api","downloads":{"last-day":0,"last-month":21,"last-week":3}},{"name":"json-rest-api","downloads":{"last-day":0,"last-month":106,"last-week":16},"description":"A simple lightweight REST API that receives and responds to JSON HTTP requests, supports all verbs. Very simple.","url":"https://www.npmjs.com/package/json-rest-api","repoUrl":"git://github.com/stdarg/json-rest-api","language":"JavaScript"},{"name":"pimatic-rest-api","downloads":{"last-day":0,"last-month":120,"last-week":16},"description":"Provides a rest-api for the webinterface.","url":"https://www.npmjs.com/package/pimatic-rest-api","repoUrl":"git://github.com/pimatic/pimatic-rest-api","language":"JavaScript"},{"name":"keystone-rest-api","downloads":{"last-day":1,"last-month":58,"last-week":10},"description":"Creates a powerful Rest API based on Keystone Lists","url":"https://www.npmjs.com/package/keystone-rest-api","repoUrl":"git+https://github.com/sarriaroman/Keystone-Rest-API","language":"JavaScript","license":"ISC"},{"name":"sails-hook-cti-rest-api-responses","downloads":{"last-day":0,"last-month":26,"last-week":6},"description":"REST friendly api responses for sails","url":"https://www.npmjs.com/package/sails-hook-cti-rest-api-responses","repoUrl":"git+https://github.com/CanTireInnovations/sails-hook-cti-rest-api-responses","language":"JavaScript","license":"ISC"},{"name":"ember-cli-rest-api-blueprint","downloads":{"last-day":2,"last-month":274,"last-week":59},"description":"Ember CLI blueprint addon for a DS.RESTAdapter compatible REST API","url":"https://www.npmjs.com/package/ember-cli-rest-api-blueprint","repoUrl":"git://github.com/manuelmitasch/ember-cli-rest-api-blueprint","language":"JavaScript","license":"MIT"},{"name":"pulsar-rest-api-client-node","downloads":{"last-day":0,"last-month":97,"last-week":10},"description":"pulsar-rest-api-client-node [![Build Status](https://travis-ci.org/cargomedia/pulsar-rest-api-client-node.svg?branch=master)](https://travis-ci.org/cargomedia/pulsar-rest-api-client-node) ===========================","url":"https://www.npmjs.com/package/pulsar-rest-api-client-node","repoUrl":"git+ssh://git@github.com/cargomedia/pulsar-rest-api-client-node","language":"JavaScript","license":"MIT"},{"name":"pulsar-rest-api","downloads":{"last-day":0,"last-month":160,"last-week":22},"description":"REST API for executing Pulsar tasks.","url":"https://www.npmjs.com/package/pulsar-rest-api","repoUrl":"git+ssh://git@github.com/cargomedia/pulsar-rest-api","language":"JavaScript","license":"MIT"},{"name":"git-rest-api","downloads":{"last-day":1,"last-month":137,"last-week":27},"description":"A library providing a restful Git API mimicking as most as possible the old good git","url":"https://www.npmjs.com/package/git-rest-api","repoUrl":"https://github.com/korya/node-git-rest-api","language":"JavaScript"}],"x-apih-organization":"public","meta":{"revision":0,"created":1495048571337,"version":0},"$loki":479}
{
"swagger": "2.0",
"info": {
"title": "IBM Alchemy Data News",
"version": "1.0",
"description": "Alchemy Data News provides news and blog content enriched with natural language processing to allow for highly targeted search and trend analysis. Now you can query the world's news sources and blogs like a database.",
"x-tags": ["News", "Natural Language Processing", "Blogs"],
"contact": { "url": "https://support.ng.bluemix.net/supportticket/" }
},
"externalDocs": {
"url": "https://www.ibm.com/watson/developercloud/alchemydata-news/api/v1/"
},
"host": "gateway-a.watsonplatform.net",
"schemes": ["https"],
"basePath": "/calls",
"paths": {
"/data/GetNews": {
"get": {
"tags": ["News"],
"summary": "Analyze news",
"description": "Analyze news using Natural Language Processing (NLP) queries and sophisticated filters.",
"operationId": "GetNews",
"produces": ["application/json", "application/xml"],
"parameters": [
{
"in": "query",
"description": "API key (optional in the API explorer)",
"name": "apikey",
"required": true,
"type": "string"
},
{
"in": "query",
"description": "Output mode",
"name": "outputMode",
"type": "string",
"enum": ["xml", "json"],
"default": "json"
},
{
"in": "query",
"description": "Start date",
"name": "start",
"required": true,
"type": "string",
"default": "now-1d"
},
{
"in": "query",
"description": "End date",
"name": "end",
"required": true,
"type": "string",
"default": "now"
},
{
"in": "query",
"description": "Maximum results",
"name": "maxResults",
"default": 10,
"type": "integer"
},
{
"in": "query",
"description": "Time slice",
"name": "timeSlice",
"type": "string"
},
{
"in": "query",
"description": "Fields to return for each document (comma separated). e.g. enriched.url.title,enriched.url.author,enriched.url.keywords",
"name": "return",
"type": "string",
"collectionFormat": "csv"
},
{
"in": "query",
"description": "Example filter query parameter (title relations)",
"name": "q.enriched.url.enrichedTitle.relations.relation",
"type": "string"
},
{
"in": "query",
"description": "Example filter query parameter (title entity)",
"name": "q.enriched.url.enrichedTitle.entities.entity",
"type": "string"
},
{
"in": "query",
"description": "Example filter query parameter (title taxonomy)",
"name": "q.enriched.url.enrichedTitle.taxonomy.taxonomy_",
"type": "string"
},
{
"in": "query",
"description": "Example filter query parameter (sentiment)",
"name": "q.enriched.url.enrichedTitle.docSentiment.type",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": { "$ref": "#/definitions/NewsResponse" }
}
},
"x-apih-advice": {
"totalUsageCount": 26,
"topQueryParams": [
{
"paramName": "apikey",
"paramValues": [
{
"value": "<Hiding desensitized value>",
"count": 3,
"source": [
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221"
]
},
{
"value": "<Hiding desensitized value>",
"count": 2,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"
]
},
{
"value": "<Hiding desensitized value>",
"count": 2,
"source": [
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
},
{
"value": "<Hiding desensitized value>",
"count": 2,
"source": [
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56"
]
}
],
"bestSources": null,
"count": 10
},
{
"paramName": "end",
"paramValues": [
{
"value": "now",
"count": 10,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221",
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
}
],
"bestSources": [
{
"url": "https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"sourceId": 2
},
{
"url": "https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414",
"sourceId": 3
}
],
"count": 10
},
{
"paramName": "outputMode",
"paramValues": [
{
"value": "json",
"count": 10,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221",
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
}
],
"bestSources": [
{
"url": "https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"sourceId": 2
},
{
"url": "https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414",
"sourceId": 3
}
],
"count": 10
},
{
"paramName": "return",
"paramValues": [
{
"value": "enriched.url.url,enriched.url.title",
"count": 7,
"source": [
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221",
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
},
{
"value": "enriched.url.url,enriched.url.title,enriched.url.text",
"count": 2,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"
]
},
{
"value": "q.enriched.url.title,q.enriched.url.entities",
"count": 1,
"source": [
"https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26"
]
}
],
"bestSources": null,
"count": 10
},
{
"paramName": "start",
"paramValues": [
{
"value": "now-1d",
"count": 5,
"source": [
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221"
]
},
{
"value": "now-3.0d",
"count": 2,
"source": [
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
},
{
"value": "now-7d",
"count": 2,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"
]
},
{
"value": "now-3d",
"count": 1,
"source": [
"https://github.com/alexbtk/amos-ss16-proj9/blob/d667a46692f0ea440696a60d6212582f1352006d/src/main/webapp/js/AMOSAlchemy.js#L26"
]
}
],
"bestSources": null,
"count": 10
},
{
"paramName": "count",
"paramValues": [
{
"value": "5",
"count": 9,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221",
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
}
],
"bestSources": [
{
"url": "https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"sourceId": 2
},
{
"url": "https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414",
"sourceId": 3
}
],
"count": 9
},
{
"paramName": "q.enriched.url.enrichedTitle.keywords.keyword.text",
"paramValues": [
{
"value": "{candidateNameArray.0 candidateNameArray.1}",
"count": 2,
"source": [
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
},
{
"value": "{newsTopic}",
"count": 2,
"source": [
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js#L52",
"https://github.com/wjohnson1000/wjohnson1000.github.io/blob/cb99bea35ebb38d6a246fd1da701d83550d769a5/scripts/main.js#L56"
]
}
],
"bestSources": null,
"count": 7
},
{
"paramName": "q.enriched.url.title",
"paramValues": [
{
"value": "Asian Carp",
"count": 2,
"source": [
"https://github.com/sickle5stone/FishyBusiness/blob/230dd18dfdb1a167c3ab39390fc87374dd67d9c0/js/news.js#L64",
"https://github.com/kongyujian/Fishackathon2016_Geospatial/blob/3eba2dd89c82761b7b11d32dc3b5817727ec7d27/js/news.js#L64"
]
}
],
"bestSources": null,
"count": 2
}
],
"topPayloadParams": [
{
"paramName": "end",
"paramValues": [
{
"value": "now",
"count": 1,
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
],
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"count": 1
},
{
"paramName": "maxResults",
"paramValues": [
{
"value": "10",
"count": 1,
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
],
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"count": 1
},
{
"paramName": "outputMode",
"paramValues": [
{
"value": "json",
"count": 1,
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
],
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"count": 1
},
{
"paramName": "return",
"paramValues": [
{
"value": "enriched.url.title,enriched.url.url,enriched.url.author",
"count": 1,
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
],
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"count": 1
},
{
"paramName": "start",
"paramValues": [
{
"value": "now-10d",
"count": 1,
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
],
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"count": 1
}
],
"topJQueryAjaxParams": null,
"topResponseFields": [
{
"fieldName": "result.docs.length",
"count": 5,
"total": 26,
"bestSources": [
{
"url": "https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"sourceId": 2
},
{
"url": "https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414",
"sourceId": 3
}
],
"source": [
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/9e0731d8dde2fd5b7b3145ce25e7d598f8903903/Lab-3-Mashup%20Application/Source/js/app.js#L222",
"https://github.com/cmoulika009/ASE-Lab-Assignments/blob/324ade52edd760d697ed597936265781412285f3/Lab-9-Cloud-Based-App-II/Source/Cloud%20App/js/app.js#L222",
"https://github.com/ljm7b2/advSftwrEngnrTest/blob/dedd1afd4f0ddd52b9d1b94f8dce2cb0d5533de7/Source/LAB_5_MASHUP_SOURCE_CODE/lab_5_API_alchemyNEWS_SPOTIFY_playlists/app.js#L221",
"https://github.com/FlyMoe/Candidus-Informatio/blob/4ecbac214df76e1493cfffc11ba45321a7543b30/assets/javascript/app.js#L414",
"https://github.com/alexlcortes/another-test-repo/blob/c216a20deeec16d648256197df6bd2033131ffde/assets/javascript/app.js#L414"
]
},
{
"fieldName": "result.docs",
"count": 1,
"total": 26,
"bestSources": [
{
"url": "https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47",
"sourceId": 1
}
],
"source": [
"https://github.com/sfaries/AlchemyNews/blob/891a9ef358cc76e03d521d1569d5708134171732/js/alchemy.js#L47"
]
}
]
}
}
}
},
"definitions": {
"NewsResponse": {
"type": "object",
"properties": {
"status": { "type": "string" },
"usage": { "type": "string" },
"totalTransactions": { "type": "string" },
"result": {
"type": "object",
"properties": {
"docs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"source": {
"type": "object",
"properties": {
"enriched": {
"type": "object",
"properties": {
"url": {
"type": "object",
"properties": { "title": { "type": "string" } },
"required": ["title"]
}
},
"required": ["url"]
}
},
"required": ["enriched"]
},
"timestamp": { "type": "integer" }
},
"required": ["id", "source", "timestamp"]
}
},
"next": { "type": "string" },
"status": { "type": "string" }
},
"required": ["docs", "next", "status"]
}
},
"required": ["status", "usage", "totalTransactions", "result"]
}
},
"x-apih-id": "ibm_watson_alchemy_data_news_api",
"x-apih-ghusage": {
"count": 0,
"topUsages": [
{
"repository": "likethecolor/Alchemy-API",
"repoUrl": "https://github.com/likethecolor/Alchemy-API",
"description": "Java client for the service provided by AlchemyAPI (a cloud-based text mining platform http://www.alchemyapi.com/)",
"language": "Java",
"stargazers": 9,
"watchers": 9,
"forks": 13,
"subscribers": 3,
"sources": [
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/AbstractParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/RelationsParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/ConceptParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/KeywordParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomyParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomiesParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/entity/ResponseTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/MicroformatParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/LanguageParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/entity/HeaderAlchemyEntityTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/TitleParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/AuthorParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/test/java/com/likethecolor/alchemy/api/parser/json/SentimentParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/AbstractParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/RelationsParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/KeywordParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/ConceptParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomyParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TaxonomiesParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/NamedEntityParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/entity/ResponseTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/MicroformatParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/LanguageParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/entity/HeaderAlchemyEntityTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/TitleParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/SentimentParserTest.java",
"https://github.com/likethecolor/Alchemy-API/blob/ee054196b8a00fccd40e18748d9fa71aed540fef/src/test/java/com/likethecolor/alchemy/api/parser/json/AuthorParserTest.java"
]
},
{
"repository": "xiagu/plotlines",
"repoUrl": "https://github.com/xiagu/plotlines",
"description": "Generate a narrative chart for a well-known book or movie",
"language": "HTML",
"stargazers": 6,
"watchers": 6,
"forks": 2,
"subscribers": 4,
"sources": [
"https://github.com/xiagu/plotlines/blob/053f60b65e7fb95e701d71d5b61ff5efef2adf2d/data/mock.js"
]
},
{
"repository": "zemanel/HNMood",
"repoUrl": "https://github.com/zemanel/HNMood",
"description": null,
"language": "Python",
"stargazers": 4,
"watchers": 4,
"forks": 0,
"subscribers": 1,
"sources": [
"https://github.com/zemanel/HNMood/blob/bd6d1f230f8a612f665e334cd653afb59bc056b2/docs/alchemy_response.js"
]
},
{
"repository": "mollywhitnack/the-daily-feels",
"repoUrl": "https://github.com/mollywhitnack/the-daily-feels",
"description": null,
"language": "JavaScript",
"stargazers": 2,
"watchers": 2,
"forks": 2,
"subscribers": 4,
"sources": [
"https://github.com/mollywhitnack/the-daily-feels/blob/e5cb50c7ae82e04ab17e529584fb3ad023165c3f/src/api/mockNewsApi.js",
"https://github.com/mollywhitnack/the-daily-feels/blob/74eb040adddc473d278921b94fbdbb566cd17882/src/api/mockNewsApi.js"
]
},
{
"repository": "wjohnson1000/Frontend_Personal_Project",
"repoUrl": "https://github.com/wjohnson1000/Frontend_Personal_Project",
"description": "Repo for g15 1st quarter project",
"language": "JavaScript",
"stargazers": 2,
"watchers": 2,
"forks": 0,
"subscribers": 2,
"sources": [
"https://github.com/wjohnson1000/Frontend_Personal_Project/blob/fd1244fae8a9932819ed287c6f53611b1acd6158/source/scripts/main.js"
]
},
{
"repository": "Soaring-Outliers/news_graph",
"repoUrl": "https://github.com/Soaring-Outliers/news_graph",
"description": "Graph gathering news",
"language": "JavaScript",
"stargazers": 1,
"watchers": 1,
"forks": 0,
"subscribers": 1,
"sources": [
"https://github.com/Soaring-Outliers/news_graph/blob/ae7cde461e49b6ee8fe932fcf6c581f3a5574da4/graph/models.py"
]
},
{
"repository": "collective/eea.alchemy",
"repoUrl": "https://github.com/collective/eea.alchemy",
"description": "Auto-discover geographical coverage, temporal coverage and keywords from documents common metadata (title, description, body, etc).",
"language": "Python",
"stargazers": 1,
"watchers": 1,
"forks": 1,
"subscribers": 168,
"sources": [
"https://github.com/collective/eea.alchemy/blob/6bf1ac036272423877639414d6e06fc55969d756/eea/alchemy/tests/fake.py",
"https://github.com/collective/eea.alchemy/blob/25a833a7fa73024ad8cc2dd239b854a702348e59/eea/alchemy/tests/fake.py"
]
},
{
"repository": "ErikTillberg/SentimentVsStockPriceAnalyzer",
"repoUrl": "https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer",
"description": "Using Watson's text sentiment analysis to map twitter sentiment against stock prices",
"language": "Python",
"stargazers": 0,
"watchers": 0,
"forks": 0,
"subscribers": 2,
"sources": [
"https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer/blob/f7fbb1594bb0ecba9f983664e155c694694d759a/alchemy_sentiment.py",
"https://github.com/ErikTillberg/SentimentVsStockPriceAnalyzer/blob/79db784d4d5f109c6bf0e4776b4244a2dec5f8a9/alchemy_sentiment.py"
]
},
{
"repository": "annaet/spotlight-news",
"repoUrl": "https://github.com/annaet/spotlight-news",
"description": null,
"language": "JavaScript",
"stargazers": 0,
"watchers": 0,
"forks": 0,
"subscribers": 4,
"sources": [
"https://github.com/annaet/spotlight-news/blob/05d43e011357ee32e87921e54bc9fbb4a4c77066/app/scripts/controllers/dendrogram.js"
]
},
{
"repository": "adalrsjr1/www",
"repoUrl": "https://github.com/adalrsjr1/www",
"description": null,
"language": "PHP",
"stargazers": 0,
"watchers": 0,
"forks": 0,
"subscribers": 1,
"sources": [
"https://github.com/adalrsjr1/www/blob/eaaf400107ba0cd03c678af076e66ec1d98f8326/ccbeu.com/ccbeu-perfil/AppCore.php"
]
}
]
},
"x-apih-relationships": [
{
"relatedApiId": "ibm_watson_alchemy_language_api",
"commonUsages": [
{
"github_repo_name": "wjohnson1000/Frontend_Personal_Project",
"stargazers_count": 2
},
{
"github_repo_name": "wjohnson1000/wjohnson1000.github.io",
"stargazers_count": 0
},
{ "github_repo_name": "sfaries/AlchemyNews", "stargazers_count": 0 },
{
"github_repo_name": "sickle5stone/FishyBusiness",
"stargazers_count": 0
},
{
"github_repo_name": "kongyujian/Fishackathon2016_Geospatial",
"stargazers_count": 0
},
{
"github_repo_name": "alexbtk/amos-ss16-proj9",
"stargazers_count": 0
},
{ "github_repo_name": "Liux0047/watsonapp", "stargazers_count": 0 },
{
"github_repo_name": "ljm7b2/advSftwrEngnrTest",
"stargazers_count": 0
},
{
"github_repo_name": "cmoulika009/ASE-Lab-Assignments",
"stargazers_count": 0
},
{
"github_repo_name": "FlyMoe/Candidus-Informatio",
"stargazers_count": 0
},
{
"github_repo_name": "alexlcortes/another-test-repo",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "ibm_watson_alchemy_vision_api",
"commonUsages": [
{
"github_repo_name": "wjohnson1000/Frontend_Personal_Project",
"stargazers_count": 2
},
{
"github_repo_name": "wjohnson1000/wjohnson1000.github.io",
"stargazers_count": 0
},
{ "github_repo_name": "sfaries/AlchemyNews", "stargazers_count": 0 },
{
"github_repo_name": "sickle5stone/FishyBusiness",
"stargazers_count": 0
},
{
"github_repo_name": "kongyujian/Fishackathon2016_Geospatial",
"stargazers_count": 0
},
{
"github_repo_name": "alexbtk/amos-ss16-proj9",
"stargazers_count": 0
},
{ "github_repo_name": "Liux0047/watsonapp", "stargazers_count": 0 },
{
"github_repo_name": "ljm7b2/advSftwrEngnrTest",
"stargazers_count": 0
},
{
"github_repo_name": "cmoulika009/ASE-Lab-Assignments",
"stargazers_count": 0
},
{
"github_repo_name": "FlyMoe/Candidus-Informatio",
"stargazers_count": 0
},
{
"github_repo_name": "alexlcortes/another-test-repo",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "yahoo_weather_api",
"commonUsages": [
{
"github_repo_name": "sickle5stone/FishyBusiness",
"stargazers_count": 0
},
{
"github_repo_name": "kongyujian/Fishackathon2016_Geospatial",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "google_civic_info_api",
"commonUsages": [
{
"github_repo_name": "FlyMoe/Candidus-Informatio",
"stargazers_count": 0
},
{
"github_repo_name": "alexlcortes/another-test-repo",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "google_civicinfo_api",
"commonUsages": [
{
"github_repo_name": "FlyMoe/Candidus-Informatio",
"stargazers_count": 0
},
{
"github_repo_name": "alexlcortes/another-test-repo",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "google_blogger_api",
"commonUsages": [
{
"github_repo_name": "atrijitdasgupta/streetbuzz-investor",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "amazon_product_advertising_api",
"commonUsages": [
{
"github_repo_name": "atrijitdasgupta/streetbuzz-investor",
"stargazers_count": 0
}
]
},
{
"relatedApiId": "quizlet_api_v2",
"commonUsages": [
{ "github_repo_name": "jaxball/hackthenorth16", "stargazers_count": 0 }
]
}
],
"x-apih-sdks": [
{
"name": "rest-api-client",
"downloads": { "last-day": 0, "last-month": 100, "last-week": 26 },
"description": "Simple REST client built on the request module",
"url": "https://www.npmjs.com/package/rest-api-client",
"repoUrl": "https://github.com/ryanlelek/rest-api-client",
"language": "JavaScript"
},
{
"language": "JavaScript",
"description": "Node.js REST API client for Parse.com",
"url": "https://www.npmjs.com/package/parse-rest-api",
"name": "parse-rest-api",
"downloads": { "last-day": 0, "last-month": 21, "last-week": 3 }
},
{
"name": "json-rest-api",
"downloads": { "last-day": 0, "last-month": 106, "last-week": 16 },
"description": "A simple lightweight REST API that receives and responds to JSON HTTP requests, supports all verbs. Very simple.",
"url": "https://www.npmjs.com/package/json-rest-api",
"repoUrl": "git://github.com/stdarg/json-rest-api",
"language": "JavaScript"
},
{
"name": "pimatic-rest-api",
"downloads": { "last-day": 0, "last-month": 120, "last-week": 16 },
"description": "Provides a rest-api for the webinterface.",
"url": "https://www.npmjs.com/package/pimatic-rest-api",
"repoUrl": "git://github.com/pimatic/pimatic-rest-api",
"language": "JavaScript"
},
{
"name": "keystone-rest-api",
"downloads": { "last-day": 1, "last-month": 58, "last-week": 10 },
"description": "Creates a powerful Rest API based on Keystone Lists",
"url": "https://www.npmjs.com/package/keystone-rest-api",
"repoUrl": "git+https://github.com/sarriaroman/Keystone-Rest-API",
"language": "JavaScript",
"license": "ISC"
},
{
"name": "sails-hook-cti-rest-api-responses",
"downloads": { "last-day": 0, "last-month": 26, "last-week": 6 },
"description": "REST friendly api responses for sails",
"url": "https://www.npmjs.com/package/sails-hook-cti-rest-api-responses",
"repoUrl": "git+https://github.com/CanTireInnovations/sails-hook-cti-rest-api-responses",
"language": "JavaScript",
"license": "ISC"
},
{
"name": "ember-cli-rest-api-blueprint",
"downloads": { "last-day": 2, "last-month": 274, "last-week": 59 },
"description": "Ember CLI blueprint addon for a DS.RESTAdapter compatible REST API",
"url": "https://www.npmjs.com/package/ember-cli-rest-api-blueprint",
"repoUrl": "git://github.com/manuelmitasch/ember-cli-rest-api-blueprint",
"language": "JavaScript",
"license": "MIT"
},
{
"name": "pulsar-rest-api-client-node",
"downloads": { "last-day": 0, "last-month": 97, "last-week": 10 },
"description": "pulsar-rest-api-client-node [![Build Status](https://travis-ci.org/cargomedia/pulsar-rest-api-client-node.svg?branch=master)](https://travis-ci.org/cargomedia/pulsar-rest-api-client-node) ===========================",
"url": "https://www.npmjs.com/package/pulsar-rest-api-client-node",
"repoUrl": "git+ssh://git@github.com/cargomedia/pulsar-rest-api-client-node",
"language": "JavaScript",
"license": "MIT"
},
{
"name": "pulsar-rest-api",
"downloads": { "last-day": 0, "last-month": 160, "last-week": 22 },
"description": "REST API for executing Pulsar tasks.",
"url": "https://www.npmjs.com/package/pulsar-rest-api",
"repoUrl": "git+ssh://git@github.com/cargomedia/pulsar-rest-api",
"language": "JavaScript",
"license": "MIT"
},
{
"name": "git-rest-api",
"downloads": { "last-day": 1, "last-month": 137, "last-week": 27 },
"description": "A library providing a restful Git API mimicking as most as possible the old good git",
"url": "https://www.npmjs.com/package/git-rest-api",
"repoUrl": "https://github.com/korya/node-git-rest-api",
"language": "JavaScript"
}
],
"x-apih-organization": "public",
"meta": { "revision": 0, "created": 1495048571337, "version": 0 },
"$loki": 479
}

@@ -1,7 +0,4 @@

{
"swagger": "2.0",
"schemes": [
"https"
],
"schemes": ["https"],
"host": "api.instagram.com",

@@ -34,5 +31,3 @@ "basePath": "/v1",

},
"produces": [
"application/json"
],
"produces": ["application/json"],
"securityDefinitions": {

@@ -134,11 +129,7 @@ "api_key": {

{
"instagram_auth": [
"basic"
]
"instagram_auth": ["basic"]
}
],
"summary": "Get recent media from a custom geo-id.",
"tags": [
"geographies"
]
"tags": ["geographies"]
}

@@ -209,11 +200,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Search for a location by geographic coordinate.",
"tags": [
"locations"
]
"tags": ["locations"]
}

@@ -246,11 +233,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Get information about a location.",
"tags": [
"locations"
]
"tags": ["locations"]
}

@@ -313,11 +296,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Get a list of recent media objects from a given location.",
"tags": [
"locations"
]
"tags": ["locations"]
}

@@ -342,11 +321,7 @@ },

{
"instagram_auth": [
"basic"
]
"instagram_auth": ["basic"]
}
],
"summary": "Get a list of currently popular media.",
"tags": [
"media"
]
"tags": ["media"]
}

@@ -412,11 +387,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Search for media in a given area.",
"tags": [
"media"
]
"tags": ["media"]
}

@@ -449,12 +420,7 @@ },

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get information about a media object.",
"tags": [
"media"
]
"tags": ["media"]
}

@@ -487,12 +453,7 @@ },

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get information about a media object.",
"tags": [
"media"
]
"tags": ["media"]
}

@@ -525,12 +486,7 @@ },

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get a list of recent comments on a media object.",
"tags": [
"comments"
]
"tags": ["comments"]
},

@@ -568,11 +524,7 @@ "post": {

{
"instagram_auth": [
"comments"
]
"instagram_auth": ["comments"]
}
],
"summary": "Create a comment on a media object.",
"tags": [
"comments"
]
"tags": ["comments"]
}

@@ -612,11 +564,7 @@ },

{
"instagram_auth": [
"comments"
]
"instagram_auth": ["comments"]
}
],
"summary": "Remove a comment.",
"tags": [
"comments"
]
"tags": ["comments"]
}

@@ -649,11 +597,7 @@ },

{
"instagram_auth": [
"likes"
]
"instagram_auth": ["likes"]
}
],
"summary": "Remove a like on this media by the current user.",
"tags": [
"likes"
]
"tags": ["likes"]
},

@@ -684,12 +628,7 @@ "get": {

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get a list of users who have liked this media.",
"tags": [
"likes"
]
"tags": ["likes"]
},

@@ -720,11 +659,7 @@ "post": {

{
"instagram_auth": [
"likes"
]
"instagram_auth": ["likes"]
}
],
"summary": "Set a like on this media by the current user.",
"tags": [
"likes"
]
"tags": ["likes"]
}

@@ -757,11 +692,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Search for tags by name.",
"tags": [
"tags"
]
"tags": ["tags"]
}

@@ -794,11 +725,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Get information about a tag object.",
"tags": [
"tags"
]
"tags": ["tags"]
}

@@ -852,11 +779,7 @@ },

{
"instagram_auth": [
"public_content"
]
"instagram_auth": ["public_content"]
}
],
"summary": "Get a list of recently tagged media.",
"tags": [
"tags"
]
"tags": ["tags"]
}

@@ -896,11 +819,7 @@ },

{
"instagram_auth": [
"basic"
]
"instagram_auth": ["basic"]
}
],
"summary": "Search for a user by name.",
"tags": [
"users"
]
"tags": ["users"]
}

@@ -948,11 +867,7 @@ },

{
"instagram_auth": [
"basic"
]
"instagram_auth": ["basic"]
}
],
"summary": "See the authenticated user's feed.",
"tags": [
"users"
]
"tags": ["users"]
}

@@ -992,11 +907,7 @@ },

{
"instagram_auth": [
"basic"
]
"instagram_auth": ["basic"]
}
],
"summary": "See the list of media liked by the authenticated user.",
"tags": [
"users"
]
"tags": ["users"]
}

@@ -1020,11 +931,7 @@ },

{
"instagram_auth": [
"follower_list"
]
"instagram_auth": ["follower_list"]
}
],
"summary": "List the users who have requested this user's permission to follow.",
"tags": [
"relationships"
]
"tags": ["relationships"]
}

@@ -1060,12 +967,7 @@ },

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get basic information about a user.",
"tags": [
"users"
]
"tags": ["users"]
}

@@ -1098,11 +1000,7 @@ },

{
"instagram_auth": [
"follower_list"
]
"instagram_auth": ["follower_list"]
}
],
"summary": "Get the list of users this user is followed by.",
"tags": [
"relationships"
]
"tags": ["relationships"]
}

@@ -1135,11 +1033,7 @@ },

{
"instagram_auth": [
"follower_list"
]
"instagram_auth": ["follower_list"]
}
],
"summary": "Get the list of users this user follows.",
"tags": [
"relationships"
]
"tags": ["relationships"]
}

@@ -1209,12 +1103,7 @@ },

{
"instagram_auth": [
"basic",
"public_content"
]
"instagram_auth": ["basic", "public_content"]
}
],
"summary": "Get the most recent media published by a user.",
"tags": [
"users"
]
"tags": ["users"]
}

@@ -1247,11 +1136,7 @@ },

{
"instagram_auth": [
"follower_list"
]
"instagram_auth": ["follower_list"]
}
],
"summary": "Get information about a relationship to another user.",
"tags": [
"relationships"
]
"tags": ["relationships"]
},

@@ -1297,11 +1182,7 @@ "post": {

{
"instagram_auth": [
"relationships"
]
"instagram_auth": ["relationships"]
}
],
"summary": "Modify the relationship between the current user and the target user.",
"tags": [
"relationships"
]
"tags": ["relationships"]
}

@@ -1564,6 +1445,3 @@ }

"description": "Type of this media entry",
"enum": [
"image",
"video"
],
"enum": ["image", "video"],
"type": "string"

@@ -1671,7 +1549,3 @@ },

"description": "Status of incoming relationship",
"enum": [
"none",
"followed_by",
"requested_by"
],
"enum": ["none", "followed_by", "requested_by"],
"type": "string"

@@ -1681,7 +1555,3 @@ },

"description": "Status of outgoing relationship",
"enum": [
"none",
"follows",
"requested"
],
"enum": ["none", "follows", "requested"],
"type": "string"

@@ -1726,7 +1596,3 @@ },

"description": "Status of outgoing relationship",
"enum": [
"none",
"follows",
"requested"
],
"enum": ["none", "follows", "requested"],
"type": "string"

@@ -1733,0 +1599,0 @@ }

{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
"url": "http://swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "http://petstore.swagger.io/api"
}
],
"paths": {
"/pets": {
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"parameters": [
{
"in": "query",
"name": "pet",
"description": "Pet to add to the store",
"schema": {
"$ref": "#/components/schemas/NewPet"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"NewPet": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
"url": "http://swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "http://petstore.swagger.io/api"
}
],
"paths": {
"/pets": {
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"parameters": [
{
"in": "query",
"name": "pet",
"description": "Pet to add to the store",
"schema": {
"$ref": "#/components/schemas/NewPet"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"NewPet": {
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}
}
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
"url": "http://swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "http://petstore.swagger.io/api"
}
],
"paths": {
"/pets": {
"get": {
"description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n",
"operationId": "findPets",
"parameters": [
{
"name": "tags",
"in": "query",
"description": "tags to filter by",
"required": false,
"style": "form",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "limit",
"in": "query",
"description": "maximum number of results to return",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"requestBody": {
"description": "Pet to add to the store",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewPet"
}
}
}
},
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/pets/{id}": {
"get": {
"description": "Returns a user based on a single ID, if the user does not have access to the pet",
"operationId": "find pet by id",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to fetch",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "deletes a single pet based on the ID supplied",
"operationId": "deletePet",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to delete",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"204": {
"description": "pet deleted"
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Pet": {
"allOf": [
{
"$ref": "#/components/schemas/NewPet"
},
{
"required": [
"id"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
}
}
]
},
"NewPet": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Error": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team",
"email": "apiteam@swagger.io",
"url": "http://swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"servers": [
{
"url": "http://petstore.swagger.io/api"
}
],
"paths": {
"/pets": {
"servers": [
{
"url": "https://path-override.example.com"
}
],
"get": {
"servers": [
{
"url": "https://method-override.example.com"
}
],
"description": "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n",
"operationId": "findPets",
"parameters": [
{
"name": "tags",
"in": "query",
"description": "tags to filter by",
"required": false,
"style": "form",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "limit",
"in": "query",
"description": "maximum number of results to return",
"required": false,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Pet"
}
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"post": {
"description": "Creates a new pet in the store. Duplicates are allowed",
"operationId": "addPet",
"requestBody": {
"description": "Pet to add to the store",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewPet"
}
}
}
},
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/pets/{id}": {
"get": {
"description": "Returns a user based on a single ID, if the user does not have access to the pet",
"operationId": "find pet by id",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to fetch",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "pet response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pet"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
},
"delete": {
"description": "deletes a single pet based on the ID supplied",
"operationId": "deletePet",
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of pet to delete",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"204": {
"description": "pet deleted"
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Pet": {
"allOf": [
{
"$ref": "#/components/schemas/NewPet"
},
{
"required": ["id"],
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
}
}
]
},
"NewPet": {
"required": ["name"],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Error": {
"required": ["code", "message"],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
}
{
"swagger": "2.0",
"schemes": [
"http",
"https"
],
"host": "petstore.swagger.io",
"basePath": "/v2",
"info": {
"description": "This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n# Authentication\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\n\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n<!-- ReDoc-Inject: <security-definitions> -->\n",
"version": "1.0.0",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io",
"url": "https://github.com/Rebilly/ReDoc"
},
"x-logo": {
"url": "https://rebilly.github.io/ReDoc/petstore-logo.png"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"externalDocs": {
"description": "Find out how to create Github repo for your OpenAPI spec.",
"url": "https://github.com/Rebilly/generator-openapi-repo"
},
"tags": [
{
"name": "pet",
"description": "Everything about your Pets"
},
{
"name": "store",
"description": "Access to Petstore orders"
},
{
"name": "user",
"description": "Operations about user"
}
],
"x-tagGroups": [
{
"name": "General",
"tags": [
"pet",
"store"
]
},
{
"name": "User Management",
"tags": [
"user"
]
}
],
"securityDefinitions": {
"petstore_auth": {
"description": "Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n",
"type": "oauth2",
"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
"flow": "implicit",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
},
"api_key": {
"description": "For this sample, you can use the api key `special-key` to test the authorization filters.\n",
"type": "apiKey",
"name": "api_key",
"in": "header"
}
},
"x-servers": [
{
"url": "//petstore.swagger.io/v2",
"description": "Default server"
},
{
"url": "//petstore.swagger.io/sandbox",
"description": "Sandbox server"
}
],
"paths": {
"/pet": {
"post": {
"tags": [
"pet"
],
"summary": "Add a new pet to the store",
"description": "Add new pet to the store inventory.",
"operationId": "addPet",
"consumes": [
"application/json",
"application/xml"
],
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true,
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"405": {
"description": "Invalid input"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
],
"x-code-samples": [
{
"lang": "C#",
"source": "PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"
},
{
"lang": "PHP",
"source": "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
}
]
},
"put": {
"tags": [
"pet"
],
"summary": "Update an existing pet",
"description": "",
"operationId": "updatePet",
"consumes": [
"application/json",
"application/xml"
],
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true,
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Pet not found"
},
"405": {
"description": "Validation exception"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
],
"x-code-samples": [
{
"lang": "PHP",
"source": "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
}
]
}
},
"/pet/{petId}": {
"get": {
"tags": [
"pet"
],
"summary": "Find pet by ID",
"description": "Returns a single pet",
"operationId": "getPetById",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet to return",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Pet"
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Pet not found"
}
},
"security": [
{
"api_key": []
}
]
},
"post": {
"tags": [
"pet"
],
"summary": "Updates a pet in the store with form data",
"description": "",
"operationId": "updatePetWithForm",
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "name",
"in": "formData",
"description": "Updated name of the pet",
"required": false,
"type": "string"
},
{
"name": "status",
"in": "formData",
"description": "Updated status of the pet",
"required": false,
"type": "string"
}
],
"responses": {
"405": {
"description": "Invalid input"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
},
"delete": {
"tags": [
"pet"
],
"summary": "Deletes a pet",
"description": "",
"operationId": "deletePet",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "api_key",
"in": "header",
"required": false,
"type": "string",
"x-example": "Bearer <TOKEN>"
},
{
"name": "petId",
"in": "path",
"description": "Pet id to delete",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"400": {
"description": "Invalid pet value"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
"/pet/{petId}/uploadImage": {
"post": {
"tags": [
"pet"
],
"summary": "uploads an image",
"description": "",
"operationId": "uploadFile",
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet to update",
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "additionalMetadata",
"in": "formData",
"description": "Additional data to pass to server",
"required": false,
"type": "string"
},
{
"name": "file",
"in": "formData",
"description": "file to upload",
"required": false,
"type": "file"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/ApiResponse"
}
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
"/pet/findByStatus": {
"get": {
"tags": [
"pet"
],
"summary": "Finds Pets by status",
"description": "Multiple status values can be provided with comma separated strings",
"operationId": "findPetsByStatus",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "status",
"in": "query",
"description": "Status values that need to be considered for filter",
"required": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"available",
"pending",
"sold"
],
"default": "available"
},
"collectionFormat": "csv"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"400": {
"description": "Invalid status value"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
"/pet/findByTags": {
"get": {
"tags": [
"pet"
],
"summary": "Finds Pets by tags",
"description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
"operationId": "findPetsByTags",
"deprecated": true,
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "tags",
"in": "query",
"description": "Tags to filter by",
"required": true,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"400": {
"description": "Invalid tag value"
}
},
"security": [
{
"petstore_auth": [
"write:pets",
"read:pets"
]
}
]
}
},
"/store/inventory": {
"get": {
"tags": [
"store"
],
"summary": "Returns pet inventories by status",
"description": "Returns a map of status codes to quantities",
"operationId": "getInventory",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int32"
}
}
}
},
"security": [
{
"api_key": []
}
]
}
},
"/store/order": {
"post": {
"tags": [
"store"
],
"summary": "Place an order for a pet",
"description": "",
"operationId": "placeOrder",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "order placed for purchasing the pet",
"required": true,
"schema": {
"$ref": "#/definitions/Order"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Invalid Order"
}
}
}
},
"/store/order/{orderId}": {
"get": {
"tags": [
"store"
],
"summary": "Find purchase order by ID",
"description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
"operationId": "getOrderById",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "ID of pet that needs to be fetched",
"required": true,
"type": "integer",
"maximum": 5,
"minimum": 1,
"format": "int64"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Order not found"
}
}
},
"delete": {
"tags": [
"store"
],
"summary": "Delete purchase order by ID",
"description": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"operationId": "deleteOrder",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "ID of the order that needs to be deleted",
"required": true,
"type": "string",
"minimum": 1
}
],
"responses": {
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Order not found"
}
}
}
},
"/user": {
"post": {
"tags": [
"user"
],
"summary": "Create user",
"description": "This can only be done by the logged in user.",
"operationId": "createUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Created user object",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/{username}": {
"get": {
"tags": [
"user"
],
"summary": "Get user by user name",
"description": "",
"operationId": "getUserByName",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "path",
"description": "The name that needs to be fetched. Use user1 for testing. ",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/User"
}
},
"400": {
"description": "Invalid username supplied"
},
"404": {
"description": "User not found"
}
}
},
"put": {
"tags": [
"user"
],
"summary": "Updated user",
"description": "This can only be done by the logged in user.",
"operationId": "updateUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "path",
"description": "name that need to be deleted",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Updated user object",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"400": {
"description": "Invalid user supplied"
},
"404": {
"description": "User not found"
}
}
},
"delete": {
"tags": [
"user"
],
"summary": "Delete user",
"description": "This can only be done by the logged in user.",
"operationId": "deleteUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "path",
"description": "The name that needs to be deleted",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "Invalid username supplied"
},
"404": {
"description": "User not found"
}
}
}
},
"/user/createWithArray": {
"post": {
"tags": [
"user"
],
"summary": "Creates list of users with given input array",
"description": "",
"operationId": "createUsersWithArrayInput",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "List of user object",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/createWithList": {
"post": {
"tags": [
"user"
],
"summary": "Creates list of users with given input array",
"description": "",
"operationId": "createUsersWithListInput",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"in": "body",
"name": "body",
"description": "List of user object",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/login": {
"get": {
"tags": [
"user"
],
"summary": "Logs user into the system",
"description": "",
"operationId": "loginUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [
{
"name": "username",
"in": "query",
"description": "The user name for login",
"required": true,
"type": "string"
},
{
"name": "password",
"in": "query",
"description": "The password for login in clear text",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string"
},
"examples": {
"application/json": "OK",
"application/xml": "<message> OK </message>",
"text/plain": "OK"
},
"headers": {
"X-Rate-Limit": {
"type": "integer",
"format": "int32",
"description": "calls per hour allowed by the user"
},
"X-Expires-After": {
"type": "string",
"format": "date-time",
"description": "date in UTC when toekn expires"
}
}
},
"400": {
"description": "Invalid username/password supplied"
}
}
}
},
"/user/logout": {
"get": {
"tags": [
"user"
],
"summary": "Logs out current logged in user session",
"description": "",
"operationId": "logoutUser",
"produces": [
"application/xml",
"application/json"
],
"parameters": [],
"responses": {
"default": {
"description": "successful operation"
}
}
}
}
},
"definitions": {
"ApiResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"Cat": {
"description": "A representation of a cat",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"huntingSkill": {
"type": "string",
"description": "The measured skill for hunting",
"default": "lazy",
"enum": [
"clueless",
"lazy",
"adventurous",
"aggressive"
]
}
},
"required": [
"huntingSkill"
]
}
]
},
"Category": {
"type": "object",
"properties": {
"id": {
"description": "Category ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"name": {
"description": "Category name",
"type": "string",
"minLength": 1
},
"sub": {
"description": "Test Sub Category",
"type": "object",
"properties": {
"prop1": {
"type": "string",
"description": "Dumb Property"
}
}
}
},
"xml": {
"name": "Category"
}
},
"Dog": {
"description": "A representation of a dog",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"packSize": {
"type": "integer",
"format": "int32",
"description": "The size of the pack the dog is from",
"default": 1,
"minimum": 1
}
},
"required": [
"packSize"
]
}
]
},
"HoneyBee": {
"description": "A representation of a honey bee",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"honeyPerDay": {
"type": "number",
"description": "Average amount of honey produced per day in ounces",
"example": 3.14
}
},
"required": [
"honeyPerDay"
]
}
]
},
"Id": {
"type": "integer",
"format": "int64"
},
"Order": {
"type": "object",
"properties": {
"id": {
"description": "Order ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"petId": {
"description": "Pet ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"quantity": {
"type": "integer",
"format": "int32",
"minimum": 1,
"default": 1
},
"shipDate": {
"description": "Estimated ship date",
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Order Status",
"enum": [
"placed",
"approved",
"delivered"
]
},
"complete": {
"description": "Indicates whenever order was completed or not",
"type": "boolean",
"default": false
}
},
"xml": {
"name": "Order"
}
},
"Pet": {
"type": "object",
"required": [
"name",
"photoUrls"
],
"discriminator": "petType",
"properties": {
"id": {
"description": "Pet ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"category": {
"description": "Categories this pet belongs to",
"allOf": [
{
"$ref": "#/definitions/Category"
}
]
},
"name": {
"description": "The name given to a pet",
"type": "string",
"example": "Guru"
},
"photoUrls": {
"description": "The list of URL to a cute photos featuring pet",
"type": "array",
"xml": {
"name": "photoUrl",
"wrapped": true
},
"items": {
"type": "string",
"format": "url"
}
},
"tags": {
"description": "Tags attached to the pet",
"type": "array",
"xml": {
"name": "tag",
"wrapped": true
},
"items": {
"$ref": "#/definitions/Tag"
}
},
"status": {
"type": "string",
"description": "Pet status in the store",
"enum": [
"available",
"pending",
"sold"
]
},
"petType": {
"description": "Type of a pet",
"type": "string"
}
},
"xml": {
"name": "Pet"
}
},
"Tag": {
"type": "object",
"properties": {
"id": {
"description": "Tag ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"name": {
"description": "Tag name",
"type": "string",
"minLength": 1
}
},
"xml": {
"name": "Tag"
}
},
"User": {
"type": "object",
"properties": {
"id": {
"description": "User ID",
"$ref": "#/definitions/Id"
},
"username": {
"description": "User supplied username",
"type": "string",
"minLength": 4,
"example": "John78"
},
"firstName": {
"description": "User first name",
"type": "string",
"minLength": 1,
"example": "John"
},
"lastName": {
"description": "User last name",
"type": "string",
"minLength": 1,
"example": "Smith"
},
"email": {
"description": "User email address",
"type": "string",
"format": "email",
"example": "john.smith@example.com"
},
"password": {
"type": "string",
"description": "User password, MUST contain a mix of upper and lower case letters, as well as digits",
"format": "password",
"minLength": 8,
"pattern": "(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])",
"example": "drowssaP123"
},
"phone": {
"description": "User phone number in international format",
"type": "string",
"pattern": "^\\+(?:[0-9]-?){6,14}[0-9]$",
"example": "+1-202-555-0192",
"x-nullable": true
},
"userStatus": {
"description": "User status",
"type": "integer",
"format": "int32"
}
},
"xml": {
"name": "User"
}
}
}
}
"swagger": "2.0",
"schemes": ["http", "https"],
"host": "petstore.swagger.io",
"basePath": "/v2",
"info": {
"description": "This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n# Authentication\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\n\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n<!-- ReDoc-Inject: <security-definitions> -->\n",
"version": "1.0.0",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io",
"url": "https://github.com/Rebilly/ReDoc"
},
"x-logo": {
"url": "https://rebilly.github.io/ReDoc/petstore-logo.png"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"externalDocs": {
"description": "Find out how to create Github repo for your OpenAPI spec.",
"url": "https://github.com/Rebilly/generator-openapi-repo"
},
"tags": [
{
"name": "pet",
"description": "Everything about your Pets"
},
{
"name": "store",
"description": "Access to Petstore orders"
},
{
"name": "user",
"description": "Operations about user"
}
],
"x-tagGroups": [
{
"name": "General",
"tags": ["pet", "store"]
},
{
"name": "User Management",
"tags": ["user"]
}
],
"securityDefinitions": {
"petstore_auth": {
"description": "Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n",
"type": "oauth2",
"authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
"flow": "implicit",
"scopes": {
"write:pets": "modify pets in your account",
"read:pets": "read your pets"
}
},
"api_key": {
"description": "For this sample, you can use the api key `special-key` to test the authorization filters.\n",
"type": "apiKey",
"name": "api_key",
"in": "header"
}
},
"x-servers": [
{
"url": "//petstore.swagger.io/v2",
"description": "Default server"
},
{
"url": "//petstore.swagger.io/sandbox",
"description": "Sandbox server"
}
],
"paths": {
"/pet": {
"post": {
"tags": ["pet"],
"summary": "Add a new pet to the store",
"description": "Add new pet to the store inventory.",
"operationId": "addPet",
"consumes": ["application/json", "application/xml"],
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true,
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"405": {
"description": "Invalid input"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
],
"x-code-samples": [
{
"lang": "C#",
"source": "PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"
},
{
"lang": "PHP",
"source": "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
}
]
},
"put": {
"tags": ["pet"],
"summary": "Update an existing pet",
"description": "",
"operationId": "updatePet",
"consumes": ["application/json", "application/xml"],
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Pet object that needs to be added to the store",
"required": true,
"schema": {
"$ref": "#/definitions/Pet"
}
}
],
"responses": {
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Pet not found"
},
"405": {
"description": "Validation exception"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
],
"x-code-samples": [
{
"lang": "PHP",
"source": "$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"
}
]
}
},
"/pet/{petId}": {
"get": {
"tags": ["pet"],
"summary": "Find pet by ID",
"description": "Returns a single pet",
"operationId": "getPetById",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet to return",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Pet"
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Pet not found"
}
},
"security": [
{
"api_key": []
}
]
},
"post": {
"tags": ["pet"],
"summary": "Updates a pet in the store with form data",
"description": "",
"operationId": "updatePetWithForm",
"consumes": ["application/x-www-form-urlencoded"],
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "name",
"in": "formData",
"description": "Updated name of the pet",
"required": false,
"type": "string"
},
{
"name": "status",
"in": "formData",
"description": "Updated status of the pet",
"required": false,
"type": "string"
}
],
"responses": {
"405": {
"description": "Invalid input"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
]
},
"delete": {
"tags": ["pet"],
"summary": "Deletes a pet",
"description": "",
"operationId": "deletePet",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "api_key",
"in": "header",
"required": false,
"type": "string",
"x-example": "Bearer <TOKEN>"
},
{
"name": "petId",
"in": "path",
"description": "Pet id to delete",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"400": {
"description": "Invalid pet value"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
]
}
},
"/pet/{petId}/uploadImage": {
"post": {
"tags": ["pet"],
"summary": "uploads an image",
"description": "",
"operationId": "uploadFile",
"consumes": ["multipart/form-data"],
"produces": ["application/json"],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet to update",
"required": true,
"type": "integer",
"format": "int64"
},
{
"name": "additionalMetadata",
"in": "formData",
"description": "Additional data to pass to server",
"required": false,
"type": "string"
},
{
"name": "file",
"in": "formData",
"description": "file to upload",
"required": false,
"type": "file"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/ApiResponse"
}
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
]
}
},
"/pet/findByStatus": {
"get": {
"tags": ["pet"],
"summary": "Finds Pets by status",
"description": "Multiple status values can be provided with comma separated strings",
"operationId": "findPetsByStatus",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "status",
"in": "query",
"description": "Status values that need to be considered for filter",
"required": true,
"type": "array",
"items": {
"type": "string",
"enum": ["available", "pending", "sold"],
"default": "available"
},
"collectionFormat": "csv"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"400": {
"description": "Invalid status value"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
]
}
},
"/pet/findByTags": {
"get": {
"tags": ["pet"],
"summary": "Finds Pets by tags",
"description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
"operationId": "findPetsByTags",
"deprecated": true,
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "tags",
"in": "query",
"description": "Tags to filter by",
"required": true,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "csv"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
},
"400": {
"description": "Invalid tag value"
}
},
"security": [
{
"petstore_auth": ["write:pets", "read:pets"]
}
]
}
},
"/store/inventory": {
"get": {
"tags": ["store"],
"summary": "Returns pet inventories by status",
"description": "Returns a map of status codes to quantities",
"operationId": "getInventory",
"produces": ["application/json"],
"parameters": [],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "int32"
}
}
}
},
"security": [
{
"api_key": []
}
]
}
},
"/store/order": {
"post": {
"tags": ["store"],
"summary": "Place an order for a pet",
"description": "",
"operationId": "placeOrder",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "order placed for purchasing the pet",
"required": true,
"schema": {
"$ref": "#/definitions/Order"
}
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Invalid Order"
}
}
}
},
"/store/order/{orderId}": {
"get": {
"tags": ["store"],
"summary": "Find purchase order by ID",
"description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
"operationId": "getOrderById",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "ID of pet that needs to be fetched",
"required": true,
"type": "integer",
"maximum": 5,
"minimum": 1,
"format": "int64"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/Order"
}
},
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Order not found"
}
}
},
"delete": {
"tags": ["store"],
"summary": "Delete purchase order by ID",
"description": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
"operationId": "deleteOrder",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "ID of the order that needs to be deleted",
"required": true,
"type": "string",
"minimum": 1
}
],
"responses": {
"400": {
"description": "Invalid ID supplied"
},
"404": {
"description": "Order not found"
}
}
}
},
"/user": {
"post": {
"tags": ["user"],
"summary": "Create user",
"description": "This can only be done by the logged in user.",
"operationId": "createUser",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "Created user object",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/{username}": {
"get": {
"tags": ["user"],
"summary": "Get user by user name",
"description": "",
"operationId": "getUserByName",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "username",
"in": "path",
"description": "The name that needs to be fetched. Use user1 for testing. ",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/User"
}
},
"400": {
"description": "Invalid username supplied"
},
"404": {
"description": "User not found"
}
}
},
"put": {
"tags": ["user"],
"summary": "Updated user",
"description": "This can only be done by the logged in user.",
"operationId": "updateUser",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "username",
"in": "path",
"description": "name that need to be deleted",
"required": true,
"type": "string"
},
{
"in": "body",
"name": "body",
"description": "Updated user object",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"400": {
"description": "Invalid user supplied"
},
"404": {
"description": "User not found"
}
}
},
"delete": {
"tags": ["user"],
"summary": "Delete user",
"description": "This can only be done by the logged in user.",
"operationId": "deleteUser",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "username",
"in": "path",
"description": "The name that needs to be deleted",
"required": true,
"type": "string"
}
],
"responses": {
"400": {
"description": "Invalid username supplied"
},
"404": {
"description": "User not found"
}
}
}
},
"/user/createWithArray": {
"post": {
"tags": ["user"],
"summary": "Creates list of users with given input array",
"description": "",
"operationId": "createUsersWithArrayInput",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "List of user object",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/createWithList": {
"post": {
"tags": ["user"],
"summary": "Creates list of users with given input array",
"description": "",
"operationId": "createUsersWithListInput",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"in": "body",
"name": "body",
"description": "List of user object",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
],
"responses": {
"default": {
"description": "successful operation"
}
}
}
},
"/user/login": {
"get": {
"tags": ["user"],
"summary": "Logs user into the system",
"description": "",
"operationId": "loginUser",
"produces": ["application/xml", "application/json"],
"parameters": [
{
"name": "username",
"in": "query",
"description": "The user name for login",
"required": true,
"type": "string"
},
{
"name": "password",
"in": "query",
"description": "The password for login in clear text",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "string"
},
"examples": {
"application/json": "OK",
"application/xml": "<message> OK </message>",
"text/plain": "OK"
},
"headers": {
"X-Rate-Limit": {
"type": "integer",
"format": "int32",
"description": "calls per hour allowed by the user"
},
"X-Expires-After": {
"type": "string",
"format": "date-time",
"description": "date in UTC when toekn expires"
}
}
},
"400": {
"description": "Invalid username/password supplied"
}
}
}
},
"/user/logout": {
"get": {
"tags": ["user"],
"summary": "Logs out current logged in user session",
"description": "",
"operationId": "logoutUser",
"produces": ["application/xml", "application/json"],
"parameters": [],
"responses": {
"default": {
"description": "successful operation"
}
}
}
}
},
"definitions": {
"ApiResponse": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"Cat": {
"description": "A representation of a cat",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"huntingSkill": {
"type": "string",
"description": "The measured skill for hunting",
"default": "lazy",
"enum": ["clueless", "lazy", "adventurous", "aggressive"]
}
},
"required": ["huntingSkill"]
}
]
},
"Category": {
"type": "object",
"properties": {
"id": {
"description": "Category ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"name": {
"description": "Category name",
"type": "string",
"minLength": 1
},
"sub": {
"description": "Test Sub Category",
"type": "object",
"properties": {
"prop1": {
"type": "string",
"description": "Dumb Property"
}
}
}
},
"xml": {
"name": "Category"
}
},
"Dog": {
"description": "A representation of a dog",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"packSize": {
"type": "integer",
"format": "int32",
"description": "The size of the pack the dog is from",
"default": 1,
"minimum": 1
}
},
"required": ["packSize"]
}
]
},
"HoneyBee": {
"description": "A representation of a honey bee",
"allOf": [
{
"$ref": "#/definitions/Pet"
},
{
"type": "object",
"properties": {
"honeyPerDay": {
"type": "number",
"description": "Average amount of honey produced per day in ounces",
"example": 3.14
}
},
"required": ["honeyPerDay"]
}
]
},
"Id": {
"type": "integer",
"format": "int64"
},
"Order": {
"type": "object",
"properties": {
"id": {
"description": "Order ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"petId": {
"description": "Pet ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"quantity": {
"type": "integer",
"format": "int32",
"minimum": 1,
"default": 1
},
"shipDate": {
"description": "Estimated ship date",
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"description": "Order Status",
"enum": ["placed", "approved", "delivered"]
},
"complete": {
"description": "Indicates whenever order was completed or not",
"type": "boolean",
"default": false
}
},
"xml": {
"name": "Order"
}
},
"Pet": {
"type": "object",
"required": ["name", "photoUrls"],
"discriminator": "petType",
"properties": {
"id": {
"description": "Pet ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"category": {
"description": "Categories this pet belongs to",
"allOf": [
{
"$ref": "#/definitions/Category"
}
]
},
"name": {
"description": "The name given to a pet",
"type": "string",
"example": "Guru"
},
"photoUrls": {
"description": "The list of URL to a cute photos featuring pet",
"type": "array",
"xml": {
"name": "photoUrl",
"wrapped": true
},
"items": {
"type": "string",
"format": "url"
}
},
"tags": {
"description": "Tags attached to the pet",
"type": "array",
"xml": {
"name": "tag",
"wrapped": true
},
"items": {
"$ref": "#/definitions/Tag"
}
},
"status": {
"type": "string",
"description": "Pet status in the store",
"enum": ["available", "pending", "sold"]
},
"petType": {
"description": "Type of a pet",
"type": "string"
}
},
"xml": {
"name": "Pet"
}
},
"Tag": {
"type": "object",
"properties": {
"id": {
"description": "Tag ID",
"allOf": [
{
"$ref": "#/definitions/Id"
}
]
},
"name": {
"description": "Tag name",
"type": "string",
"minLength": 1
}
},
"xml": {
"name": "Tag"
}
},
"User": {
"type": "object",
"properties": {
"id": {
"description": "User ID",
"$ref": "#/definitions/Id"
},
"username": {
"description": "User supplied username",
"type": "string",
"minLength": 4,
"example": "John78"
},
"firstName": {
"description": "User first name",
"type": "string",
"minLength": 1,
"example": "John"
},
"lastName": {
"description": "User last name",
"type": "string",
"minLength": 1,
"example": "Smith"
},
"email": {
"description": "User email address",
"type": "string",
"format": "email",
"example": "john.smith@example.com"
},
"password": {
"type": "string",
"description": "User password, MUST contain a mix of upper and lower case letters, as well as digits",
"format": "password",
"minLength": 8,
"pattern": "(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])",
"example": "drowssaP123"
},
"phone": {
"description": "User phone number in international format",
"type": "string",
"pattern": "^\\+(?:[0-9]-?){6,14}[0-9]$",
"example": "+1-202-555-0192",
"x-nullable": true
},
"userStatus": {
"description": "User status",
"type": "integer",
"format": "int32"
}
},
"xml": {
"name": "User"
}
}
}
}

@@ -1,116 +0,183 @@

'use strict'
'use strict';
const test = require('tape')
const OpenAPISnippets = require('../index')
const test = require('tape');
const OpenAPISnippets = require('../index');
const InstagramOpenAPI = require('./instagram_swagger.json')
const BloggerOpenAPI = require('./blogger_swagger.json')
const GitHubOpenAPI = require('./github_swagger.json')
const WatsonOpenAPI = require('./watson_alchemy_language_swagger.json')
const IBMOpenAPI = require('./ibm_watson_alchemy_data_news_api.json')
const PetStoreOpenAPI = require('./petstore_swagger.json')
const PetStoreOpenAPI3 = require('./petstore_oas.json')
const ParameterSchemaReferenceAPI = require('./parameter_schema_reference')
const InstagramOpenAPI = require('./instagram_swagger.json');
const BloggerOpenAPI = require('./blogger_swagger.json');
const GitHubOpenAPI = require('./github_swagger.json');
const WatsonOpenAPI = require('./watson_alchemy_language_swagger.json');
const IBMOpenAPI = require('./ibm_watson_alchemy_data_news_api.json');
const PetStoreOpenAPI = require('./petstore_swagger.json');
const PetStoreOpenAPI3 = require('./petstore_oas.json');
const ParameterSchemaReferenceAPI = require('./parameter_schema_reference');
test('Getting snippets should not result in error or undefined', function (t) {
t.plan(1)
t.plan(1);
const result = OpenAPISnippets.getSnippets(InstagramOpenAPI, ['c_libcurl'])
t.notEqual(result, undefined)
})
const result = OpenAPISnippets.getSnippets(InstagramOpenAPI, ['c_libcurl']);
t.notEqual(result, undefined);
});
test('An invalid target should result in error', function (t) {
t.plan(1)
t.plan(1);
try {
const result = OpenAPISnippets.getSnippets(BloggerOpenAPI, ['node_asfd'])
console.log(result)
const result = OpenAPISnippets.getSnippets(BloggerOpenAPI, ['node_asfd']);
console.log(result);
} catch (err) {
t.equal(err.toString(), 'Error: Invalid target: node_asfd')
t.equal(err.toString(), 'Error: Invalid target: node_asfd');
}
})
});
test('Getting snippets for endpoint should not result in error or undefined', function (t) {
t.plan(1)
t.plan(1);
const result = OpenAPISnippets.getEndpointSnippets(InstagramOpenAPI, '/geographies/{geo-id}/media/recent', 'get', ['c_libcurl'])
t.notEqual(result, undefined)
})
const result = OpenAPISnippets.getEndpointSnippets(
InstagramOpenAPI,
'/geographies/{geo-id}/media/recent',
'get',
['c_libcurl']
);
t.notEqual(result, undefined);
});
test('Getting snippets for IBM Watson Alchemy Language should work', function (t) {
t.plan(1)
t.plan(1);
const result = OpenAPISnippets.getEndpointSnippets(IBMOpenAPI, '/data/GetNews', 'get', ['node_request'])
t.notEqual(result, undefined)
})
const result = OpenAPISnippets.getEndpointSnippets(
IBMOpenAPI,
'/data/GetNews',
'get',
['node_request']
);
t.notEqual(result, undefined);
});
test('Getting snippets for endpoint should contain body', function (t) {
t.plan(2)
t.plan(2);
// checks the 'Pages' schema...
const result = OpenAPISnippets.getEndpointSnippets(BloggerOpenAPI, '/blogs/{blogId}/pages', 'post', ['node_request'])
t.true(/body/.test(result.snippets[0].content))
t.true(/subPage/.test(result.snippets[0].content))
})
const result = OpenAPISnippets.getEndpointSnippets(
BloggerOpenAPI,
'/blogs/{blogId}/pages',
'post',
['node_request']
);
t.true(/body/.test(result.snippets[0].content));
t.true(/subPage/.test(result.snippets[0].content));
});
test('Getting snippets from OpenAPI 3.0.x should work', function (t) {
t.plan(1)
t.plan(1);
// checks the 'Pages' schema...
const result = OpenAPISnippets.getEndpointSnippets(PetStoreOpenAPI3, '/pets/{id}', 'get', ['node_request'])
t.notEqual(result, undefined)
})
const result = OpenAPISnippets.getEndpointSnippets(
PetStoreOpenAPI3,
'/pets/{id}',
'get',
['node_request']
);
t.notEqual(result, undefined);
});
test('Testing server overrides', function (t) {
t.plan(12);
const result = OpenAPISnippets.getSnippets(PetStoreOpenAPI3, ['c_libcurl']);
t.equal(result[0].url, 'https://method-override.example.com/pets');
t.match(result[0].snippets[0].content, /.*method-override.example.com.*/);
t.doesNotMatch(result[0].snippets[0].content, /.*petstore.swagger.io.*/);
t.equal(result[1].url, 'http://petstore.swagger.io/api/pets/{id}');
t.match(result[1].snippets[0].content, /.*petstore.swagger.io.*/);
t.doesNotMatch(result[1].snippets[0].content, /.*example.com.*/);
t.equal(result[2].url, 'https://path-override.example.com/pets');
t.match(result[2].snippets[0].content, /.*path-override.example.com.*/);
t.doesNotMatch(result[2].snippets[0].content, /.*petstore.swagger.io.*/);
t.equal(result[3].url, 'http://petstore.swagger.io/api/pets/{id}');
t.match(result[3].snippets[0].content, /.*petstore.swagger.io.*/);
t.doesNotMatch(result[3].snippets[0].content, /.*example.com.*/);
});
test('Testing optionally provided parameter values', function (t) {
t.plan(2)
t.plan(2);
// checks the 'Pages' schema...
const result = OpenAPISnippets.getEndpointSnippets(InstagramOpenAPI, '/locations/search', 'get', ['node_request'],
const result = OpenAPISnippets.getEndpointSnippets(
InstagramOpenAPI,
'/locations/search',
'get',
['node_request'],
{
'distance': 5000,
'not-a-query-param': 'foo'
})
t.true(/5000/.test(result.snippets[0].content))
t.false(/not-a-query-param/.test(result.snippets[0].content))
})
distance: 5000,
'not-a-query-param': 'foo',
}
);
t.true(/5000/.test(result.snippets[0].content));
t.false(/not-a-query-param/.test(result.snippets[0].content));
});
test('Testing the case when default is present but a value is provided, use the provided value', function (t) {
t.plan(2)
t.plan(2);
// checks the 'Pages' schema...
const result = OpenAPISnippets.getEndpointSnippets(GitHubOpenAPI, '/issues', 'get', ['node_request'],
const result = OpenAPISnippets.getEndpointSnippets(
GitHubOpenAPI,
'/issues',
'get',
['node_request'],
{
'filter': 'assigned'
})
t.true(/assigned/.test(result.snippets[0].content))
t.false(/all/.test(result.snippets[0].content)) // The default value of `filter` is `all`
})
filter: 'assigned',
}
);
t.true(/assigned/.test(result.snippets[0].content));
t.false(/all/.test(result.snippets[0].content)); // The default value of `filter` is `all`
});
test('Testing the case when default is present but no value is provided, use the default', function (t) {
t.plan(2)
t.plan(2);
// checks the 'Pages' schema...
const result = OpenAPISnippets.getEndpointSnippets(GitHubOpenAPI, '/issues', 'get', ['node_request'])
t.false(/assigned/.test(result.snippets[0].content))
t.true(/all/.test(result.snippets[0].content)) // The default value of `filter` is `all`
})
const result = OpenAPISnippets.getEndpointSnippets(
GitHubOpenAPI,
'/issues',
'get',
['node_request']
);
t.false(/assigned/.test(result.snippets[0].content));
t.true(/all/.test(result.snippets[0].content)); // The default value of `filter` is `all`
});
test('Referenced query parameters should be resolved', function (t) {
const result = OpenAPISnippets.getEndpointSnippets(WatsonOpenAPI, '/html/HTMLExtractDates', 'get', ['node_request'])
const snippet = result.snippets[0].content
t.true(/apikey/.test(snippet))
t.true(/showSourceText/.test(snippet))
t.end()
})
const result = OpenAPISnippets.getEndpointSnippets(
WatsonOpenAPI,
'/html/HTMLExtractDates',
'get',
['node_request']
);
const snippet = result.snippets[0].content;
t.true(/apikey/.test(snippet));
t.true(/showSourceText/.test(snippet));
t.end();
});
test('Resolve samples from nested examples', function (t) {
const result = OpenAPISnippets.getEndpointSnippets(PetStoreOpenAPI, '/user', 'post', ['node_request'])
const snippet = result.snippets[0].content
t.true(/username.*John78\'/.test(snippet))
t.true(/email.*john.smith@example.com\'/.test(snippet))
t.true(/phone.*\+1\-202\-555\-0192/.test(snippet))
t.true(/password.*drowssaP123/.test(snippet))
t.end()
})
const result = OpenAPISnippets.getEndpointSnippets(
PetStoreOpenAPI,
'/user',
'post',
['node_request']
);
const snippet = result.snippets[0].content;
t.true(/username.*John78\'/.test(snippet));
t.true(/email.*john.smith@example.com\'/.test(snippet));
t.true(/phone.*\+1\-202\-555\-0192/.test(snippet));
t.true(/password.*drowssaP123/.test(snippet));
t.end();
});
test('Parameters that are Schema References Are Dereferenced', function (t) {
const result = OpenAPISnippets.getEndpointSnippets(ParameterSchemaReferenceAPI, '/pets', 'post', ['node_request']);
const result = OpenAPISnippets.getEndpointSnippets(
ParameterSchemaReferenceAPI,
'/pets',
'post',
['node_request']
);
const snippet = result.snippets[0].content;
t.true(/pet: 'SOME_OBJECT_VALUE'/.test(snippet))
t.true(/pet: 'SOME_OBJECT_VALUE'/.test(snippet));
t.end();
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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