-
Notifications
You must be signed in to change notification settings - Fork 863
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
Protocol tests issue 31 #3265
Protocol tests issue 31 #3265
Conversation
For real services, there are only whitespace changes. Only the test services have real changes |
xmlWriter.WriteStartElement("flattenedListWithMemberNamespace"); | ||
foreach (var publicRequestFlattenedListWithMemberNamespaceValue in publicRequestFlattenedListWithMemberNamespace) | ||
{ | ||
xmlWriter.WriteStartElement("member"); | ||
xmlWriter.WriteStartElement("member", "https://xml-member.example.com"); |
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.
Here is an example of the change that this introduces.
{ | ||
xmlWriter.WriteStartElement("entry"); | ||
xmlWriter.WriteElementString("K", kvp.Key); | ||
xmlWriter.WriteElementString("V", kvp.Value); | ||
xmlWriter.WriteElementString("K","https://the-key.example.com",kvp.Key); |
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.
another example here
{ | ||
xmlWriter.WriteStartElement("values"); | ||
{ | ||
xmlWriter.WriteStartElement("values", "http://qux.com"); |
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.
and here
/// <summary> | ||
/// Gets the map's key node's xmlnamespace. | ||
/// </summary> | ||
public string KeyShapeXmlNamespace | ||
{ | ||
/* | ||
"type": "map", | ||
"key": { | ||
"shape": "String", | ||
"locationName": "K", | ||
"xmlNamespace": "https://the-key.example.com" | ||
}, | ||
*/ | ||
get | ||
{ | ||
var keyNode = this.data[KeyKey]; | ||
if (keyNode == null || keyNode[ServiceModel.XmlNamespaceKey] == null) | ||
return ""; | ||
return (string)keyNode[ServiceModel.XmlNamespaceKey]; | ||
} | ||
} | ||
/// <summary> | ||
/// Gets the map's value node's xmlnamespace | ||
/// </summary> | ||
public string ValueShapeXmlNamespace | ||
{ | ||
get | ||
{ | ||
var valueNode = this.data[ValueKey]; | ||
if (valueNode == null || valueNode[ServiceModel.XmlNamespaceKey] == null) | ||
return ""; | ||
return (string)valueNode[ServiceModel.XmlNamespaceKey]; | ||
} | ||
} |
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.
These don't check for IsMap. Should the base methods be modified instead with specific instructions for IsMap
type shapes/members"?
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.
hmm I think that might be better actually, let me try to make that change and see if it works
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.
Spoke to Bo offline and we agreed that since this is only valid on a shape, it shouldn't be on the base class. Instead I just added a check for ISMap
Description
This PR fixes DOTNET-7357 issue 31.
Issue 31 Rest-XML Requests, not setting the xmlNamespace on individual member values
note: I commented where the real changes are for an easier review
MERGE into
protocol-tests
feature branch onlyBuilds on prior PR: #3261
Merge order: 110 (I'm going to start mine from 100 and increment to keep separate from Bo's)
Ticket: DOTNET-7357
Motivation and Context
Testing
N/A - the test cases are the protocol tests. A final dry-run will be done on the
protocol-tests
feature branch once everything is merged into the feature branch.Screenshots (if appropriate)
Types of changes
Checklist
License