metosin / metosin/spec-tools

Extract reified clojure.spec Specs as Records

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Clojure
Stars
606
Forks
90
PR merge metrics
No merged PRs in 30d

Description

if (st/spec (s/keys :req [::id ::name]) would return a spec-tools.core/KeysSpec instead of spec-tools.core/Spec, we could add custom protocols ourselves, like Coercion and JSONSchema. Coercion would allow selective conforming without the dynamic vars. Nice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the st/spec behavior for (s/keys :req [::id ::name]) and the existing spec-tools.core/Spec and KeysSpec abstractions. Determine whether reified records and custom Coercion and JSONSchema protocols are feasible, then define the expected returned type and selective-conforming behavior before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.