It's certainly an interesting idea :-) I'm still not sure I understand
fully how it would work, but if we can make something that works with
Swagger that would be very cool.

Would you look at each resource described by Swagger? I guess some of them
would require HTTP parameters etc... Would be hard to model as a table I
think. But OTOH we might simply want to aim for a subset that is easy and
simple.

A kinda related idea would be to base it on RDF or other such "open data" /
"semantic web" like standards. Not that that makes life easy, but maybe it
gives a bit more standardization on what type of services we will be
integrating with.

2016-03-10 8:54 GMT+01:00 Alberto Rodriguez <[email protected]>:

> Hi all,
>
> I've been thinking for a while whether it makes sense to add an API REST
> module in Metamodel. The idea would be to have another Metamodel module
> which allows the user to connect to a specific API REST and then perform
> POST, GET, PUT and DELETE methods. The DataContext could be instantiated
> passing the base url, for instance: http://mydomain/myapirest/ and then
> you
> will be able to interact with the operations provided by this API REST. The
> different operations provided by the API would be our Datacontext "tables",
> to auto-discover the "tables" we could assume that the API REST provides a
> framework (swagger[1] for instance) and then we can parse the API
> documentation provided by the framework, see following an example of the
> json provided by swagger:
>
>
> {"apiVersion":"1.0","swaggerVersion":"1.2","apis":[{"path":"/api/users","description":"User
> methods"},{"path":"/api/roles","description":"Roles methods"}]}
>
> In order to query the "tables" we can use the GET method of the API and
> then we can handle the responses (json/xml format) by creating an
> on-the-fly json/xml file and using our json/xml metamodel modules to query
> this response and return the results to the client.
>
> This is just a bunch of ideas but...what do you think? Does it make any
> sense for you all? Would it be useful?
>
> [1] http://swagger.io/
>

Reply via email to