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
Using the TodoAPI from Todo.hs,
TodoAPI
Todo.hs
type TodoAPI = "todo" :> Get '[JSON] [Todo] :<|> "todo" :> ReqBody '[JSON] Todo :> Post '[JSON] TodoId :<|> "todo" :> Capture "id" TodoId :> Get '[JSON] Todo :<|> "todo" :> Capture "id" TodoId :> ReqBody '[JSON] Todo :> Put '[JSON] TodoId
The generated JSON paths follows the ordering of TodoAPI: GET /todo is generated before POST /todo, and /todo is generated before /todo/{id}
paths
GET /todo
POST /todo
/todo
/todo/{id}
"paths": { "/todo": { "get": { } "post": { }, } "/todo/{id}": { "get": { }, "put": { } }, },
The generated paths is ordered differently from the TodoAPI definition
"paths": { "/todo/{id}": { "get": { }, "put": { } }, "/todo": { "post": { }, "get": { } } },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using the
TodoAPI
fromTodo.hs
,Expected
The generated JSON
paths
follows the ordering ofTodoAPI
:GET /todo
is generated beforePOST /todo
, and/todo
is generated before/todo/{id}
Actual
The generated
paths
is ordered differently from theTodoAPI
definitionThe text was updated successfully, but these errors were encountered: