All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yahoo.elide.modelconfig.ValidationMessages Maven / Gradle / Ivy

There is a newer version: 7.1.2
Show newest version
/*
 * Copyright 2023, the original author or authors.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */
package com.yahoo.elide.modelconfig;

import com.networknt.schema.ValidationMessage;

import java.util.List;
import java.util.Set;

public class ValidationMessages {
    private static final String NEWLINE = System.lineSeparator();

    public static String toString(Set results) {
        if (results == null || results.isEmpty()) {
            return null;
        }
        List list = results.stream().map(message -> message.getMessage()).toList();
        return NEWLINE + String.join(NEWLINE, list);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy