+1 but if too complex, can IMPL it in weak type engine.
yhs0092 <[email protected]> 于2019年1月25日周五 上午9:55写道: > 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] > >
