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 { OpenAPIV3_1 } from 'openapi-types';
import { import {
InputFieldJSONSchemaExtra, InputFieldJSONSchemaExtra,
InvocationJSONSchemaExtra,
OutputFieldJSONSchemaExtra, OutputFieldJSONSchemaExtra,
} from 'services/api/types'; } from 'services/api/types';
// Janky customization of OpenAPI Schema :/ // Janky customization of OpenAPI Schema :/
export type InvocationSchemaExtra = { export type InvocationSchemaExtra = InvocationJSONSchemaExtra & {
output: OpenAPIV3_1.ReferenceObject; // the output of the invocation output: OpenAPIV3_1.ReferenceObject; // the output of the invocation
title: string; title: string;
category?: string; category?: string;

View File

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