Skip to content

Commit 341bcb7

Browse files
author
Caitlin Bales (MSFT)
authored
Update the comments for clarity
1 parent be48299 commit 341bcb7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Templates/CSharp/Model/MethodRequestBody.cs.tt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ var method = host.CurrentType.AsOdcmMethod();
77
var entityName = method.Class.Name.ToCheckedCase();
88
var requestBody = entityName + method.Name.Substring(method.Name.IndexOf('.') + 1).ToCheckedCase() + "RequestBody";
99

10-
// These types of request bodies are only used for OData actions, which when containing parameters,
11-
// will always result in POST calls. The OData spec is explicit in saying that overload methods bound
12-
// to other types are explicitly not allowed. Therefore, any overload methods found here are invalid
13-
// and violate the spec.
14-
// System.Diagnostics.Debug.Assert(!method.Overloads.Any(), "Overload actions are not allowed in OData services");
1510
// Commenting this out as 12.1.1.1, Action Overload Rules, states "Bound actions support overloading (multiple
1611
// actions having the same name within the same namespace) by binding parameter type. The combination of action
1712
// name and the binding parameter type MUST be unique within a namespace."
13+
// System.Diagnostics.Debug.Assert(!method.Overloads.Any(), "Overload actions are not allowed in OData services");
1814

1915
var attributeStringBuilder = new StringBuilder();
2016
attributeStringBuilder.Append("[JsonObject(MemberSerialization = MemberSerialization.OptIn)]");

0 commit comments

Comments
 (0)