Skip to content

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

@dfischercodethoughts

Description

@dfischercodethoughts

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions