Auto-update by eslint --fix
This commit is contained in:
parent
144fc8000d
commit
2987655479
|
@ -6,7 +6,7 @@ var port = 3000;
|
|||
var Product = loopback.PersistedModel.extend('product', {
|
||||
foo: { type: 'string', required: true },
|
||||
bar: 'string',
|
||||
aNum: {type: 'number', min: 1, max: 10, required: true, default: 5}
|
||||
aNum: { type: 'number', min: 1, max: 10, required: true, default: 5 },
|
||||
});
|
||||
Product.attachTo(loopback.memory());
|
||||
app.model(Product);
|
||||
|
|
4
index.js
4
index.js
|
@ -39,7 +39,7 @@ function routes(loopbackApplication, options) {
|
|||
options = _defaults({}, options, {
|
||||
resourcePath: 'swagger.json',
|
||||
apiInfo: loopbackApplication.get('apiInfo') || {},
|
||||
swaggerUI: true
|
||||
swaggerUI: true,
|
||||
});
|
||||
|
||||
var router = new loopback.Router();
|
||||
|
@ -57,7 +57,7 @@ function routes(loopbackApplication, options) {
|
|||
source = req.originalUrl.replace(/\/config.json(\?.*)?$/, '');
|
||||
}
|
||||
res.send({
|
||||
url: urlJoin(source, '/' + options.resourcePath)
|
||||
url: urlJoin(source, '/' + options.resourcePath),
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ $(function() {
|
|||
return pathCompare !== 0 ?
|
||||
pathCompare :
|
||||
methodOrder.indexOf(a.method) - methodOrder.indexOf(b.method);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$('#explore').click(setAccessToken);
|
||||
|
|
|
@ -117,7 +117,7 @@ describe('explorer', function() {
|
|||
beforeEach(function setupExplorerWithUiDirs() {
|
||||
app = loopback();
|
||||
explorer(app, {
|
||||
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')]
|
||||
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')],
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -143,7 +143,7 @@ describe('explorer', function() {
|
|||
beforeEach(function setupExplorerWithoutUI() {
|
||||
app = loopback();
|
||||
explorer(app, {
|
||||
swaggerUI: false
|
||||
swaggerUI: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -200,7 +200,7 @@ describe('explorer', function() {
|
|||
|
||||
it('should allow `uiDirs` to be defined as an Array', function(done) {
|
||||
explorer(app, {
|
||||
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')]
|
||||
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')],
|
||||
});
|
||||
|
||||
request(app).get('/explorer/')
|
||||
|
@ -212,7 +212,7 @@ describe('explorer', function() {
|
|||
|
||||
it('should allow `uiDirs` to be defined as an String', function(done) {
|
||||
explorer(app, {
|
||||
uiDirs: path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')
|
||||
uiDirs: path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui'),
|
||||
});
|
||||
|
||||
request(app).get('/explorer/')
|
||||
|
|
Loading…
Reference in New Issue