Generated server code uses jester as web framework.
Generated client library uses httpclient module from stdlib
RAML Object usually become Nim Object
Raml | Nim
----------- | -----------
string | string
number | float64
integer | int
boolean | bool
date | Time
enum | enum
file | string
Array | sequence
Union | -
TBD
Request and response body are mapped into structs and following the same rules as types.
struct name = [Resource name][Method name][ReqBody|RespBody].
Resources in the server are mapped to:
-
routes in main file:
-
API implementation that implements the resource. One file for each root resource
Resourcess in the client are implemented as services.
Let's say we have two root resources:
- /users
- /network
Client library is going to have two services:
- Users
- Network
Each service will have it's own methods
TBD
All client library functions have arguments to send query strings and query Parameters.
Resource Types and Traits already parsed by the parser. So, the generator need to know nothing about it.
go-raml only supports OAuth2.0.
- client : it currently able to get oauth2 token with client credentials.
- server : it currently only support JWT token.
Includes should work properly