sweet-tooth.endpoint.format
sweet-tooth.endpoint.format
so that it's a little easier to
understand and more amenable to extension if it ever comes to that.sweet-tooth.endpoint.utils/format-ent
, that responsibility is now
handled by sweet-tooth.endpoint.format/format-entity
sweet-tooth.endpoint.system
sweet-tooth.endpoint.system/system
:coll
and :ent
reitit router expanders to :collection
and :member
. Less ambiguous, and :member
is more meaningful,
especially when paired with :collection
.:sweet-tooth.endpoint.system/mocked-component-opts
option
for shrubbery mocks to pass through opts to the mocked componentendpoint decision maps can now be keyed by path instead of by expander type. These both work:
{:coll {:get {:handle-ok [}}}
{"/" {:get {:handle-ok [}}}
sweet-tooth.endpoint.test.harness/assert-response-contains-one-entity-like
fixed bug with multiple aritiessweet-tooth.endpoint.test.harness/assert-response-contains-entity-like
fixed bug with multiple aritiessweet-tooth.endpoint.test.harness/contains-entity?
- it
wasn't transforming the response data correctly in order to perform
the desired comparison.sweet-tooth.endpoint.test.harness/contains-entity?
. The assert
macros are generally more useful but this function still comes in
handy. Maybe show a little more restraint with the deprecation
hammer next time, Daniel.sweet-tooth.endpoint.group-routes
the module has proved unnecessarysweet-tooth.endpoint.liberator
. If those get reintroduced they can
have their own ns, as reitit doessweet-tooth.endpoint.system/init-key-alternative
multimethod,
dispatching on the
:sweet-tooth.endpoint.system/init-key-alternative
key in a
component's configuration.sweet-tooth.endpoint.system/shrubbery-mock
sweet-tooth.endpoint.mock
and
sweet-tooth.endpoint.module.mock
. These were OK but the module
approach was confusing.ent-type
argument to
sweet-tooth.endpoint.test.harness/assert-response-contains-one-entity
sweet-tooth.endpoint.test.harness/assert-response-contains-one-entity-like
a macro for nicer assertions against an API endpoint
response. Should only be used with endpoints that return a single
entity. Advantage is that it uses (is (= ...))
so you can see the
diff between expected and actual.sweet-tooth.endpoint.test.harness/assert-response-contains-entity-like
similar to above. assert that one entity among all returned
contains specified k/v pairssweet-tooth.endpoint.routes.reitit/expand-routes
added a third
argument, keywordize-ig-refs-cljs
, a boolean defaulting to true
that controls whether integrant.core.Ref
types are replaced with
the keyword they refer to in cljs compilation. Integrant refs almost
always refer to backend components, and replacing them with keywords
makes it easier to use the value returned by expaned-routes
directly in frontend code.sweet-tooth.endpoint.routes.reitit
sweet-tooth.endpoint.system/system
not uses a custom init function
that differs from ig/init
in that, when a component's config has
Replacement
record, that record's :component
key is used and the
actual init-key
method is not called for that componentsweet-tooth.endpoint.test.harness/contains-entity?
- use
sweet-tooth.endpoint.test.harness/assert-response-contains-*
macros insteadCan you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close