@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
20 lines (17 loc) • 395 B
text/typescript
import {cleanObject} from "@tsed/core";
import {OpenSpecInfo} from "@tsed/openspec";
/**
* @ignore
* @param info
*/
export function mapOpenSpecInfo(info: Partial<OpenSpecInfo>): OpenSpecInfo {
const {title, description, version, termsOfService, contact, license} = info;
return cleanObject({
version,
title,
description,
termsOfService,
contact,
license
});
}