File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
http-generator-nima/src/main/java/io/avaje/http/generator/helidon/nima
tests/test-nima-jsonb/src/main/java/org/example Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ public void writeJsonBTypeFields() {
141141 param ->
142142 writer
143143 .append (
144- " private final JsonType<%s> %sMethodBodyJsonType ;" ,
144+ " private final JsonType<%s> %sBodyJsonType ;" ,
145145 param .getUType ().full (), methodReader .simpleName ())
146146 .eol ());
147147 }
Original file line number Diff line number Diff line change 22
33import io .avaje .http .api .Controller ;
44import io .avaje .http .api .Get ;
5+ import io .avaje .http .api .Post ;
6+ import io .avaje .http .api .Produces ;
57
68@ Controller
79public class HelloController {
810
11+ @ Produces ("image/png" )
12+ @ Get ("/get" )
13+ byte [] testBytes () {
14+
15+ return "not really an image but ok" .getBytes ();
16+ }
17+
918 @ Get ("hello" )
1019 String helloWorld () {
1120 return "Hello world" ;
1221 }
1322
1423 @ Get ("person/{name}/{sortBy}" )
1524 Person person (String name , String sortBy ) {
16- var p = new Person ();
25+ final var p = new Person ();
1726 p .setId (42 );
1827 p .setName (name + " hello" + " sortBy:" + sortBy );
1928 return p ;
2029 }
30+
31+ @ Post ("person/update" )
32+ String add (Person newGuy ) {
33+
34+ return "New Guy Added" ;
35+ }
2136}
You can’t perform that action at this time.
0 commit comments