-
Notifications
You must be signed in to change notification settings - Fork 313
feat: dab init defaults runtime.rest.request-body-strict to false #3166
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,8 @@ namespace Azure.DataApiBuilder.Config.ObjectModel; | |
| /// <param name="Path">The URL prefix path at which endpoints | ||
| /// for all entities will be exposed.</param> | ||
| /// <param name="RequestBodyStrict">Boolean property indicating whether extraneous fields are allowed in request body. | ||
| /// The default value is true - meaning we don't allow extraneous fields by default in the rest request body. | ||
| /// Changing the default value is a breaking change.</param> | ||
| /// The default value for existing configs (without this property set) is true - meaning we don't allow extraneous fields by default. | ||
| /// When dab init generates a new config, the default is false - allowing extraneous fields by default for a smoother development experience.</param> | ||
|
Comment on lines
12
to
+14
|
||
| public record RestRuntimeOptions(bool Enabled = true, string Path = RestRuntimeOptions.DEFAULT_PATH, bool RequestBodyStrict = true) | ||
| { | ||
| public const string DEFAULT_PATH = "/api"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CLI help text for
--rest.request-body-strictis misleading given the option name/behavior: whenrequest-body-strictistrue, DAB rejects unexpected/extraneous fields (strict mode), and whenfalseit allows them. Consider updating theHelpText(and the preceding comment) to explicitly describe the true/false semantics so users don’t interpret it as "allow" when set to true.