Skip to content

expose route schemas for (test) clients #303

Open
@johnmcconnell

Description

@johnmcconnell

Currently there is an API which coerces a response to the json content. It would be useful for testing if the reverse mapping is also provided by default.

Example:

(deftext something-to-test
  (let [entity (generate schema)
          _    (db/insert! entity)
          response (app request)]
     (is (ok? response))
     (when (ok? response) (is (= (-> response (->schema-entity schema)) entity)))))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions