context items

type CreateItem = {
  name: String,
  quantity: Int where NonNegative,
}

type ItemView = {
  id: String,
  name: String,
}

service api from http {
  on POST("/items") by v: Visitor (body: CreateItem) -> Effect[HttpResult[ItemView]] {
    Created(ItemView { id: "abc", name: body.name })
  }
}
