Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-01-19 16:11:36 +01:00
parent 98181f627c
commit 2067689453
4 changed files with 12 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-openapi-utils': patch
---
Internal updates due to `json-schema-to-ts`
+3 -3
View File
@@ -7,7 +7,7 @@ import type { ContentObject } from 'openapi3-ts';
import type core from 'express-serve-static-core';
import { Express as Express_2 } from 'express';
import { FromSchema } from 'json-schema-to-ts';
import { JSONSchema7 } from 'json-schema-to-ts';
import { JSONSchema } from 'json-schema-to-ts';
import { middleware } from 'express-openapi-validator';
import type { OpenAPIObject } from 'openapi3-ts';
import type { ParameterObject } from 'openapi3-ts';
@@ -62,7 +62,7 @@ type ComponentTypes<Doc extends RequiredDoc> = Extract<
// @public (undocumented)
type ConvertAll<T extends ReadonlyArray<unknown>> = {
[Index in keyof T]: T[Index] extends JSONSchema7
[Index in keyof T]: T[Index] extends JSONSchema
? FromSchema<T[Index]>
: T[Index];
} & {
@@ -463,7 +463,7 @@ type ParameterSchema<
Schema extends ImmutableParameterObject['schema'],
> = SchemaRef<Doc, Schema> extends infer R
? R extends ImmutableSchemaObject
? R extends JSONSchema7
? R extends JSONSchema
? FromSchema<R>
: never
: never
@@ -18,7 +18,7 @@
* Pulled from https://github.com/varanauskas/oatx.
*/
import { FromSchema, JSONSchema7 } from 'json-schema-to-ts';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import {
ImmutableContentObject,
ImmutableOpenAPIObject,
@@ -221,7 +221,7 @@ export type TuplifyUnion<
* @public
*/
export type ConvertAll<T extends ReadonlyArray<unknown>> = {
[Index in keyof T]: T[Index] extends JSONSchema7
[Index in keyof T]: T[Index] extends JSONSchema
? FromSchema<T[Index]>
: T[Index];
} & { length: T['length'] };
@@ -36,7 +36,7 @@ import {
SchemaRef,
ValueOf,
} from './common';
import { FromSchema, JSONSchema7 } from 'json-schema-to-ts';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
/**
* @public
@@ -96,7 +96,7 @@ export type ParameterSchema<
Schema extends ImmutableParameterObject['schema'],
> = SchemaRef<Doc, Schema> extends infer R
? R extends ImmutableSchemaObject
? R extends JSONSchema7
? R extends JSONSchema
? FromSchema<R>
: never
: never