spraakbanken / karp-backend

Karp backend
MIT License
3 stars 2 forks source link

type: object does not enforce additionalProperties: false #291

Open majsan opened 1 month ago

majsan commented 1 month ago

If additionalProperties: false is set, no unconfigured should be fields accepted. However, that only works on the top level, so an entry:

{ "apa": {"bepa": 1, "cepa": 2}}

is valid with config

fields:
    apa:
        type: object
        fields:
            bepa:
                type: "string"
additionalProperties: false

But Karp should not allow this.