-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[CosmosDB/DocumentDB] Accounts - Swagger/Validation Bug #1324
Comments
@marstr @mcardosos I'm assuming this is Swagger related, and not SDK/Generator related? |
Looking at the swagger here, it seems that it's pretty clear that the validation in the Go SDK shouldn't be requiring maxStalenessPrefix or maxIntervalInSeconds at all. edit: I need to figure out whether this is a problem with the generator, runtime, or SDK before I move the bug. I'll keep this one open for a bit longer. |
Awesome, thanks @marstr :) |
Closing in favor of the issue above |
👋
When creating a
DocumentDBCosmosDB Account with the Go SDK - themaxStalenessPrefix
andmaxIntervalInSeconds
properties are required (due to property validation) but only used when thedefaultConsistencyLevel
is set toBoundedStaleness
.This means when creating an Account with any other consistency level, for example
Eventual
, themaxIntervalInSeconds
andmaxStalenessPrefix
fields can be set but are ignored and instead return default values:Here's the create request:
Which returns a 200 OK - a GET query for the Account then returns:
Unfortunately the validation on these fields means these fields have to be specified (as such we can't just not set them and read the default value).
Would it be possible to investigate updating the validation to allow these fields to be optional?
Thanks!
The text was updated successfully, but these errors were encountered: