Commit b891e86
authored
feat: Add extra handlers with builder (#51)
* docs: Design for extra (non-OpenAPI) handlers + builder
* docs: Note README updates in extra-handlers design
* feat: Add ClasspathResourceHandler for static resource serving
* feat: Add Handlers.aliveHandler and Handlers.specHandler
* refactor: Use HttpURLConnection constants in alive/spec handlers
* feat: Add OpenApiServer.Builder with extra-handler support
* fix: Use responseLength=-1 for empty-body status responses
sendResponseHeaders(code, 0) triggers chunked transfer encoding for
empty bodies; -1 is correct for status-only responses with no body.
Affects notFoundHandler and the NotFound/MethodNotAllowed/default
branches of defaultExceptionHandler.
* test: Integration coverage for extra handlers and builder
* docs: Builder and extra-handlers usage in README
* style: Apply Google Java Formatter to GetDataHandler
* refactor: Hoist builder setup out of assertThatThrownBy lambdas
SonarQube java:S5778 — each throwing lambda should contain only one
invocation that could throw a runtime exception.
* test: Direct unit tests for ClasspathResourceHandler
* build: Drop deprecated <silent> parameter from dependency-plugin
maven-dependency-plugin 3.10.0 deprecates the <silent> POM parameter
in favour of the -q CLI flag; removing it silences the build warning.
* refactor: Drop redundant eq() matchers in ClasspathResourceHandlerTest
SonarQube java:S6068 — when every verify() argument is wrapped in eq(),
pass raw values instead. The eq() import is retained for the one call
that mixes eq() with longThat(), where matchers must be used uniformly.1 parent f646566 commit b891e86
16 files changed
Lines changed: 1654 additions & 13 deletions
File tree
- docs/superpowers
- plans
- specs
- src
- main/java/com/retailsvc/http
- internal
- test
- java/com/retailsvc/http
- internal
- start
- resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
98 | 132 | | |
99 | 133 | | |
100 | 134 | | |
| |||
0 commit comments