Skip to content

Commit 0622b20

Browse files
authored
chore: Update refs to smithy-swift GitHub and to Smithy docs (#582)
1 parent 7839138 commit 0622b20

File tree

15 files changed

+22
-22
lines changed

15 files changed

+22
-22
lines changed

Sources/ClientRuntime/Serialization/SerializationUtils/TimestampSerdeUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import func Foundation.floor
99

1010
/// Custom timestamp serialization formats
11-
/// https://awslabs.github.io/smithy/1.0/spec/core/protocol-traits.html#timestampformat-trait
11+
/// https://smithy.io/2.0/spec/protocol-traits.html#smithy-api-timestampformat-trait
1212
public enum TimestampFormat: CaseIterable {
1313
/// Also known as Unix time, the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, with optional fractional precision (for example, 1515531081.1234).
1414
case epochSeconds

Sources/ClientRuntime/Waiters/Acceptor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
extension WaiterConfiguration {
99
/// `Acceptor` is a Swift-native equivalent of Smithy acceptors:
10-
/// https://awslabs.github.io/smithy/2.0/additional-specs/waiters.html#acceptor-structure
10+
/// https://smithy.io/2.0/additional-specs/waiters.html#acceptor-structure
1111
/// An `Acceptor` defines a condition (its `matcher`) that will cause the wait operation to transition to
1212
/// a given state (its `state`).
1313
public struct Acceptor {

Sources/ClientRuntime/Waiters/WaiterScheduler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
/// Upon creation, the scheduler will allow an immediate request.
1212
/// After the first request, further requests are scheduled per the retry strategy formula
1313
/// published in the Smithy specification:
14-
/// https://awslabs.github.io/smithy/2.0/additional-specs/waiters.html#waiter-retries
14+
/// https://smithy.io/2.0/additional-specs/waiters.html#waiter-retries
1515
final class WaiterScheduler {
1616
/// The minimum delay between retries while waiting.
1717
let minDelay: TimeInterval
@@ -66,7 +66,7 @@ final class WaiterScheduler {
6666
}
6767

6868
// Calculate & set the delay using the formula in the Smithy retry strategy:
69-
// https://awslabs.github.io/smithy/2.0/additional-specs/waiters.html#waiter-retries
69+
// https://smithy.io/2.0/additional-specs/waiters.html#waiter-retries
7070
var delay: TimeInterval
7171
let attemptCeiling = Int(((log(maxDelay / minDelay) / log(2.0)) + 1.0).rounded(.towardZero))
7272
if attempts > attemptCeiling {

Sources/SmithyTestUtil/RequestTestUtil/HttpRequestTestBase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ open class HttpRequestTestBase: XCTestCase {
102102
}
103103

104104
// Per spec, host can contain a path prefix, so this function is used to get only the host
105-
// https://awslabs.github.io/smithy/1.0/spec/http-protocol-compliance-tests.html#smithy-test-httprequesttests-trait
105+
// https://smithy.io/2.0/additional-specs/http-protocol-compliance-tests.html#smithy-test-httprequesttests-trait
106106
public func hostOnlyFromHost(host: String) -> String? {
107107
guard !host.isEmpty, let hostOnly = URL(string: "http://\(host)")?.host else {
108108
return nil
@@ -216,7 +216,7 @@ open class HttpRequestTestBase: XCTestCase {
216216
assertRequiredQueryItems(expected.requiredQueryItems, actual.queryItems, file: file, line: line)
217217

218218
// assert the contents of HttpBody match, if no body was on the test, no assertions are to be made about the body
219-
// https://awslabs.github.io/smithy/1.0/spec/http-protocol-compliance-tests.html#httprequesttests
219+
// https://smithy.io/2.0/additional-specs/http-protocol-compliance-tests.html#smithy-test-httprequesttests-trait
220220
try await assertEqualHttpBody?(expected.body, actual.body)
221221
}
222222

design/DESIGN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Core Spec
44

5-
Reference the Smithy [Core Spec](https://awslabs.github.io/smithy/spec/core.html)
5+
Reference the Smithy [Core Spec](https://smithy.io/spec/core.html)
66

77
### Identifiers and Naming
88
Swift keywords can be found [here](https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html) under Keywords & Punctuation. You can use a reserved word as an identifier if you put backticks (`func`) before and after it. Keywords other than `inout`, `var`, and `let` can be used as parameter names in a function declaration or function call without being escaped with backticks.
@@ -301,7 +301,7 @@ func processDoc(source: String) -> JSONValue {
301301

302302
#### Structure
303303

304-
A [structure](https://awslabs.github.io/smithy/spec/core.html#structure) type represents a fixed set of named heterogeneous members. In Swift this can be represented
304+
A [structure](https://smithy.io/spec/core.html#structure) type represents a fixed set of named heterogeneous members. In Swift this can be represented
305305
as either a struct or a class.
306306

307307
Non boxed member values will be defaulted according to the spec: `The default value of a byte, short, integer, long, float, and double shape that is not boxed is zero`
@@ -363,7 +363,7 @@ Classes can do a few other things:
363363

364364
#### Union
365365

366-
A [union](https://awslabs.github.io/smithy/spec/core.html#union) is a fixed set of types where only one type is used at any one time. In Swift this maps well to a [enum](https://docs.swift.org/swift-book/LanguageGuide/Enumerations.html). Enums in swift are like enums on steroids, they can have associated types, raw values, and recursive enums.
366+
A [union](https://smithy.io/spec/core.html#union) is a fixed set of types where only one type is used at any one time. In Swift this maps well to a [enum](https://docs.swift.org/swift-book/LanguageGuide/Enumerations.html). Enums in swift are like enums on steroids, they can have associated types, raw values, and recursive enums.
367367

368368
Example
369369

design/rfc-00001-event-stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
This proposal covers the client interface to be generated for request and
1010
responses with event stream payloads. See the Smithy [event stream
11-
spec](https://awslabs.github.io/smithy/1.0/spec/core/stream-traits.html#event-streams).
11+
spec](https://smithy.io/2.0/spec/streaming.html#event-streams)
1212

1313
## Motivation
1414

design/rfc-00002-waiters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Introduction
88

9-
Waiters are a Smithy feature, and are defined in the Smithy specification at https://awslabs.github.io/smithy/2.0/additional-specs/waiters.html. From this spec:
9+
Waiters are a Smithy feature, and are defined in the Smithy specification at https://smithy.io/2.0/additional-specs/waiters.html. From this spec:
1010

1111
>Waiters are a client-side abstraction used to poll a resource until a desired state is reached, or until it is determined that the resource will never enter into the desired state.
1212
@@ -81,7 +81,7 @@ public struct WaiterOptions {
8181

8282
#### Retry Strategy
8383

84-
Smithy specifies an algorithm which is to be used for scheduling retries during waiting. The Smithy preferred algorithm is always used and not replaceable or customizable, other than through the `WaiterOptions` parameters. Smithy’s retry strategy is best summarized as “exponential backoff with jitter” and is defined in detail in the [Smithy docs](https://awslabs.github.io/smithy/2.0/additional-specs/waiters.html#waiter-retries).
84+
Smithy specifies an algorithm which is to be used for scheduling retries during waiting. The Smithy preferred algorithm is always used and not replaceable or customizable, other than through the `WaiterOptions` parameters. Smithy’s retry strategy is best summarized as “exponential backoff with jitter” and is defined in detail in the [Smithy docs](https://smithy.io/2.0/additional-specs/waiters.html#waiter-retries).
8585

8686
#### Return Type
8787

@@ -207,7 +207,7 @@ The `WaiterConfig` value will be code-generated to a static variable for use in
207207

208208
The ordered list of acceptors in the Smithy specification for each waiter should be code-generated into an array of `Acceptor`s and stored in the waiter config. The `Acceptor` array will provide logic used at runtime to decide whether the waiter will succeed, retry, or fail in response to an operation.
209209

210-
Acceptors may include a matching predicate defined per the [JMESPath specification](https://jmespath.org/). The [main Smithy project](https://github.com/awslabs/smithy) includes a [parser](https://github.com/awslabs/smithy/tree/main/smithy-jmespath/src/main/java/software/amazon/smithy/jmespath) that breaks JMESPath expressions into a Smithy-native AST for use in code generation. This AST, in turn, will be used to generate Swift-native code (i.e. Boolean expressions) that evaluate to the intended result of the JMESPath expression.
210+
Acceptors may include a matching predicate defined per the [JMESPath specification](https://jmespath.org/). The [main Smithy project](https://github.com/smithy-lang/smithy) includes a [parser](https://github.com/smithy-lang/smithy/tree/main/smithy-jmespath/src/main/java/software/amazon/smithy/jmespath) that breaks JMESPath expressions into a Smithy-native AST for use in code generation. This AST, in turn, will be used to generate Swift-native code (i.e. Boolean expressions) that evaluate to the intended result of the JMESPath expression.
211211

212212
### 3. Code-generate a `waitUntil...` method on the service client for each waiter (medium, ~3 days)
213213

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/PaginatorGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import software.amazon.smithy.swift.codegen.utils.toLowerCamelCase
2424

2525
/**
2626
* Generate paginators for supporting operations. See
27-
* https://awslabs.github.io/smithy/1.0/spec/core/behavior-traits.html#paginated-trait for details.
27+
* https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-paginated-trait for details.
2828
*/
2929
class PaginatorGenerator : SwiftIntegration {
3030
override fun enabledForService(model: Model, settings: SwiftSettings): Boolean =

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/SwiftDependency.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ enum class SwiftDependency(
2323
"ClientRuntime",
2424
"main",
2525
"0.1.0",
26-
"https://github.com/awslabs/smithy-swift",
26+
"https://github.com/smithy-lang/smithy-swift",
2727
Resources.computeAbsolutePath("smithy-swift", "", "SMITHY_SWIFT_CI_DIR"),
2828
"smithy-swift"
2929
),
@@ -32,7 +32,7 @@ enum class SwiftDependency(
3232
"SmithyTestUtil",
3333
"main",
3434
"0.1.0",
35-
"https://github.com/awslabs/smithy-swift",
35+
"https://github.com/smithy-lang/smithy-swift",
3636
Resources.computeAbsolutePath("smithy-swift", "", "SMITHY_SWIFT_CI_DIR"),
3737
"smithy-swift"
3838
);

smithy-swift-codegen/src/main/kotlin/software/amazon/smithy/swift/codegen/integration/EndpointTraitConstructor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class EndpointTraitConstructor(private val endpointTrait: EndpointTrait, private
1414
return endpointTrait.hostPrefix.segments.joinToString(separator = "") { segment ->
1515
if (segment.isLabel) {
1616
// hostLabel can only target string shapes
17-
// see: https://awslabs.github.io/smithy/1.0/spec/core/endpoint-traits.html#hostlabel-trait
17+
// see: https://smithy.io/2.0/spec/endpoint-traits.html#hostlabel-trait
1818
val member = inputShape.members().first { it.memberName == segment.content }
1919
"\\(input.${member.memberName.toLowerCamelCase()}!)"
2020
} else {

0 commit comments

Comments
 (0)