conjure-typescript
conjure-typescript copied to clipboard
GET query params are ordered according to the generated typescript
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.