File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed
http-generator-nima/src/main/java/io/avaje/http/generator/helidon/nima Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ void writeHandler(boolean requestScoped) {
42
42
final var bodyType = method .bodyType ();
43
43
if (bodyType != null ) {
44
44
45
- if (bodyType . equals ( "InputStream" )) {
45
+ if ("InputStream" . equals ( bodyType )) {
46
46
writer .append (" var %s = req.content().inputStream();" , method .bodyName ()).eol ();
47
47
} else if (useJsonB ) {
48
48
final var fieldName =
@@ -118,7 +118,7 @@ void writeHandler(boolean requestScoped) {
118
118
writeContextReturn ();
119
119
if (producesJson ()) {
120
120
final var uType = UType .parse (method .returnType ());
121
- writer .append (" %sJsonType.toJson(result, res.outputStream( ));" , uType .shortName ()).eol ();
121
+ writer .append (" %sJsonType.toJson(result, JsonOutput.of(res ));" , uType .shortName ()).eol ();
122
122
} else {
123
123
writer .append (" res.send(result);" ).eol ();
124
124
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class ControllerWriter extends BaseControllerWriter {
23
23
reader .addImportType ("io.avaje.jsonb.Jsonb" );
24
24
reader .addImportType ("io.avaje.jsonb.JsonType" );
25
25
reader .addImportType ("io.avaje.jsonb.Types" );
26
+ reader .addImportType ("io.avaje.jsonb.stream.JsonOutput" );
26
27
this .jsonTypes = JsonBUtil .jsonTypes (reader );
27
28
jsonTypes .values ().stream ()
28
29
.map (UType ::importTypes )
Original file line number Diff line number Diff line change 36
36
<dependency >
37
37
<groupId >io.helidon.nima.webserver</groupId >
38
38
<artifactId >helidon-nima-webserver</artifactId >
39
- <version >4.0.0-ALPHA4 </version >
39
+ <version >4.0.0-ALPHA5 </version >
40
40
</dependency >
41
41
<dependency >
42
42
<groupId >io.helidon.nima.http.media</groupId >
43
43
<artifactId >helidon-nima-http-media-jsonb</artifactId >
44
- <version >4.0.0-ALPHA4 </version >
44
+ <version >4.0.0-ALPHA5 </version >
45
45
</dependency >
46
46
<dependency >
47
47
<groupId >io.avaje</groupId >
48
48
<artifactId >avaje-http-nima-generator</artifactId >
49
49
<version >${project.version} </version >
50
50
<scope >test</scope >
51
51
</dependency >
52
- <!-- <dependency>-->
53
- <!-- <groupId>io.helidon.nima.http2</groupId>-->
54
- <!-- <artifactId>helidon-nima-http2-webserver</artifactId>-->
55
- <!-- <version>4.0.0-SNAPSHOT</version>-->
56
- <!-- </dependency>-->
57
- <!-- <dependency>-->
58
- <!-- <groupId>io.helidon.nima.websocket</groupId>-->
59
- <!-- <artifactId>helidon-nima-websocket-webserver</artifactId>-->
60
- <!-- <version>4.0.0-SNAPSHOT</version>-->
61
- <!-- </dependency>-->
62
52
<dependency >
63
53
<groupId >io.avaje</groupId >
64
54
<artifactId >junit</artifactId >
You can’t perform that action at this time.
0 commit comments