import{getLineColLocation as f,isAbsoluteUrl as s}from"@redocly/openapi-core";import{getCodeframe as l}from"@redocly/openapi-core";import m from"node:path";import{gray as u}from"../../utils/reporter/colors.js";function h(r,n){return`Config validation error:

`+i(r);function i(e){const o=e.location[0],a=s(o.source.absoluteRef)?o.source.absoluteRef:m.relative(n,o.source.absoluteRef),t=f(o),c=o.pointer?u(`at ${o.pointer}`):"";return`${`${a}:${t.start.line}:${t.start.col}`} ${c}

${e.message}

`+l(t,!0)+`

`}}export{h as formatConfigProblem};
