-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: RESTful Filter #2185
Comments
According to Jim, the intent for this was "to automatically translate between JSON & XML data in & out." (#2165). Also "once i am done, we shouldn't need the formatter explicitly. The filter will be a before & after filter for a ResourceController" (Slack). He doesn't appear to have done any work on it but it doesn't seem too complicated. |
I'm curious how much people still use XML for their RESTful work. Seems like JSON has kind of won out. Tempted to close this since nothing is happening on it. |
I think the Filter would still be desirable outside of the XML bit. I believe the intent was for it to handle all the negotiation and formatting so that wouldn't be a responsibility of the controller/trait. That said, anecdotally I have yet to come across an XML API instance where I would have needed that feature. |
@MGatner now that time has marched on, what are your thoughts on this? Reading back through it, it strikes me as more magical than CI typically tries to be. Again, tempted to close. If people decide it's a worthy feature then a discussion or PR will show up, but I haven't seen anyone mention a need for this.... |
@lonnieezell The problem has always been the lack of expertise in this area, since Jim passed. We had a forum visitor with a lot of great advice but who couldn't implement the code - I offered to do the coding but it just hasn't happened yet. If anyone else wants to do the work, this thread and user seem to have what we need to proceed: |
I don't see what he was talking about having anything to do with this particular issue, though. Regarding his post, my understanding was the PUT didn't allow for multipart/form inputs, but heading over to MDN tells me I seem to be wrong. Maybe that was just a typical use-case that I had learned in the day? Not sure, but his point has merit - we shouldn't restrict to POST for form validation/files, I guess. Needs more research, though. |
RESTful cannot be a filter. This should be the default work of the framework core. |
🤷♂️ I dunno what to say mates. This is not my area but I've kept it alive based on multiple conversations with Jim and his insistence he had a solution in mind. The framework has revolved lots since then, maybe it isn't relevant anymore, or maybe nobody is using REST with CI4 these days. I don't foresee more involvement with REST in my near future so if we just want to abandon this I have no issues. |
I'm going to close this one. I think there's still areas around REST that can be improved. I don't think a filter to auto-convert the format of the data is one that's helpful. Maybe he had something in mind I can't see, but we'll never know. |
Add a RESTful filter to handle data representation transformations for REST requests
The text was updated successfully, but these errors were encountered: