openai
Version:
The official TypeScript library for the OpenAI API
12 lines • 369 B
JavaScript
export function parseNullDef(refs) {
// SAFETY: The OpenAPI target uses nullable plus enum because its null representation differs from the JSON Schema return type.
return refs.target === 'openApi3'
? {
enum: ['null'],
nullable: true,
}
: {
type: 'null',
};
}
//# sourceMappingURL=null.mjs.map