nirum-lang / nirum

Nirum: IDL compiler and RPC/distributed object framework for microservices
https://nirum.org/
GNU General Public License v3.0
121 stars 27 forks source link

Mapping service methods to URLs through annotations #130

Open dahlia opened 7 years ago

dahlia commented 7 years ago

As Nirum have annotations, we configure url routes to service methods using the syntax. Some sci-fi is following:

service customer (
    @http-get("/tokens/<token>/key/")
    key get-key-by-token (token token),
    @http-get("/tokens/groups/")
    {{token}} group-tokens ({token} tokens),
);

See also URI template proposed by RFC 6570.

dahlia commented 7 years ago

See also https://github.com/sigmavirus24/uritemplate.