Skip to content

Commit 241f75d

Browse files
authored
(sdks) Swift documentation updates – new enableWireTests option, fix version number (#1117)
1 parent 6ce394b commit 241f75d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

fern/products/sdks/guides/testing.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ Fern generates unit tests for all SDK languages. They verify individual methods
1919

2020
Mock server (wire) tests run your SDK against a mock server generated from your API definition. They verify that the SDK sends HTTP requests and receives HTTP responses as expected. These tests are generated for all endpoints in a service.
2121

22-
Mock server tests are available for TypeScript, Go, and Java. Configure mock server tests in your `generators.yml`:
22+
Mock server tests are available for TypeScript, Go, Java, and Swift. Configure mock server tests in your `generators.yml`:
2323

2424
| Language | Configuration | Default |
2525
|----------|---------------|---------|
2626
| TypeScript | [`generateWireTests`](/sdks/generators/typescript/configuration#generatewiretests) | true |
2727
| Go | [`enableWireTests`](/sdks/generators/go/configuration#enablewiretests) | false |
2828
| Java | [`enable-wire-tests`](/sdks/generators/java/configuration#enablewiretests) | false |
29+
| Swift | [`enableWireTests`](/sdks/generators/swift/configuration#enablewiretests) | true |
2930

3031
## Integration tests
3132

fern/products/sdks/overview/swift/configuration.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Configuration options for the Fern Swift SDK.
55

66
You can customize the behavior of the Swift SDK generator in `generators.yml`:
77

8-
```yaml {6-9} title="generators.yml"
8+
```yaml {6-10} title="generators.yml"
99
groups:
1010
swift-sdk:
1111
generators:
@@ -15,6 +15,7 @@ groups:
1515
clientClassName: YourClientName
1616
environmentEnumName: YourCustomEnvironment
1717
moduleName: MyCustomModule
18+
enableWireTests: false
1819
```
1920
2021
## SDK Configuration Options
@@ -30,3 +31,7 @@ The name of the generated environment enum. This allows you to customize the enu
3031
<ParamField path="moduleName" type="string" required={false} toc={true}>
3132
The module name used in client code (e.g., `import MyCustomModule`). When provided, this name is used consistently across the library, product, and target.
3233
</ParamField>
34+
35+
<ParamField path="enableWireTests" type="boolean" default="true" required={false} toc={true}>
36+
Generates [mock server (wire) tests](/sdks/deep-dives/testing#mock-server-tests) to verify that the SDK sends the correct HTTP requests and correctly handles responses per the API spec.
37+
</ParamField>

fern/products/sdks/overview/swift/publishing-to-swift-package-manager.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Publish your public-facing Fern Swift SDK as a Swift package distributed via Git
1818
swift-sdk:
1919
generators:
2020
- name: fernapi/fern-swift-sdk
21-
version: 1.0.0
21+
version: <Markdown src="/snippets/version-number-swift.mdx"/>
2222
github:
2323
repository: your-org/company-swift
2424
```

0 commit comments

Comments
 (0)