We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can generate API-types, server stub and client. From openapi schema. By openapi input it will generate 3 packages:
The server is defined in terms of interfaces. For example:
in the API types:
type GetArticle m = Query "a" -> Get (Resp Json Article) type PostArticle m = Body Article -> Query "author" Text -> Post (Resp Json ()) data Routes m = Routes { getArticle :: GetArticle m, postArticle :: PostArticle m }
The server:
server :: Routes m -> Server m server routes = "site" /. [ "get/article" /. routes.getArticle , "post/article" /. routes.postArticle ]
The client:
client :: Routes Client client = Routes{..} where (getArticle, postArticle) = toClient (Routes getArticle, postArticle)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We can generate API-types, server stub and client. From openapi schema.
By openapi input it will generate 3 packages:
The server is defined in terms of interfaces. For example:
in the API types:
The server:
The client:
The text was updated successfully, but these errors were encountered: