Skip to content

Commit

Permalink
Add type comments
Browse files Browse the repository at this point in the history
  • Loading branch information
samchungy committed Sep 24, 2024
1 parent dbcbe40 commit cb3cf47
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/create/schema/single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import type { ZodType } from 'zod';

import type { oas30, oas31 } from '../../../dist';
import type { OpenApiVersion } from '../../openapi';
import { createSchemaComponents, getDefaultComponents } from '../components';
import {
type CreationType,
createSchemaComponents,
getDefaultComponents,
} from '../components';

import { type SchemaState, createSchema as internalCreateSchema } from '.';

Expand All @@ -18,10 +22,16 @@ export interface SchemaResult {

export interface CreateSchemaOpts {
/**
* The type of schema to create, defaults to 'output'
* This controls whether this should be rendered as a request (`input`) or response (`output`). Defaults to `output`
*/
schemaType?: CreationType;
/**
* OpenAPI version to use, defaults to `'3.1.0'`
*/
schemaType?: 'input' | 'output';
openapi?: OpenApiVersion;
/**
* Additional components to use and create while rendering the schema
*/
components?: Record<string, ZodType>;
}

Expand Down

0 comments on commit cb3cf47

Please sign in to comment.