Skip to content

[Feature] Add a coerce option for endpoint parameters in openapi.edn #10

@conjurernix

Description

@conjurernix

Add a coerce option (or even more generalized transform option) in parameters passed to site endpoints so that they can be used as their proper type/shape from within the Datalog query.

For example:

{:name "sort-order"
 :in "query"
 :description "The order to sort by"
 :required false
 :default "asc"
 :schema {:type "string"}
 :coerce keyword}

so that i can then use it in my datalog query as:

{:find [(pull e [*]) name]
           :where [[e :juxt.site.alpha/type "Entity"]
                        [e :name name]]
           :order-by  [[name {:in "query" :name "sort-order"}]]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions