import type { FromSchema, JSONSchema } from 'json-schema-to-ts'; // Recursively remove readonly modifiers from properties. type DeepMutable = { -readonly [P in keyof T]: DeepMutable; }; // Create a type from a const schema object. export type CreateSchemaType = FromSchema; // Create an OpenAPIV3.SchemaObject from a const schema object. export const createSchemaObject = (schema: T): DeepMutable => schema;