Skip to content

Automatically push context parameters into endpoints when safe #463

Description

@frenchy64

Presents more opportunities to infer static contexts.

(context "/foo" []
  :path-params [id :- s/Str]
  (PATCH "/" []
    (ok id))
  (GET "/" []
    (ok id)))

=>

(context "/foo" []
  (PATCH "/" []
    :path-params [id :- s/Str]
    (ok id))
  (GET "/" []
    :path-params [id :- s/Str]
    (ok id)))

typed.clj.analyzer would be useful here as we both need to infer where locals occur and also do partial macroexpansion.

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