Mixed schema validation with oneOf

Solution: js script that implements all logic and creates final schema definition.