Resource without return type in a REST datasource

When I try to create a resource in a REST datasource that has no return type I get an error:

image

C:\Program Files\Radzen\resources\node_modules@radzen\blazor-server\dist\templates\rest.service.cs.ejs:77
75| partial void On<%= env.pascalCase(operation.name) %>(HttpRequestMessage requestMessage);
76|

77| public async Task<<%- responseType(response.schema)%>> <%= env.pascalCase(operation.name) %>(<%- parameters.map(parameter).join(', ') %>)
78| {
79| var uri = new Uri(baseUri, $"<%= operation.path.indexOf('/') == 0 ? operation.path.slice(1) : operation.path %>");
80| <%_ if (query.length > 0) { _%>

Cannot read property 'schema' of undefined.

I believe you should have 204 No Content in this case.

I've tried the following:

image

This also produces an error:

C:\Program Files\Radzen\resources\node_modules@radzen\blazor-server\dist\templates\rest.service.cs.ejs:77
75| partial void On<%= env.pascalCase(operation.name) %>(HttpRequestMessage requestMessage);
76|

77| public async Task<<%- responseType(response.schema)%>> <%= env.pascalCase(operation.name) %>(<%- parameters.map(parameter).join(', ') %>)
78| {
79| var uri = new Uri(baseUri, $"<%= operation.path.indexOf('/') == 0 ? operation.path.slice(1) : operation.path %>");
80| <%_ if (query.length > 0) { _%>

Cannot destructure property '$ref' of 'schema' as it is undefined.

Hmm... this is definitely not right. We will do our best to include fix in our update early next week.

1 Like