MovingBlocks / FacadeServer

A headless facade that acts as a game host and provides web-based administration. Automation category: Terasology Facade. See https://forum.terasology.org/threads/facadeserver-headless-server-with-web-interface.1906
Apache License 2.0
4 stars 11 forks source link

REST methods #9

Closed gianluca-nitti closed 7 years ago

gianluca-nitti commented 7 years ago

This branch contains a large rewrite of the protocol-agnostic (HTTP and WebSocket) resource management class structure.

Previously, there was distinction between writable and readable resource classes, and writable resources used to accept a single method only (mapped to POST for the HTTP interface). This was leading to:

The new system is based on REST principles which map more naturally to HTTP without losing the real-time advantage of WebSocket. When using WebSocket, methods are specified as strings and paths as JSON arrays; more information is available in the docs.md document in the root of this branch.

The API specification has also been described in the Swagger/OpenAPI format, in the swagger.json file. It's possible to browse the specification online using this link: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/gianluca-nitti/FacadeServer/rest-methods/src/main/resources/web/swagger.json