stathissideris / spec-provider

Infer Clojure specs from sample data. Inspired by F#'s type providers.
519 stars 22 forks source link

Trust any defined specs when inferring #5

Open olivergeorge opened 7 years ago

olivergeorge commented 7 years ago

Just a thought. Relates to map-of vs keys issue.

Perhaps the spec inferring process could be passed a set of known specs (spec registry) and work on a "validate if present, fill in the blanks if not" manner.

Benefits here would be:

stathissideris commented 7 years ago

That's an interesting thought, I hadn't considered using the existing specs to help with inference and taking them into account. It's probably in the "advanced" category of features for now (more basic stuff is higher priority), but definitely worth taking into account.

frenchy64 commented 7 years ago

This paper might bring some inspiration.