Closed ml27299 closed 5 years ago
If a transformer or checker fails (for instance, if its name contains a typo and cannot be found in configuration) the request is executed, a warn is added to the response and the error is logged.
This way this issue can be fixed PATCHing the rts
metadata.
@ujibang we'll have to port this fix also on the 4.0 release
This was cherry picked from 4.0
Sweet, thx! you guys have great response times!
Thank you @ml27299
We are gathering feedback from users to improve the community, the product and also create the next major version of RESTHeart. If it's ok, you can follow up on issue #321 or you can write an email to info@softinstigate.com (if you want to share details that you prefer not to disclose publicly) with you thought and we'll follow up, so that we can keep you in the loop about our roadmap and give the product a direction that is based on actual user's input.
The items we'd like to discuss are:
We'll soon put a "call to action" link on our website, so that all users can participate.
Hi @ml27299 We have released 3.10.0 which includes this fix https://github.com/SoftInstigate/restheart/releases/tag/3.10.0
sweet, thx!
If you were to put a wrong/typo name for a transformer (phase = REQUEST), you cant use the PATCH request on a collection to unset it.
Imagine this was called first
the name should be "addRequestProperties", so I should be able to unset the "rts" property, then set it again with the proper name
Expected Behavior
Current Behavior
Context
If I were to mess up the name, I cant make any requests except DELETE requests. I was able to fix it by dropping my database and reseeding it, but luckily it was a local database, that's not an acceptable solution for production use cases.
Removing the whole database was necessary because even tho "show collections" showed a "_properties" collection, doing "db._properties.drop()" did not work, it just said "db._properties" is undefined
Environment
mongo 3.6 restheart 3.9.0-SNAPSHOT(docker container)
Steps to Reproduce
Possible Implementation
If you can make it work like how the documentation says to update collection properties, then I'd say thats the best solution, but since the problem is kinda fundamental to how a request transformer is implemented, then maybe this would work?
I've implemented schemas in my restheart, I've noticed a "_schemas" collection was made (same deal as the _properties behavior when trying to execute any mongodb commands to it). In the documentation it doesnt quite say that you can delete schemas, but its kinda implied. I would think the same way that schemas are deleted, a metadata property on a collection can be deleted?
currently in restheart, you can do this to delete a schema
So, something like this to remove properties?