oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
525 stars 42 forks source link

Add support for string format "date-time" leaf schema #149

Closed RickMoynihan closed 11 months ago

RickMoynihan commented 2 years ago

The date-time string format is a common data type in openapi/swagger specs and has existing generator support in schema-generators and schema.core via the s/Inst schema. Consequently it should be as simple to add, as the number leaf schema was.

RickMoynihan commented 2 years ago

Specified here: https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#section-7.3.1

oliyh commented 2 years ago

Thanks, you made me realise that we didn't check if support for number generation was required in martian-test as part of that change.

RickMoynihan commented 2 years ago

Yeah I actually checked if numbers generate and they do; though not sure if there's a test case for it explicitly in martian.test.