-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: Add support for OperationContextParams #800
Conversation
…t for keys() function and [*] expression.
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.
Comments to help reviewers
public func add(name: String, value: [String]?) throws { | ||
try crtContext.add(name: name, value: value) | ||
} | ||
|
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.
Add runtime method for adding string array endpoint param to endpoint request context using CRT's new binding.
if (type.equals(ParameterType.STRING)) { | ||
builder.defaultValue("\"$defaultValue\"") | ||
} else if (type.equals(ParameterType.STRING_ARRAY)) { | ||
val elementsWrappedWithEscapedQuotes = defaultValue.toString() | ||
.removeSurrounding("[", "]") | ||
.split(", ") | ||
.joinToString(", ", "[", "]") { "\"$it\"" } | ||
builder.defaultValue(elementsWrappedWithEscapedQuotes) | ||
} else { | ||
builder.defaultValue(defaultValue.toString()) | ||
} |
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.
Fix default value handling for endpoint params generator.
@@ -54,15 +54,13 @@ class JMESPathVisitor( | |||
val writer: SwiftWriter, |
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.
Changes in this file add support for wildcard flattening expression ([*]
) and the keys()
function of JMESPath language.
Companion PR
Issue #
SWIFT-1125
Description of changes
Scope
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.