overhauled API:

- wrote openapi schema
- re-implemented api endpoint following openapi schema
- intensified and improved working with Result objects

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-12-31 00:02:14 +01:00
parent 10ad309d8c
commit 4822320961
28 changed files with 874 additions and 542 deletions
@@ -0,0 +1,22 @@
/* © SRSoftware 2024 */
package de.srsoftware.cal.db;
import de.srsoftware.tools.Error;
import java.util.Collection;
import java.util.Map;
public class NotFound<None> extends Error<None> {
public NotFound(String message, Map<String, Object> data, Collection<Exception> exceptions) {
super(message, data, exceptions);
}
public static <T> NotFound<T> of(String message, Object... fills) {
return new NotFound<>(message.formatted(fills), null, null);
}
@Override
public <NewType> NotFound<NewType> transform() {
return new NotFound<>(message(), data(), exceptions());
}
}