Skip to content

Commit 709e321

Browse files
committed
update docs
1 parent 33f793b commit 709e321

6 files changed

Lines changed: 807 additions & 98 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
(jersey api is still available). The request builder unifies all possible configurations in one place.
2424
- New common base client class TestClient
2525
- ClientSupport is a TestClient, but also could provide 3 special clients: appClient(), adminClient(), restClient()
26-
(restClient() is the same as StubRest client)
26+
(restClient() is the same as rest stubs RestClient)
2727
- New sub clients could be created by applying additional path segments:
2828
client.subClient("/sub/path/)
29-
- External api client could be created with support.externalClient("som external url")
29+
- External api client could be created with support.externalClient("http://external.com/")
3030
- New client rest api based on real method calls: restClient(RestClass.class).method(mock -> mock.restMethod(args)).invoke()
3131
(target path and method type resolved from annotations, arguments used for request configuration)
3232
- Helper api for testing multipart requests: restClient(..).multipartMethod(..)
@@ -45,7 +45,7 @@
4545
- (BREAKING) StubRest default status declaration removed as not useful
4646
(required status could be declared now with the new request builder)
4747
* Add test web client field injection:
48-
- @WebClient for ClientSupport, @WebClient(APP), @WebClient(ADMIN), @WebClient(REST) for specific clients
48+
- @WebClient for ClientSupport, @WebClient(App), @WebClient(Admin), @WebClient(Rest) for specific clients
4949
- @WebResourceClient for resource client direct mapping (works for integration and stub rest tests)
5050
* Add guicey event ApplicationStartingEvent thrown just before managed and web services startup
5151
* Fix stubs rest too early startup, causing problems with jersey registrations in application run method

dropwizard-guicey/src/doc/docs/about/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Dropwizard | Guicey
44
----------|---------
5+
5.0.0 | [8.0.0](http://xvik.github.io/dropwizard-guicey/8.0.0)
56
4.0.0 | [7.2.2](http://xvik.github.io/dropwizard-guicey/7.2.2)
67
3.0.0 | [6.3.2](http://xvik.github.io/dropwizard-guicey/6.3.2)
78
2.1.0 | [5.10.2](http://xvik.github.io/dropwizard-guicey/5.10.2)

dropwizard-guicey/src/doc/docs/about/history.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,54 @@
1-
* Update to dropwizard 5.0.0 (requires java 17)
2-
* [admin-rest]
3-
- Add identifyAdminContextInRequestLogs bundle option to highlight admin requests in logs
1+
* Update to dropwizard 5 (requires java 17)
2+
* Use guice version without bundled asm ('classes' classifier)
3+
* Support field injections in application (to use injected services in run method)
4+
* Customizable DefaultTestClientFactory: it is now possible to use default implementation
5+
with customizations (override `configure` method)
6+
- Add ApacheTestClientFactory: useful to support PATCH methods on jdk > 16
7+
- Add `apacheClient` (shortcut) configuration into `@TestGuiceyApp` and `@TestDropwizardApp`
8+
to simplify usage of ApacheTestClientFactory with annotations
9+
- Add `apacheClient()` (shortcut) method into extension and generic builders
10+
* Shared state:
11+
- State objects, implementing AutoClosable, now would be closed on application shutdown
12+
- Add SharedConfigurationState.lookupOrCreate method to simplify static state usage
13+
* Add a utility to simplify building application urls: AppUrlBuilder
14+
- Automatically resolve context server port and mapped paths (previously only available in
15+
tests with ClientSupport class)
16+
- Could build rest url directly from rest classes and methods
17+
- Special api for building from direct rest method calls (method arguments
18+
automatically mapped into url path and query params in this case)
19+
- General utility for resource methods analysis: ResourceAnalyzer (could be used in
20+
various api, based on resource (stub) call)
21+
* Unify ClientSupport and StubRest client APIs
22+
- New api is a wrapper above jersey client api to simplify test-specific configuration and validation
23+
(jersey api is still available). The request builder unifies all possible configurations in one place.
24+
- New common base client class TestClient
25+
- ClientSupport is a TestClient, but also could provide 3 special clients: appClient(), adminClient(), restClient()
26+
(restClient() is the same as rest stubs RestClient)
27+
- New sub clients could be created by applying additional path segments:
28+
client.subClient("/sub/path/)
29+
- External api client could be created with support.externalClient("http://external.com/")
30+
- New client rest api based on real method calls: restClient(RestClass.class).method(mock -> mock.restMethod(args)).invoke()
31+
(target path and method type resolved from annotations, arguments used for request configuration)
32+
- Helper api for testing multipart requests: restClient(..).multipartMethod(..)
33+
(simplifies multipart method arguments creation)
34+
- Defaults mechanism: it is possible to declare default headers, cookies, etc.
35+
on the client to be applied for all requests (evolution of StubRest client ideas)
36+
- Add PATCH method shortcuts
37+
- Add builder-style response assertions like: client.do_request.assertHeader("Name", val)
38+
This allows checking response headers, cookies, status code, etc. in a chained calls style without additional variables
39+
- Add connector switching api to ClientSupport: apacheClient(), urlconnectorClient()
40+
This allows using different connectors within one test
41+
(note that apache connector is required for PATCH calls and urlconnector better handles multipart requests)
42+
- Client logging now logs multipart requests (now PAYLOAD_ANY, before it was PAYLOAD_TEXT)
43+
- (BREAKING) previous target(String... path) methods replaced with string format: target(String, Object...args)
44+
- (BREAKING) deprecated targetMain(): replaced with targetApp()
45+
- (BREAKING) StubRest default status declaration removed as not useful
46+
(required status could be declared now with the new request builder)
47+
* Add test web client field injection:
48+
- @WebClient for ClientSupport, @WebClient(App), @WebClient(Admin), @WebClient(Rest) for specific clients
49+
- @WebResourceClient for resource client direct mapping (works for integration and stub rest tests)
50+
* Add guicey event ApplicationStartingEvent thrown just before managed and web services startup
51+
* Fix stubs rest too early startup, causing problems with jersey registrations in application run method
452

553
### [7.2.1](http://xvik.github.io/dropwizard-guicey/7.2.1) (2025-05-12)
654
* Fix NoClassDefFoundError on guicey startup due to junit classes leak into core (#428)

dropwizard-guicey/src/doc/docs/about/migration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Migration guide
22

3+
## Dropwizard 5.0
4+
5+
* [dropwizard upgrade instructions](https://www.dropwizard.io/en/stable/manual/upgrade-notes/upgrade-notes-5_0_x.html)
6+
7+
Java 17 required.
8+
39
## Dropwizard 4.0
410

511
Migration to jakarta namespace (`jakarta.inject`, `jakarta.servlet`, `jakarta.persistence` instead of `javax.*`).

0 commit comments

Comments
 (0)