UNPKG

@redocly/openapi-core

Version:

See https://github.com/Redocly/redocly-cli

16 lines (14 loc) 381 B
import { Oas3Rule, Oas2Rule } from '../../visitors'; import { missingRequiredField } from '../utils'; export const InfoLicense: Oas3Rule | Oas2Rule = () => { return { Info(info, { report }) { if (!info.license) { report({ message: missingRequiredField('Info', 'license'), location: { reportOnKey: true }, }); } }, }; };