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

[Bug]: getPathParamOptions return undefined, on allowReserved=true #4132

Closed
4 tasks done
Tracked by #2665
weidongxu-microsoft opened this issue Aug 9, 2024 · 1 comment
Closed
4 tasks done
Tracked by #2665
Labels
bug Something isn't working needs-area

Comments

@weidongxu-microsoft
Copy link
Contributor

weidongxu-microsoft commented Aug 9, 2024

Describe the bug

code
image

result
image

It can be seen that HttpOperationPathParameter.allowReserved is true.

But if dev call getPathParamOptions on the HttpOperationPathParameter.param, the result is undefined.

This appears to be an inconsistency. It does not block anything. We just use HttpOperationPathParameter.allowReserved.

Reproduction

URI template operation like below

  @route("/contoso/{+group}")
  interface ServerOp {
    get(group: string): OkResponse | NoContentResponse;
  }

Checklist

@timotheeguerin
Copy link
Member

timotheeguerin commented Aug 9, 2024

This is by design this is just the decorator accessor please get the resolved op and parameters with getHttpOperation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

2 participants