Hi Brian,
The restful objects viewer implemented in Apache Isis and exposed by swagger-ui
implements the restful objects spec 1)
The basic idea is that you can 'discover' the domain.In the case of simple app:
you can start out with
curl -X GET --header 'Accept: application/json' --header 'Authorization: Basic
c3ZlbjpwYXNz'
'[YOUR_BASE_URL]/restful/services/simple.SimpleObjectMenu/actions/listAll/invoke'
That will give you among others the oid's.
Then update name can be done by
curl -X PUT --header 'Content-Type: application/json' --header 'Accept:
application/json' --header 'Authorization: Basic c3ZlbjpwYXNz' -d '{ \ "name" :
{ \ "value" : "some new name" \ } \ }'
'[YOUR_BASE_URL]/restful/objects/simple.SimpleObject/0/actions/updateName/invoke'
Grtz Johan
1) http://isis.apache.org/guides/ugvro/ugvro.html#__ugvro
On Wed, Aug 22, 2018 11:15 PM, Brian K [email protected] wrote:
Hello,
I see by using the Swagger-UI that the REST view is usable by inspecting
the JSON. For instance, I can get an object via the GET url, and then
execute an action on it by looking at the "$$instanceId" member to fill in
the action string argument that is needed for its actions: "objectID".
But, swagger-codegen seems to ignore this attribute. Maybe it's because it
starts with $$ and is not a part of the generated swagger specification.
Using a generated client stub (I tried both "java" and "csharp"
generators), I don't see a way of finding out the objectID string needed to
execute the object's actions.
Has anyone been able to execute actions from a REST client generated by
swagger codegen? For instance, in SimpleApp archetype, can you execute the
UpdateName action of SimpleObject? Is there a basic piece I'm missing?
Thank you,
Brian