uk.co.mruoc.jsonapi.error.ApiSingleErrorDocument Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-json-api Show documentation
Show all versions of jackson-json-api Show documentation
Library containing jackson module and classes to help building APIs that follow the json api spec in Java
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