Project: talendesb
Issue TESB-5012: Regression in tRESTRequest code generation
tRESTRequest is now showing both 'body' of type 'Document' and 'string' of type String by default in a schema for all the mappings. In earlier versions, none of it was generated for GET. Obviously having the 'body' does not make sense for GET. Here is the generated code signature for GET:	@javax.ws.rs.GET()	@javax.ws.rs.Path("/")	public javax.ws.rs.core.Response echo(	@javax.ws.rs.DefaultValue("") @javax.ws.rs.PathParam("string") String string	) This String 'string' parameter is not required. for other methods it does not make sense to have both 'body' and 'string', here is the generated signature for POST: @javax.ws.rs.POST()	@javax.ws.rs.Path("/")	public javax.ws.rs.core.Response test(	@javax.ws.rs.DefaultValue("") @javax.ws.rs.PathParam("string") String string	, org.dom4j.Document body	) here this 'string' is not required either. This is all the side-effect of having 'String' parameter added by default to the schema of an individual mapping. I wonder if the idea was to capture either the input to either Document or String: this can not work with the above signature. The request body, if any, can only be converted to Document. Summary: 1. The schema for GET (&DELETE) mappings must be empty by default: no 'body' can be supported for GET (&DELETE) requests while 'string' parameter is not required and can only confuse the users 2. The schema for POST/PUT - 'string' parameter needs to be dropped - if possible: make 'body' read only
Story points: 1