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

uk.co.mruoc.jsonapi.error.ApiSingleErrorDocument Maven / Gradle / Ivy

Go to download

Library containing jackson module and classes to help building APIs that follow the json api spec in Java

There is a newer version: 2.0.16
Show newest version
package uk.co.mruoc.jsonapi.error;

import java.util.Collection;
import java.util.Collections;

public class ApiSingleErrorDocument implements ApiErrorDocument {

    private final ApiError error;

    public ApiSingleErrorDocument(final ApiError error) {
        this.error = error;
    }

    @Override
    public Collection getErrors() {
        return Collections.singleton(error);
    }

    @Override
    public String getStatus() {
        return error.getStatus();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy