Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong method signature generated when using nullable enum as parameter type #23

Open
querbyte opened this issue Jan 9, 2018 · 0 comments

Comments

@querbyte
Copy link

querbyte commented Jan 9, 2018

Example:

[CreateAngular2TsProxy(ReturnType = typeof(List<Foo>))]
public ActionResult Get(int id, MyEnum enumValue)
{
	//...
}

generates

public get(id: number, enumValue: MyEnum) : Observable<Foo[]> { 
	return this.http.post('api/Foo/Get'+ '?id='+id,enumValue) as Observable<Foo[]>;
}

The generated method does not work as expected and handle the enum value as a complex type and send the value in the body of the post request. So on the server side you never receive a valid value for the enum, it is always null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant