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

com.relogiclabs.json.schema.message.ErrorDetail Maven / Gradle / Ivy

Go to download

The New JSON Schema prioritizes simplicity, conciseness, and readability, making it user-friendly and accessible without the need for extensive prior knowledge. It offers efficient read-write facilities, precise JSON document definition through various data types and functions, and extensibility to meet modern web service diverse requirements.

There is a newer version: 1.12.1
Show newest version
package com.relogiclabs.json.schema.message;

import lombok.Getter;

import static com.relogiclabs.json.schema.internal.util.StringHelper.concat;
import static org.apache.commons.lang3.StringUtils.capitalize;

@Getter
public final class ErrorDetail {
    private final String code;
    private final String message;

    public ErrorDetail(String code, String message) {
        this.code = code;
        this.message = capitalize(message);
    }

    public ErrorDetail(String code, Object m1, Object m2) {
        this(code, concat(m1, m2));
    }

    public ErrorDetail(String code, Object m1, Object m2, Object m3) {
        this(code, concat(m1, m2, m3));
    }

    public ErrorDetail(String code, Object m1, Object m2, Object m3, Object m4) {
        this(code, concat(m1, m2, m3, m4));
    }

    public ErrorDetail(String code, Object m1, Object m2, Object m3, Object m4, Object m5) {
        this(code, concat(m1, m2, m3, m4, m5));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy