Skip to content

Commit

Permalink
add extension for schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
macielti committed Jul 25, 2024
1 parent fed0632 commit 6553da3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ of [keepachangelog.com](http://keepachangelog.com/).

## [Unreleased]

## [25.52.52] - 2024-07-25

## Added

- Add `LocalDateWire` schema extension.

## [25.52.51] - 2024-07-25

## Added
Expand Down Expand Up @@ -695,7 +701,9 @@ of [keepachangelog.com](http://keepachangelog.com/).

- Add `loose-schema` function.

[Unreleased]: https://github.com/macielti/common-clj/compare/v25.52.51...HEAD
[Unreleased]: https://github.com/macielti/common-clj/compare/v25.52.52...HEAD

[25.52.52]: https://github.com/macielti/common-clj/compare/v25.52.51...v25.52.52

[25.52.51]: https://github.com/macielti/common-clj/compare/v25.52.50...v25.52.51

Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject net.clojars.macielti/common-clj "25.52.51"
(defproject net.clojars.macielti/common-clj "25.52.52"
:description "Just common Clojure code that I use across projects"
:url "https://github.com/macielti/common-clj"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
Expand Down
6 changes: 6 additions & 0 deletions src/common_clj/schema/extensions.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(ns common-clj.schema.extensions
(:require [schema.core :as s]))

(s/defschema LocalDateWire
"Example: '2024-09-07'"
(s/constrained s/Str #(re-matches #"^\d{4}-\d{2}-\d{2}T\d{2}$" %)))

0 comments on commit 6553da3

Please sign in to comment.