Skip to content

Commit c043f47

Browse files
committed
docs: update README to reflect trait-based URLRouting integration
1 parent c5b5069 commit c043f47

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,32 @@ dependencies: [
8383
]
8484
```
8585

86+
## URLRouting Integration
87+
88+
Both underlying packages support optional URLRouting integration via Swift Package Manager traits:
89+
90+
```swift
91+
// In your Package.swift
92+
dependencies: [
93+
.package(
94+
url: "https://github.com/coenttb/swift-form-coding",
95+
from: "0.1.0",
96+
traits: ["URLRouting"] // Enable URLRouting trait
97+
)
98+
]
99+
```
100+
101+
When the `URLRouting` trait is enabled:
102+
- `Form.Conversion<T>` and `Multipart.Conversion<T>` conform to `URLRouting.Conversion`
103+
- URLRouting is re-exported for convenient access
104+
- Convenience methods like `.form(_:)` and `.multipart(_:)` are available
105+
86106
## Architecture
87107

88108
This is a minimal umbrella package with no code of its own. It simply re-exports:
89-
- `URLFormCoding`
90-
- `URLFormCodingURLRouting`
91-
- `MultipartFormCoding`
92-
- `MultipartFormCodingURLRouting`
109+
- `URLFormCoding` - URL-encoded form data support
110+
- `MultipartFormCoding` - Multipart form data with file uploads
111+
- `URLRouting` - Conditionally exported when URLRouting trait is enabled
93112

94113
The underlying packages are **completely independent** - they share no dependencies and can be used separately.
95114

0 commit comments

Comments
 (0)