UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

1 lines 587 B
{"version":3,"file":"request-body.mjs","names":[],"sources":["../../../../src/libs/http/openapi/request-body.ts"],"sourcesContent":["import type { OpenAPIV3 } from \"openapi-types\";\nimport z, { type ZodType } from \"zod\";\n\nconst requestBody = (schema: ZodType): OpenAPIV3.RequestBodyObject => {\n\treturn {\n\t\tcontent: {\n\t\t\t\"application/json\": {\n\t\t\t\tschema: z.toJSONSchema(schema) as OpenAPIV3.SchemaObject,\n\t\t\t},\n\t\t},\n\t};\n};\n\nexport default requestBody;\n"],"mappings":"mBAGA,MAAM,EAAe,IACb,CACN,QAAS,CACR,mBAAoB,CACnB,OAAQ,EAAE,aAAa,CAAM,CAC9B,CACD,CACD"}