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

GET query params are ordered according to the generated typescript #263

Open
dfischercodethoughts opened this issue Jan 24, 2024 · 0 comments

Comments

@dfischercodethoughts
Copy link

What happens?

If I have two endpoints defined in conjure:

getEndpoint:
  https: GET /endpoint/
  args:
    firstArg:
      type: TypeThatResolvesToString
      param-type: query
  returns: ReturnType

and

getEndpoint:
  https: GET /endpoint/
  args:
    secondArg:
      type: SecondTypeThatAlsoResolvesToString
      param-type: query
    firstArg:
      type: TypeThatResolvesToString
      param-type: query
  returns: ReturnType

This breaks the typescript generated by conjure, but isn't a wire break. The typescript breaks is because in the first conjure the first argument was a string for firstArg, but in the second it corresponds to a string for secondArg. Thus after upgrading to the second type script, any users of the typescript clients would continue to send the single firstArg string into what is now the secondArg field.

What should happen?

The typescript that is generated for GET query parameters should be order agnostic.

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