RE: New REST API support in w3c-visserver-api

Hi. Bojan.
Thanks a lot for your great effort and sharing your implementation!

There is the test cases[1] from W3C automotive WG. So I would like to check whether did you test your VISS server with this or not?

Thanks!

[1] https://github.com/aShinjiroUrata/web-platform-tests/tree/dev-urata-vsss-test/vehicle/viss


Kind regards,
Wonsuk.


From: FIXED-TERM Miladinovic Bojan (RBSN/ESW22) <fixed-term.Bojan.Miladinovic@se.bosch.com>
Sent: Tuesday, November 26, 2019 8:54 PM
To: public-automotive@w3.org
Subject: New REST API support in w3c-visserver-api

Hi all,

I would like to announce experimental REST API support as a new feature of w3c-visserver-api.

Feature is already merged and available in w3c-visserver-api<%20https:/github.com/eclipse/kuksa.invehicle/tree/master/w3c-visserver-api> git repo with an updated README.md<https://github.com/eclipse/kuksa.invehicle/blob/master/w3c-visserver-api/README.md> with more details.

In short:

  *   Both Web-Socket and REST are supported at the same time. Extending/improving of REST API support is fairly straight-forward as REST API handler generates valid JSON requests toward single lower-level handler.


  *   Depending on server security configuration, both Web-Socket and REST can use both plain and TLS protected connection.


  *   Existing support for get/set/getmetadata/authorize requests is fully mimicked to match current implementation and its limitations. Any limitations (e.g. setting of multiple signals in single request, complex queries, ...) are currently not supported on both Web-Socket and REST API. Due to this, any data sent in REST request body is ignored (e.g. json data).


  *   'subscribe/unsubscribe'  requests are not supported, due to default natural flow of REST client -> server HTTP communication. If needed, support for them could be added in the future, but with some 'stretching' of regular HTTP connection flow.


·        Initial REST API documentation is provided in open-source 'OpenAPI' 3.0.1 format. Additional benefit of 'OpenAPI' format is posibility of automatic generation of interactive documentation direcly exercising defined REST API. Depending on tool used, both test client and server can be automatically generated. File rest-api.yaml<https://github.com/eclipse/kuksa.invehicle/blob/master/w3c-visserver-api/doc/rest-api.yaml> describes currently implemented REST API. How to use is described in this chapter<https://github.com/eclipse/kuksa.invehicle/tree/master/w3c-visserver-api#rest-api-specific-testing> of README.md.


Example for both features active at the same time could be found in use-case where more complex 'feeders' use Web-Socket connections to populate data, while 'thin' clients can get data through REST API from the server without the need to maintain Web-Socket connection.

Please be free to take a look and play with the current implementation.
Any comments and pull requests are highly welcome.


All the best,
Bojan

Received on Monday, 2 December 2019 07:54:40 UTC