feat: adding openapi spect generation to the frontend client aas well as to fast api. Broke API out into different routes
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
/* 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';
|
||||
import type { StationResponse } from './StationResponse';
|
||||
import {
|
||||
StationResponseFromJSON,
|
||||
StationResponseFromJSONTyped,
|
||||
StationResponseToJSON,
|
||||
} from './StationResponse';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface AllStationModel
|
||||
*/
|
||||
export interface AllStationModel {
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: StationResponse; }}
|
||||
* @memberof AllStationModel
|
||||
*/
|
||||
stations: { [key: string]: StationResponse; } | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the AllStationModel interface.
|
||||
*/
|
||||
export function instanceOfAllStationModel(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "stations" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function AllStationModelFromJSON(json: any): AllStationModel {
|
||||
return AllStationModelFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function AllStationModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllStationModel {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'stations': { [key: string]: StationResponse; }FromJSON(json['stations']),
|
||||
};
|
||||
}
|
||||
|
||||
export function AllStationModelToJSON(value?: AllStationModel | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'stations': { [key: string]: StationResponse; }ToJSON(value.stations),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* 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 HTTPValidationError
|
||||
*/
|
||||
export interface HTTPValidationError {
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof HTTPValidationError
|
||||
*/
|
||||
detail?: any | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the HTTPValidationError interface.
|
||||
*/
|
||||
export function instanceOfHTTPValidationError(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function HTTPValidationErrorFromJSON(json: any): HTTPValidationError {
|
||||
return HTTPValidationErrorFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function HTTPValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): HTTPValidationError {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'detail': !exists(json, 'detail') ? undefined : json['detail'],
|
||||
};
|
||||
}
|
||||
|
||||
export function HTTPValidationErrorToJSON(value?: HTTPValidationError | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'detail': value.detail,
|
||||
};
|
||||
}
|
||||
|
||||
44
mta-sign-ui/gen-sources/mta-sign-api/models/Route.ts
Normal file
44
mta-sign-ui/gen-sources/mta-sign-api/models/Route.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/* 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';
|
||||
/**
|
||||
* An enumeration.
|
||||
* @export
|
||||
* @interface Route
|
||||
*/
|
||||
export interface Route {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the Route interface.
|
||||
*/
|
||||
export function instanceOfRoute(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function RouteFromJSON(json: any): Route {
|
||||
return RouteFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function RouteFromJSONTyped(json: any, ignoreDiscriminator: boolean): Route {
|
||||
return json;
|
||||
}
|
||||
|
||||
export function RouteToJSON(value?: Route | null): any {
|
||||
return value;
|
||||
}
|
||||
|
||||
66
mta-sign-ui/gen-sources/mta-sign-api/models/RouteResponse.ts
Normal file
66
mta-sign-ui/gen-sources/mta-sign-api/models/RouteResponse.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
/* 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 RouteResponse
|
||||
*/
|
||||
export interface RouteResponse {
|
||||
/**
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof RouteResponse
|
||||
*/
|
||||
arrivalTimes: any | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the RouteResponse interface.
|
||||
*/
|
||||
export function instanceOfRouteResponse(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "arrivalTimes" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function RouteResponseFromJSON(json: any): RouteResponse {
|
||||
return RouteResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function RouteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RouteResponse {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'arrivalTimes': json['arrival_times'],
|
||||
};
|
||||
}
|
||||
|
||||
export function RouteResponseToJSON(value?: RouteResponse | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'arrival_times': value.arrivalTimes,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* 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';
|
||||
import type { RouteResponse } from './RouteResponse';
|
||||
import {
|
||||
RouteResponseFromJSON,
|
||||
RouteResponseFromJSONTyped,
|
||||
RouteResponseToJSON,
|
||||
} from './RouteResponse';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StationResponse
|
||||
*/
|
||||
export interface StationResponse {
|
||||
/**
|
||||
*
|
||||
* @type {{ [key: string]: RouteResponse; }}
|
||||
* @memberof StationResponse
|
||||
*/
|
||||
routes: { [key: string]: RouteResponse; } | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the StationResponse interface.
|
||||
*/
|
||||
export function instanceOfStationResponse(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "routes" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function StationResponseFromJSON(json: any): StationResponse {
|
||||
return StationResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StationResponse {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'routes': { [key: string]: RouteResponse; }FromJSON(json['routes']),
|
||||
};
|
||||
}
|
||||
|
||||
export function StationResponseToJSON(value?: StationResponse | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'routes': { [key: string]: RouteResponse; }ToJSON(value.routes),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
8
mta-sign-ui/gen-sources/mta-sign-api/models/index.ts
Normal file
8
mta-sign-ui/gen-sources/mta-sign-api/models/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './AllStationModel';
|
||||
export * from './HTTPValidationError';
|
||||
export * from './Route';
|
||||
export * from './RouteResponse';
|
||||
export * from './StationResponse';
|
||||
export * from './ValidationError';
|
||||
Reference in New Issue
Block a user