import{DefinitionPath as t}from"../attributes/index.js";import{getNodeAttribute as i}from"../helpers/get-node-attribute.js";import{getResolvedSampleCodeBlock as o}from"../helpers/get-resolved-sample-code-block.js";const n={schema:{attributes:{descriptionFile:{type:t,required:!0},pointer:{type:String,required:!1},operationId:{type:String,required:!1},exampleKey:{type:String,required:!1},responseSamplesResolved:{type:Array,required:!1,resolver:"openapiResponseSamples"}},validate(r){const e=[];return r.attributes.pointer&&r.attributes.operationId&&e.push({id:"pointer-and-operationId-attributes-are-mutually-exclusive",level:"error",message:'The "pointer" and "operationId" attributes are mutually exclusive, you can only use one.'}),!r.attributes.pointer&&!r.attributes.operationId&&e.push({id:"pointer-or-operationId-attribute-required",level:"error",message:'This tag requires the "pointer" or "operationId" attribute to render correctly.'}),e},render:"OpenApiResponseSample",selfClosing:!0,dynamicComponentLib:"openapi",renderForLlms(r){const e=i(r,"responseSamplesResolved");return!Array.isArray(e)||e.length===0?"":e.map(o).join("")}},tagName:"openapi-response-sample"};export{n as openApiResponseSample};
