You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think it's an issue with our swagger file since this lib works fine with typescript but when I try getNodeCode I end up with a file that's not usable.
api.js
/*jshint -W069 *//** * API for Ladjs project * @class * @param {(string|object)} [domainOrOptions] - The project domain or options object. If object, see the object's optional properties. * @param {string} [domainOrOptions.domain] - The project domain * @param {object} [domainOrOptions.token] - auth token - object with value property and optional headerOrQueryName and isQuery properties */var=(function(){'use strict';varrequest=require('request');varQ=require('q');function(options){vardomain=(typeofoptions==='object') ? options.domain : options;this.domain=domain ? domain : 'http://localhost:6000';if(this.domain.length===0){thrownewError('Domain parameter must be specified as a string.');}}functionmergeQueryParams(parameters,queryParameters){if(parameters.$queryParameters){Object.keys(parameters.$queryParameters).forEach(function(parameterName){varparameter=parameters.$queryParameters[parameterName];queryParameters[parameterName]=parameter;});}returnqueryParameters;}/** * HTTP Request * @method * @name #request * @param {string} method - http method * @param {string} url - url to do request * @param {object} parameters * @param {object} body - body parameters / object * @param {object} headers - header parameters * @param {object} queryParameters - querystring parameters * @param {object} form - form data object * @param {object} deferred - promise object */.prototype.request=function(method,url,parameters,body,headers,queryParameters,form,deferred){varreq={method: method,uri: url,qs: queryParameters,headers: headers,body: body};if(Object.keys(form).length>0){req.form=form;}if(typeof(body)==='object'&&!(bodyinstanceofBuffer)){req.json=true;}request(req,function(error,response,body){if(error){deferred.reject(error);}else{if(/^application\/(.*\\+)?json/.test(response.headers['content-type'])){try{body=JSON.parse(body);}catch(e){}}if(response.statusCode===204){deferred.resolve({response: response});}elseif(response.statusCode>=200&&response.statusCode<=299){deferred.resolve({response: response,body: body});}else{deferred.reject({response: response,body: body});}}});};/** * Returns account details for current user * @method * @name #getV1Account * @param {object} parameters - method options and parameters */.prototype.getV1Account=function(parameters){if(parameters===undefined){parameters={};}vardeferred=Q.defer();vardomain=this.domain,path='/v1/account';varbody={},queryParameters={},headers={},form={};queryParameters=mergeQueryParams(parameters,queryParameters);this.request('GET',domain+path,parameters,body,headers,queryParameters,form,deferred);returndeferred.promise;};/** * Replaces account details for current user * @method * @name #putV1Account * @param {object} parameters - method options and parameters */.prototype.putV1Account=function(parameters){if(parameters===undefined){parameters={};}vardeferred=Q.defer();vardomain=this.domain,path='/v1/account';varbody={},queryParameters={},headers={},form={};queryParameters=mergeQueryParams(parameters,queryParameters);this.request('PUT',domain+path,parameters,body,headers,queryParameters,form,deferred);returndeferred.promise;};return;})();exports.=;
swagger: '2.0'host: 'localhost:6000'basePath: /schemes:
- httpinfo:
version: 1.0.0title: Ladjsdescription: API for Ladjs projectpaths:
/v1/account:
get:
description: Returns account details for current userresponses:
'200':
description: A user object.schema:
type: Stringput:
description: Replaces account details for current userresponses:
'200':
description: A user object.schema:
type: String
The text was updated successfully, but these errors were encountered:
I don't think it's an issue with our swagger file since this lib works fine with typescript but when I try
getNodeCode
I end up with a file that's not usable.api.js
api.ts
The text was updated successfully, but these errors were encountered: