Skip to content

Commit c1e3f1a

Browse files
author
Carmine DiMascio
committed
explore generics
1 parent 1f3f551 commit c1e3f1a

File tree

11 files changed

+241
-128
lines changed

11 files changed

+241
-128
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Customizable errors for RESTful and HTTP services.
88
<img src="https://raw.githubusercontent.com/cdimascio/japi-errors/master/assets/japi-errors.png" width="600">
99
</p>
1010

11-
All errors are Jackson ready and can be serialized as *JSON*, *XML*, and *YAML*.
12-
1311
Out of the box, **japi-errors** provides [two error formats](#configure) or enables you to [provide](#customize) your own.
1412

13+
All 'out of the box' errors are Jackson ready and can be serialized as *JSON*, *XML*, and *YAML*. If you'd like to use GSON or something else, [create a custom error creator](#customize).
14+
1515
## Install
1616

1717
Gradle
@@ -52,6 +52,8 @@ Assign
5252
AbstractApiError error = unauthorized();
5353
```
5454

55+
See [examples](#examples) with Spring MVC
56+
5557
## Configure
5658

5759
japi-errors supports two error formats "out of the box". They are enabled as follows:
@@ -125,5 +127,11 @@ public class MyApiError extends ApiError {
125127
}
126128
```
127129

130+
## Examples
131+
132+
Check out the following examples to see **japi-errors** in use:
133+
134+
- with [Spring MVC](https://github.com/cdimascio/kotlin-spring-mvc-template/blob/master/src/main/kotlin/api/users/UsersController.kt#L38)
135+
128136
## License
129137
[Apache 2](LICENSE)

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<main.class>io.github.cdimascio.japierrors.ApiErrors</main.class>
5555
<junit.version>4.12</junit.version>
5656
<jackson.version>2.9.7</jackson.version>
57+
<unirest.version>1.4.9</unirest.version>
5758
<junit.jupiter.version>5.3.1</junit.jupiter.version>
5859
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5960

@@ -88,6 +89,13 @@
8889
<scope>test</scope>
8990
</dependency>
9091

92+
<dependency>
93+
<groupId>com.mashape.unirest</groupId>
94+
<artifactId>unirest-java</artifactId>
95+
<version>${unirest.version}</version>
96+
<scope>test</scope>
97+
</dependency>
98+
9199
<dependency>
92100
<groupId>org.junit.jupiter</groupId>
93101
<artifactId>junit-jupiter-api</artifactId>
@@ -202,6 +210,10 @@
202210
<configuration>
203211
<source>8</source>
204212
<target>8</target>
213+
<compilerArgs>
214+
<arg>-verbose</arg>
215+
<arg>-Xlint:unchecked</arg>
216+
</compilerArgs>
205217
</configuration>
206218
</plugin>
207219
</plugins>

0 commit comments

Comments
 (0)