Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
conjurernix opened this issue Jul 22, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@conjurernix
Copy link

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"}]]}
@armincerf armincerf added the enhancement New feature or request label Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants