import{entityFileSchema as n}from"@redocly/config";import{entityBaseProperties as p}from"@redocly/config";function y(r,e){const i=n.oneOf.find(t=>t.properties.type.const===e);if(!i){const t=Object.keys(r.entityTypes??{}).find(o=>o===e);if(!t)throw new Error(`Entity type: ${e} not found`);return{type:"object",properties:{...p,type:{const:t},metadata:{additionalProperties:!0,...r.entityTypes?.[t].metadataSchema},revision:{type:"string"}},additionalProperties:!1}}return{properties:{...i.properties,revision:{type:"string"}},additionalProperties:!1}}export{y as createEntityUpdateSchema};
