|
53 | 53 | import com.fasterxml.jackson.databind.module.SimpleModule; |
54 | 54 | import com.fasterxml.jackson.databind.type.SimpleType; |
55 | 55 | import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; |
56 | | -import io.jooby.Context; |
57 | | -import io.jooby.FileUpload; |
58 | | -import io.jooby.SneakyThrows; |
59 | | -import io.jooby.StatusCode; |
| 56 | +import io.jooby.*; |
60 | 57 | import io.jooby.internal.openapi.javadoc.JavaDocParser; |
61 | 58 | import io.jooby.openapi.DebugOption; |
62 | 59 | import io.swagger.v3.core.util.RefUtils; |
@@ -172,6 +169,9 @@ public Schema schema(Class type) { |
172 | 169 | if (isVoid(type.getName())) { |
173 | 170 | return null; |
174 | 171 | } |
| 172 | + if (type == Projected.class) { |
| 173 | + return new ObjectSchema().name("Projected"); |
| 174 | + } |
175 | 175 | if (type == String.class) { |
176 | 176 | return new StringSchema(); |
177 | 177 | } |
@@ -496,6 +496,13 @@ public MethodNode findMethodNode(Type type, String name) { |
496 | 496 | .orElseThrow(() -> new IllegalArgumentException("Method not found: " + type + "." + name)); |
497 | 497 | } |
498 | 498 |
|
| 499 | + public MethodNode findMethodNode(Type type, String name, String desc) { |
| 500 | + return nodes.computeIfAbsent(type, this::newClassNode).methods.stream() |
| 501 | + .filter(it -> it.name.equals(name) && it.desc.equals(desc)) |
| 502 | + .findFirst() |
| 503 | + .orElseThrow(() -> new IllegalArgumentException("Method not found: " + type + "." + name)); |
| 504 | + } |
| 505 | + |
499 | 506 | public ClassNode classNodeOrNull(Type type) { |
500 | 507 | try { |
501 | 508 | return nodes.computeIfAbsent(type, this::newClassNode); |
|
0 commit comments