context items

type ItemId = opaque String

type UpdateItem = {
  name: String,
}

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

service api from http {
  on PUT("/items/:id") by v: Visitor (id: ItemId, body: UpdateItem)
      -> Effect[HttpResult[ItemView]] {
    Ok(ItemView { id: id.raw, name: body.name })
  }
}
