UNPKG

strapi-plugin-transformer

Version:

A plugin for Strapi Headless CMS that provides the ability to transform the API request and/or response.

29 lines (26 loc) 489 B
'use strict'; const { pluginConfigSchema } = require('./schema'); module.exports = { default: () => ({ responseTransforms: { removeAttributesKey: false, removeDataKey: false, }, requestTransforms: { wrapBodyWithDataKey: false, }, hooks: { preResponseTransform: () => {}, postResponseTransform: () => {}, }, contentTypeFilter: { uids: {}, }, plugins: { ids: {}, }, }), validator: (config) => { pluginConfigSchema.validateSync(config); }, };