hi there,
I was playing around with the sling post servlet and the import option
and found some odd issues, trying to see if they are actual defects or
if this is working as designed:
the following sequence
curl -F":operation=import" -F":replace=true" -F":name=test"
-F":contentType=json" -F":content={ \"text\": \"test\", \"childOne\": {
\"test\": \"child1Test2\"} }" http://admin:admin@localhost:8080/content
curl -F":operation=import" -F":replace=true" -F":name=test2"
-F":contentType=json" -F":content={ \"text\": \"test\", \"childOne\": {
\"test\": \"child1Test2\"} }" http://admin:admin@localhost:8080/content
curl -F":operation=import" -F":replace=true" -F":name=test"
-F":contentType=json" -F":content={ \"text\": \"test\", \"childOne\": {
\"test\": \"child1Test2\"} }" http://admin:admin@localhost:8080/content
creates
/content/test2
/content/test
since /content is a sling:orderedFolder I would have expected the order
to stay intact
Also, if I do
curl -F":operation=import" -F":replace=true" -F":contentType=json"
-F":content={ \"text\": \"test\", \"childOne\": { \"test\":
\"child1Test2\"} }" http://admin:admin@localhost:8080/content/test
and then
curl -F":operation=import" -F":replace=true" -F":contentType=json"
-F":content={ \"text\": \"test\", \"childTwo\": { \"test\":
\"child1Test2\"} }" http://admin:admin@localhost:8080/content/test
the node structure is
/content/test/childOne
/content/test/childTwo
I would expect the replace action to remove childOne?
I also noticed that the docs for the sling post servlet use ' in the
json structure, sling errors out on that, it requires " instead
thank you
Ruben Reusser