-
Notifications
You must be signed in to change notification settings - Fork 732
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
Should header retry-after
use type string
or integer
?
#4988
Comments
integer
?
integer
?retry-after
use type string
or integer
?
We always want the value of
So Furthermore, it is common that string and integer values are serialized in headers in the same way, so it might be possible to change the API description from
but most services will not do this so it might be fine. Bottom line: Our tooling should allow |
Schema for both autorest v2 and v3 requires header
retry-after
in examples to be typestring
instead ofint32
:autorest/schema/example-schema.json
Lines 77 to 81 in 3d50bb1
autorest/packages/libs/autorest-schemas/example-schema.json
Lines 81 to 85 in fa08f8c
This seems to align with the HTTP spec:
However, existing examples (and at least some specs) in azure-rest-api-specs use a mix of string and int32:
https://github.com/search?q=repo%3AAzure%2Fazure-rest-api-specs+retry-after+language%3AJSON&type=code&l=JSON
Should the schema be updated to allow both
string
andint32
(if possible)? Or is it by design that all examples should usestring
, so we should ensure the example generator does this?Example spec with issue:
https://github.com/Azure/azure-rest-api-specs/blob/ab064e0047ec560a700d6b501097d99471ad817b/specification/communication/data-plane/Email/preview/2023-01-15-preview/CommunicationServicesEmail.json#L136-L140
Azure/azure-rest-api-specs#29699
Teams Discussion: https://teams.microsoft.com/l/message/19:0351f5f9404446e4b4fd4eaf2c27448d@thread.skype/1720141321497?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&parentMessageId=1720141321497&teamName=Azure%20SDK&channelName=API%20Spec%20Review&createdTime=1720141321497
@timotheeguerin?
The text was updated successfully, but these errors were encountered: