Skip to content

:coercion on context doesn't effect subroutes #210

@ikitommi

Description

@ikitommi

Would expect that :coercion attached to a context would effect both the context and all the subroutes. But it only effects the direct route it's attached. Same for the pre-1.0.0 & 1.0.0-SNAPSHOT.

Doesn't disable coercion for GET

(defapi app
  (swagger-ui)
  (swagger-docs)
  (context* "/api" []
    :coercion (constantly nil)
    (GET "/number" []
      :query-params [number :- Long]
      (ok {:number number}))))

Disables coercion for GET (as expected)

(defapi app
  (swagger-ui)
  (swagger-docs)
  (context* "/api" []
    (GET "/number" []
      :coercion (constantly nil)
      :query-params [number :- Long]
      (ok {:number number}))))

Should be documented or fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions