File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,16 @@ const standardMediaTypes = {
4747
4848module . exports = function ( source , options ) {
4949 const opts = Object . assign ( {
50- indent : ' '
50+ indent : ' ' ,
51+ entityClass : 'String'
5152 } , options )
5253
5354 const code = new CodeBuilder ( opts . indent )
5455
5556 code . push ( 'RestClient restClient = RestClient.create();' )
5657 . blank ( )
5758
58- code . push ( 'ResponseEntity<String > response = restClient' )
59+ code . push ( 'ResponseEntity<%s > response = restClient' , opts . entityClass )
5960
6061 if ( standardMethods . includes ( source . method . toUpperCase ( ) ) ) {
6162 code . push ( 1 , '.method(HttpMethod.%s)' , source . method . toUpperCase ( ) )
@@ -108,7 +109,7 @@ module.exports = function (source, options) {
108109 }
109110
110111 code . push ( 1 , '.retrieve()' )
111- code . push ( 1 , '.toEntity(String .class);' )
112+ code . push ( 1 , '.toEntity(%s .class);' , opts . entityClass )
112113
113114 return code . join ( )
114115}
You can’t perform that action at this time.
0 commit comments