{"version":3,"file":"operation_response.cjs","sources":["../../../src/generators/operation_response.ts"],"sourcesContent":["import type { OpenAPIV3 } from 'openapi-types'\nimport type { Context } from '../context.js'\nimport { loadType } from '../loaders/type.js'\nimport type { OperationResponseMetadata } from '../metadata/operation_response.js'\n\nexport async function generateOperationResponse(\n  context: Context,\n  metadata: OperationResponseMetadata\n): Promise<OpenAPIV3.ResponseObject> {\n  const { type, schema: s, enum: e, mediaType, status, ...response } = metadata\n\n  return {\n    description: '',\n    ...response,\n    content: {\n      [mediaType]: {\n        schema: await loadType(context, metadata),\n      },\n    },\n  }\n}\n"],"names":["type","loadType"],"mappings":";;;;AAKA,eAAsB,yBAAA,CACpB,SACA,QAAA,EACmC;AACnC,EAAA,MAAM,QAAEA,MAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,IAAA,EAAM,GAAG,SAAA,EAAW,MAAA,EAAQ,GAAG,QAAA,EAAS,GAAI,QAAA;AAErE,EAAA,OAAO;AAAA,IACL,WAAA,EAAa,EAAA;AAAA,IACb,GAAG,QAAA;AAAA,IACH,OAAA,EAAS;AAAA,MACP,CAAC,SAAS,GAAG;AAAA,QACX,MAAA,EAAQ,MAAMC,aAAA,CAAS,OAAA,EAAS,QAAQ;AAAA;AAC1C;AACF,GACF;AACF;;;;"}