Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.
CollectionFormat with csv and multi are most commonly used cases, for csv there is no breaking. And for multi there will be a breaking and enabling the option compatibilityQueryMultiFormat: true would mitigate this breaking.
CollectionFormat with tsv is no longer supported and we are not aware of any real cases yet.
Possible values
allowReserved: true/false
value: primitive/array/object
explode: true/false
style: form/spaceDelimited/pipeDelimited
In-scoped cases
Path allowReserved
Support to define allowReserved for path parameter but the style and explode support for path parameter is not in-scope of this pr. The default for allowReserved would be
allowReserved = false
allowReserved
Supported
true
y
false
y
Query expansion
Please note the allowReserved for query paremeter is not in scope of this pr. Except the form style we would also include the spaceDelimited and pipeDelimited mainly considering backward-compatibility. The default setting would be:
style = form & explode = false
Style
Explode
Uri Template
Primitive value id = 5
Array id = [3, 4, 5]
Object id = {"role": "admin", "firstName": "Alex"}
Supported
form
false
/users{?id}
/users?id=5
/users?id=3,4,5
/users?id=role,admin,firstName,Alex
y
form*
true*
/users{?id*}
/users?id=5
/users?id=3&id=4&id=5
/users?role=admin&firstName=Alex
y
spaceDelimited
false
n/a
n/a
/users?id=3%204%205
n/a
y
pipeDelimited
false
n/a
n/a
/users?id=3\|4\|5
n/a
y
Out-of-scope cases
tsv tab separated format(no real case yet.)
Header expansion(header design is not changed and any support in header is out-of this pr's scope.)
fixes https://github.com/Azure/autorest.typescript/issues/2793 fixes https://github.com/Azure/autorest.typescript/issues/2792
Breakings
CollectionFormat with csv and multi are most commonly used cases, for
csv
there is no breaking. And formulti
there will be a breaking and enabling the optioncompatibilityQueryMultiFormat: true
would mitigate this breaking.CollectionFormat with tsv is no longer supported and we are not aware of any real cases yet.
Possible values
In-scoped cases
Path allowReserved
Support to define allowReserved for path parameter but the style and explode support for path parameter is not in-scope of this pr. The default for allowReserved would be
Query expansion
Please note the allowReserved for query paremeter is not in scope of this pr. Except the form style we would also include the spaceDelimited and pipeDelimited mainly considering backward-compatibility. The default setting would be:
/users{?id}
/users?id=5
/users?id=3,4,5
/users?id=role,admin,firstName,Alex
/users{?id*}
/users?id=5
/users?id=3&id=4&id=5
/users?role=admin&firstName=Alex
/users?id=3\|4\|5
Out-of-scope cases