UNPKG

@redocly/openapi-core

Version:

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

15 lines 503 B
import { isPlainObject } from '../../utils/is-plain-object.js'; export const InfoOverride = (newInfo) => { return { Info: { leave(info) { if (!isPlainObject(newInfo)) { throw new Error(`"info-override" decorator should be called with an object`); } const { severity: _, ...rest } = newInfo; Object.assign(info, rest); }, }, }; }; //# sourceMappingURL=info-override.js.map