Skip to content

Not able to parse controller endpoint with Route Attribute #19

@joachim-heck

Description

@joachim-heck

Seems like the generator actually isn't able to handle the Route-Attribute properly e.g.

[HttpGet, Route("strings/{mystring}/test")]
public string[] GetStrings(string mystring)
{
      return new List<string>().ToArray();
}

will be generated to:

    public getStrings(mystring: string, httpOptions: {} = undefined): Observable<String[]> {
        let subject = new Subject<String[]>();
        this.http.get<String[]>(this.serviceUrl + "/api/v1/test?mystring=" + this.convertAny(mystring), httpOptions).subscribe((result) => {
            subject.next(result);
            subject.complete();
        }, (error) => subject.error(error));
        return subject;
    }

where mystring suddently becomes a parameter instead beeing part of the route.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestnext releaseTry to add this issue to next release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions