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

Add ability to create zen types with zen #46

Open
qdzo opened this issue Dec 13, 2022 · 0 comments
Open

Add ability to create zen types with zen #46

qdzo opened this issue Dec 13, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@qdzo
Copy link
Collaborator

qdzo commented Dec 13, 2022

I want to define DSL which contains entity definition (zen/schema) and custom metadata. And it would be nice to have some feature - that helps avoid redundancy

Example:

MyDoc
{:zen/tags #{zen/schema zen/tag}
 :type zen/map
 :keys {:a {:control input/text
                 :text "My new input"
                 :type zen/string}}}

Here I define entity and form which gather that entity, but I need to specify both :control 'input/text' and :type 'zen/string'. I want to find a way to make that input/text define type of value - zen/string - and don't need to repeat it several times.

As I know it's possible by creating new :type - but this option requires to create validation functions in clojure. and also implement every constraint for the type - which can be error prone.

It's would be very usefull to have some zen constructions to combine such aspects of data.

urgency: high

@qdzo qdzo added the enhancement New feature or request label Dec 13, 2022
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