Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
// ! code: extend
app.use('/users-1', createService(options));
// !end
// Get our initialized service so that we can register hooks
const service = app.service('users-1');
service.hooks(hooks);
// !code: func_return // !end
};
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
app.use('/users-1', createService(options));
// Get our initialized service so that we can register hooks
const service = app.service('users-1');
service.hooks(hooks);
// !code: func_return // !end
};
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
app.use('/nedb-2', createService(options));
// Get our initialized service so that we can register hooks
const service = app.service('nedb-2');
service.hooks(hooks);
// !code: func_return // !end
};
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
// ! code: extend
app.use('/nedb-2', createService(options));
// !end
// Get our initialized service so that we can register hooks
const service = app.service('nedb-2');
service.hooks(hooks);
// !code: func_return // !end
};
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
app.use('/nedb-1', createService(options));
// Get our initialized service so that we can register hooks
const service = app.service('nedb-1');
service.hooks(hooks);
// !code: func_return // !end
};
let moduleExports = function (app: App) {
let Model = createModel(app);
let paginate = app.get('paginate');
// !code: func_init // !end
let options = {
Model,
paginate,
// !code: options_more // !end
};
// !code: options_change // !end
// Initialize our service with any options it requires
// ! code: extend
app.use('/nedb-1', createService(options));
// !end
// Get our initialized service so that we can register hooks
const service = app.service('nedb-1');
service.hooks(hooks);
// !code: func_return // !end
};
export function createSpecService(specModel) {
const service = sequelize({
Model: specModel,
});
service.docs = {
description: 'Swagger/OpenAPI specs',
definitions: {
specifications: {
type: 'object',
additionalProperties: true,
},
'specifications list': {
type: 'array',
},
},
};
return service;
}
export function createBlobMetadataService(blobMetadataModel) {
return sequelize({
Model: blobMetadataModel,
});
}
export function createSdkService(sdkModel) {
const service = sequelize({
Model: sdkModel,
});
service.docs = {
description: 'The SDKs generated by OpenAPI specifications',
definitions: {
sdks: {
type: 'object',
properties: {
sdkConfigId: {
type: 'integer',
format: 'int64',
description: 'ID of the SDK configuration to generate the SDK for',
},
path: {
type: 'string',
description: 'URL from where the SDK can be downloaded from',
export function createSdkConfigService(sdkConfigModel) {
const service = sequelize({
Model: sdkConfigModel,
});
service.docs = {
description:
'The SDK configurations used for generating SDKs according to a given ' +
'specification',
definitions: {
sdkConfigs: {
type: 'object',
properties: {
specId: {
type: 'integer',
format: 'int64',
description: 'ID of the specification associated with the SDK configuration',
},
target: {