Commit 7f248eea authored by krlwlfrt's avatar krlwlfrt
Browse files

feat: use tag @validatable to mark schema types

parent 75ceeb45
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ import { SCLicensePlate } from '../types/namespaces';

/**
 * A configuration file that configures app and backend
 * @validatable
 */
export interface SCConfigFile {

+4 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ import {ValidationError} from 'jsonschema';

/**
 * A generic error that can be returned by the backend if somethings fails during the processing of a request
 *
 * @validatable
 */
export interface SCErrorResponse extends Error {
  /**
@@ -126,11 +128,11 @@ export class SCNotFoundErrorResponse extends SCError {
}

/**
 * An error that is returned, when an internal server error occured
 * An error that is returned, when an internal server error occurred
 */
export class SCInternalServerErrorResponse extends SCError {
  /**
   * Internal error that occured. If the stack is disabled this error is not set for security reasons
   * Internal error that occurred. If the stack is disabled this error is not set for security reasons
   */
  additionalData?: Error;

+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ import {SCAbstractRoute} from '../../../Route';

/**
 * Index request
 *
 * @validatable
 */
export interface SCIndexRequest {
}
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ import {SCBackendConfiguration} from '../../../types/config/Backend';

/**
 * A response to an index request
 *
 * @validatable
 */
export interface SCIndexResponse {
  app: SCAppConfiguration;
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ import {SCAbstractRoute} from '../../../../Route';

/**
 * Request to update an existing thing
 *
 * @validatable
 */
export type SCThingUpdateRequest = SCThings;

Loading