feat(ui): improve openapi schema types

We can use the autogenerated types to avoid types
This commit is contained in:
psychedelicious 2023-11-27 12:05:56 +11:00
parent 4c6a88a642
commit 282a7f32d3
2 changed files with 3 additions and 1 deletions

View File

@ -1,12 +1,13 @@
import { OpenAPIV3_1 } from 'openapi-types';
import {
InputFieldJSONSchemaExtra,
InvocationJSONSchemaExtra,
OutputFieldJSONSchemaExtra,
} from 'services/api/types';
// Janky customization of OpenAPI Schema :/
export type InvocationSchemaExtra = {
export type InvocationSchemaExtra = InvocationJSONSchemaExtra & {
output: OpenAPIV3_1.ReferenceObject; // the output of the invocation
title: string;
category?: string;

View File

@ -30,6 +30,7 @@ export type EnqueueBatchResult = components['schemas']['EnqueueBatchResult'];
export type InputFieldJSONSchemaExtra = s['InputFieldJSONSchemaExtra'];
export type OutputFieldJSONSchemaExtra = s['OutputFieldJSONSchemaExtra'];
export type InvocationJSONSchemaExtra = s['UIConfigBase'];
// App Info
export type AppVersion = s['AppVersion'];