Skip to content

Commit 17b0723

Browse files
committed
No effective change - tidy UType and MethodReader
1 parent 3fecb6c commit 17b0723

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

http-generator-core/src/main/java/io/avaje/http/generator/core/MethodReader.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ void read() {
211211
if (!methodRoles.isEmpty()) {
212212
ctx.platform().methodRoles(methodRoles, bean);
213213
}
214-
215214
// non-path parameters default to form or query parameters based on the
216215
// existence of @Form annotation on the method
217216
ParamType defaultParamType = (formMarker) ? ParamType.FORMPARAM : ParamType.QUERYPARAM;
@@ -290,7 +289,6 @@ public TypeMirror returnType() {
290289
}
291290

292291
public String statusCode() {
293-
294292
return producesAnnotation
295293
.map(Produces::defaultStatus)
296294
.filter(s -> s > 0)

http-generator-core/src/main/java/io/avaje/http/generator/core/UType.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,17 @@ public Set<String> importTypes() {
202202
Set<String> set = new LinkedHashSet<>();
203203
for (String type : allTypes) {
204204
if (!type.startsWith("java.lang.") && type.indexOf('.') > -1) {
205-
if (type.startsWith("java")) set.add(type.replace("[]", ""));
206-
else set.add(innerTypesImport(type).replace("[]", ""));
205+
if (type.startsWith("java")) {
206+
set.add(type.replace("[]", ""));
207+
} else {
208+
set.add(innerTypesImport(type).replace("[]", ""));
209+
}
207210
}
208211
}
209212
return set;
210213
}
211214

212215
public String innerTypesImport(String type) {
213-
214216
final var parts = type.split("\\.");
215217
var result = "";
216218
var foundUpper = false;

tests/test-javalin-jsonb/src/main/resources/public/openapi.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,37 @@
924924
"deprecated" : true
925925
}
926926
},
927+
"/openapi/put" : {
928+
"put" : {
929+
"tags" : [
930+
931+
],
932+
"summary" : "",
933+
"description" : "",
934+
"responses" : {
935+
"204" : {
936+
"description" : "",
937+
"content" : {
938+
"text/plain" : {
939+
"schema" : {
940+
"type" : "string"
941+
}
942+
}
943+
}
944+
},
945+
"203" : {
946+
"description" : "",
947+
"content" : {
948+
"text/plain" : {
949+
"schema" : {
950+
"type" : "string"
951+
}
952+
}
953+
}
954+
}
955+
}
956+
}
957+
},
927958
"/req-scoped" : {
928959
"get" : {
929960
"tags" : [

0 commit comments

Comments
 (0)