Instead of having @Action annotation in templates, Yggdrasil now provides @RequestMapping annotation which takes two arguments: path and httpMethod
This allows full support for RESTful interactions with webArtifacts compared to having RPC like @Action annotation which was statically associated to a PUT httpMethod.
I tried to make the template path configurable, s.t. it can be located outside of the yggdrasil folder. However, I did not find a simple solution for this yet and decided to keep the templates inside of the yggdrasil repo for now.
The advantage over having @GET @PUT @POST etc separately is that all the httpMethods come from the same annotation. Annotations cannot inherit or implement another annotation, so this simplifies the coding within Yggdrasil a lot.
Instead of having @Action annotation in templates, Yggdrasil now provides @RequestMapping annotation which takes two arguments: path and httpMethod This allows full support for RESTful interactions with webArtifacts compared to having RPC like @Action annotation which was statically associated to a PUT httpMethod.
I adapted the home-automation example from Simon Bienz accordingly on the dev-branch (I intentionally didn't change the master branch because I was not sure whether this has been used in a publication): https://github.com/Interactions-HSG/wot-search-home-automation/tree/dev
I tried to make the template path configurable, s.t. it can be located outside of the yggdrasil folder. However, I did not find a simple solution for this yet and decided to keep the templates inside of the yggdrasil repo for now.
Sidenotes: