FasterXML / jackson-module-jsonSchema

Module for generating JSON Schema (v3) definitions from POJOs
371 stars 135 forks source link

Key type of `Map` valued properties not being added to Schema #89

Open cowtowncoder opened 9 years ago

cowtowncoder commented 9 years ago

Looks like MapVisitor.java is not doing anything with key type it gets via callback:

    @Override
    public void keyFormat(JsonFormatVisitable handler, JavaType keyType)
            throws JsonMappingException {
        // JSON Schema only allows String types so let's not bother too much
    }

but it should, since there is some useful information from databinding perspective (enum, time/date types, numbers-as-Strings) and this should be available from JsonSchema object.