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

Conjure doesn't escape argument names in TypeScript APIs #129

Open
eduardische opened this issue Feb 14, 2020 · 1 comment
Open

Conjure doesn't escape argument names in TypeScript APIs #129

eduardische opened this issue Feb 14, 2020 · 1 comment

Comments

@eduardische
Copy link

What happened?

I defined the following endpoint in Conjure:

testTypeScript:
  http: GET /test
  args:
    function:
      type: string
      param-id: Function
      param-type: header
  returns: string

The API works, but when trying to generate TypeScript for this API, it fails to compile it with the following two lines using function as parameter name at fault:

testTypeScript(function: string): Promise<string>;
...
public testTypeScript(function: string): Promise<string> {

I depend on 4.0.0:

com.palantir.conjure.typescript:conjure-typescript = 4.0.0

What did you want to happen?

Parameter name should be escaped or prefixed, since it's a reserved keyword in TypeScript.

@eduardische
Copy link
Author

Hit this issue another time on 4.1.0 with name delete now.

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