Hello, I find out that currently it's not supported to define a inner class
type in the REST service class as parameter. Should we allow such use case?
For example, a REST service like below will cause javassist.NotFoundException:
training.demo.provider.service.TestRestService.TestBodyParam
@RestSchema(schemaId = "testSchema")
@RequestMapping(path = "test")
public class TestRestService {
@PostMapping(path = "post")
public String post(@RequestBody TestBodyParam body) {
return null == body ? "null" : body.toString();
}
public static class TestBodyParam {
// fields omitted
}
}
But inner class field in an independent param class is OK:
@RestSchema(schemaId = "testSchema")
@RequestMapping(path = "test")
public class TestRestService {
@PostMapping(path = "post")
public String post(@RequestBody TestBodyParam body) {
return null == body ? "null" : body.toString();
}
}
// define param type in an independent class
public class TestBodyParam {
private InnerBody innerBody;
public static class InnerBody {
// fields omitted
}
// fields omitted
}
As described above, in some case, the inner class param type works well.
If you think this feature should be provided, I'll create a JIRA issue to track
it.
Yours sincerely
Yao Haishi
[email protected]