mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: change modeling of obligatory parameters
This commit is contained in:
@@ -34,10 +34,10 @@ export class SCThingUpdateRoute extends SCAbstractRoute {
|
||||
'SCValidationErrorResponse',
|
||||
];
|
||||
this.method = 'PUT';
|
||||
this.obligatoryParameters = [
|
||||
'TYPE',
|
||||
'UID',
|
||||
];
|
||||
this.obligatoryParameters = {
|
||||
TYPE: 'SCThingTypes',
|
||||
UID: 'SCUuid',
|
||||
};
|
||||
this.requestBodyName = 'SCThingUpdateRequest';
|
||||
this.responseBodyName = 'SCThingUpdateResponse';
|
||||
this.statusCodeSuccess = 200;
|
||||
|
||||
@@ -34,7 +34,9 @@ export class SCBulkAddRoute extends SCAbstractRoute {
|
||||
'SCValidationErrorResponse',
|
||||
];
|
||||
this.method = 'POST';
|
||||
this.obligatoryParameters = ['UID'];
|
||||
this.obligatoryParameters = {
|
||||
UID: 'SCUuid',
|
||||
};
|
||||
this.requestBodyName = 'SCBulkAddRequest';
|
||||
this.responseBodyName = 'SCBulkAddResponse';
|
||||
this.statusCodeSuccess = 201;
|
||||
|
||||
@@ -34,7 +34,9 @@ export class SCBulkDoneRoute extends SCAbstractRoute {
|
||||
'SCValidationErrorResponse',
|
||||
];
|
||||
this.method = 'POST';
|
||||
this.obligatoryParameters = ['UID'];
|
||||
this.obligatoryParameters = {
|
||||
UID: 'SCUuid',
|
||||
};
|
||||
this.requestBodyName = 'SCBulkDoneRequest';
|
||||
this.responseBodyName = 'SCBulkDoneResponse';
|
||||
this.statusCodeSuccess = 204;
|
||||
|
||||
Reference in New Issue
Block a user