Closed
Description
Hey Kai, seems like I discovered bit of an edge case bug in the ApiController service generator ;-D
It only happens when I'm trying to put a parameter on every endpoint route for a specific controller.... If I move the parameter to every endpoint route, the generator builds the correct routes.
[Route("api/devices/{deviceUid}")]
[GenerateAngularService(Generator.GeneratorServiceOutputPath, Generator.GeneratorModelPath, "{0}ApiService")]
[GenerateIgnoreGeneric(typeof(Response<>))]
public class DeviceController : ControllerBase
....
Any endpoint on this controller will be generated to something like:
this.http.get<boolean>(this.serviceUrl + "/api/devices/{deviceUid}/data" + "?deviceUid=" + this.convertAny(deviceUid), httpOptions).subscribe((result) => {...
which correctly should be:
this.http.get<boolean>(this.serviceUrl + "/api/devices/" + deviceUid + "/data", httpOptions).subscribe((result) => {
without the additional {deviceUid}