Require object keys to be unique also in API spec

Forgot it in bdac9becb8716e408ebb5ec024617b5627a5c4f8.