You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some swagger will have "x-ms-format": "duration-constant" on their model property for example. We may need a new scalar for it. What's more, TCGC needs to pass this value to emitter.
BTW I have some trial just FYI
1.
model Test {
@format("duration-constant")
input: duration;
}
This gives error Cannot apply @format decorator to type it is not a string
model Test {
@format("duration-constant")
input: string;
}
This gives warning 'string' format 'duration-constant' is not supported in Autorest. It will not be emitted. The emitted swagger does not emit this either.
More information added: For swagger input, it must be "x-ms-format": "duration-constant" for the generated swagger, otherwise this error:
fatal | System.InvalidOperationException: The MaximumDuration property of VirtualMachineInstallPatchesParameters ends with "Duration" but does not use the duration format to be generated
as TimeSpan type. Add "format": "duration" with directive in autorest.md for the property if it's ISO 8601 format like P1DT2H59M59S. Add "x-ms-format": "duration-constant" if it's the con
stant format like 1.2:59:59.5000000. If the property does not conform to a TimeSpan format, please use "x-ms-client-name" to rename the property for the client.
The text was updated successfully, but these errors were encountered:
Some swagger will have
"x-ms-format": "duration-constant"
on their model property for example. We may need a new scalar for it. What's more, TCGC needs to pass this value to emitter.BTW I have some trial just FYI
1.
This gives error
Cannot apply @format decorator to type it is not a string
This gives warning
'string' format 'duration-constant' is not supported in Autorest. It will not be emitted
. The emitted swagger does not emit this either.More information added: For swagger input, it must be
"x-ms-format": "duration-constant"
for the generated swagger, otherwise this error:The text was updated successfully, but these errors were encountered: