mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
Implemented API from code generated by OpenAPI
This commit is contained in:
84
www/app/api/models/ValidationError.ts
Normal file
84
www/app/api/models/ValidationError.ts
Normal file
@@ -0,0 +1,84 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* FastAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from "../runtime";
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ValidationError
|
||||
*/
|
||||
export interface ValidationError {
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof ValidationError
|
||||
*/
|
||||
loc: any | null;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof ValidationError
|
||||
*/
|
||||
msg: any | null;
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof ValidationError
|
||||
*/
|
||||
type: any | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ValidationError interface.
|
||||
*/
|
||||
export function instanceOfValidationError(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "loc" in value;
|
||||
isInstance = isInstance && "msg" in value;
|
||||
isInstance = isInstance && "type" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function ValidationErrorFromJSON(json: any): ValidationError {
|
||||
return ValidationErrorFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ValidationErrorFromJSONTyped(
|
||||
json: any,
|
||||
ignoreDiscriminator: boolean,
|
||||
): ValidationError {
|
||||
if (json === undefined || json === null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
loc: json["loc"],
|
||||
msg: json["msg"],
|
||||
type: json["type"],
|
||||
};
|
||||
}
|
||||
|
||||
export function ValidationErrorToJSON(value?: ValidationError | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
loc: value.loc,
|
||||
msg: value.msg,
|
||||
type: value.type,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user