I am using http://clojure.github.io/data.json/ read-str
to read swagger (https://openapis.org/specification)
documents for semantic validation. One of the things to validate is no duplicate paths.
For example:
/foo/{bar}/baz
is a duplicate of:
/foo/{dup}/baz
However, if the swagger file contains two "literal" identical paths:
/foo/bar/baz : ...
...
/foo/bar/baz : ...
When I use read-str
, the last one "overwrites" the first one, so I can't see
the duplicate - it is just dropped.
Is there a way to use clojure.data.json
to complain on duplicate keys?
Or is there some other library I can use?