mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
feat: json-schema updates\nfeat: new route proposal
This commit is contained in:
@@ -28,17 +28,23 @@ import {SCAbstractRoute, SCRouteHttpVerbs} from '../route.js';
|
||||
* @validatable
|
||||
*/
|
||||
export type SCBulkAddRequest = SCThings;
|
||||
import {default as bulkAddRequestSchema} from 'schema:#SCBulkAddRequest';
|
||||
|
||||
/**
|
||||
* Response to a request to add a thing to a bulk
|
||||
* @validatable
|
||||
*/
|
||||
export interface SCBulkAddResponse {}
|
||||
import {default as bulkAddResponseSchema} from 'schema:#SCBulkAddResponse';
|
||||
|
||||
/**
|
||||
* Route for indexing SC things in a bulk
|
||||
*/
|
||||
export class SCBulkAddRoute extends SCAbstractRoute {
|
||||
responseBodySchema = bulkAddRequestSchema;
|
||||
|
||||
requestBodySchema = bulkAddResponseSchema;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.errorNames = [
|
||||
@@ -54,8 +60,6 @@ export class SCBulkAddRoute extends SCAbstractRoute {
|
||||
this.obligatoryParameters = {
|
||||
UID: 'SCUuid',
|
||||
};
|
||||
this.requestBodyName = 'SCBulkAddRequest';
|
||||
this.responseBodyName = 'SCBulkAddResponse';
|
||||
this.statusCodeSuccess = StatusCodes.CREATED;
|
||||
this.urlPath = '/bulk/:UID';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user