Comments (5)
Hello,
Appreciate the interest!
Yes, this should be possible. A request header that indicates that transformation should be skipped sounds fairly easy to implement. At the moment I am considering using Strapi-Transformer-Ignore
as the header name. Let me know if you have any recommendations.
Eventually an allow/block list can also be added but that will require more work/thought before implementing.
from strapi-plugin-transformer.
Request header name Strapi-Transformer-Ignore
sounds good.
Benefits would be:
- I could install and use the plugin to have API responses close to the v3 format, which reduces initial refactoring
- One by one, I can go through my API requests, add that header and do the refactoring
- Once I'm done, I can uninstall the plugin, or keep it where I need it
Just one more question before settling on this:
Could the prefix
configuration property be used for that aswell? Instead of providing a string, it could be a list of strings or a regex that defines which API routes should generally be transformed and which do not. Would provide another level of flexibility.
from strapi-plugin-transformer.
The prefix
property is meant to define the top level endpoint for the api, regardless of any routes. It needs to stay as is.
In terms of the allow list it would be a seperate property in the settings as it's responsible for a different functionality. Most likely named allowList
which would take an array of routes that the plugin should transform.
I will need to research and see how feasible it is to allow regex type routes (/pages/*
) and such instead of hardcoding the full route path each time.
from strapi-plugin-transformer.
Thanks for the reply, it makes sense and I agree.
from strapi-plugin-transformer.
Closing in favor of #36 and #37 discussions.
from strapi-plugin-transformer.
Related Issues (20)
- [FEAT] Transformations are not visible in Documentation plugin
- Update yup to v1 branch
- Not working - strapi v 4.24 HOT 1
- TypeError: Cannot read properties of undefined (reading 'uid') HOT 20
- Config not being set correctly HOT 3
- DenyList is not working in my strapi project HOT 1
- hook example
- [FR] add transformation support for plugin APIs HOT 7
- remove "data" property from JSON Datatype HOT 3
- [bug] custom collections are not transformed HOT 7
- The plugin doesn't change the response
- Request to include modifyResponseBodyData as an available service method HOT 1
- strapi-plugin-publisher still has attributes key HOT 3
- Custom Path for content-type not registering middleware in v3.0 HOT 2
- DUPLICATE
- Is anyway to removeAttributesKey when i use strapi-plugin-menus HOT 1
- transformResponse is not working strapin v4.9.0. HOT 1
- Error de Login HOT 2
- Plugin configuration needs to be inside .config/env/ HOT 2
- [BUG] repeatable component with nested component that contains a relation is not transformed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-plugin-transformer.