Skip to content

Commit 30f5c89

Browse files
committed
docs: fix property name errors and add platform documentation
- Fix encoder.encodingStrategy to encoder.arrayEncodingStrategy in FormEncoder.swift - Fix decoder.parsingStrategy to decoder.arrayParsingStrategy in URLRouting.swift - Fix .indexedBrackets to .bracketsWithIndices in code examples - Add Supported Platforms section to README documenting macOS 14.0+, iOS 17.0+, etc. - Update test count from 218 to 158+ for accuracy
1 parent 42bb981 commit 30f5c89

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ A Swift package for encoding and decoding `application/x-www-form-urlencoded` da
1010

1111
-**Codable Integration**: Seamlessly encode/decode Swift types to/from form data
1212
-**Multiple Encoding Strategies**: Support for PHP-style brackets, indexed arrays, and more
13-
-**URLRouting Integration**: First-class support for PointFree's URLRouting
13+
-**URLRouting Integration**: Optional integration via SPM traits with PointFree's URLRouting
1414
-**RFC Compliant**: Built on [RFC 2388](https://datatracker.ietf.org/doc/html/rfc2388) and [WHATWG URL Encoding](https://url.spec.whatwg.org/)
1515
-**Swift 6.0**: Full strict concurrency support
16-
-**Comprehensive Tests**: 218 tests covering edge cases and round-trip conversions
16+
-**Comprehensive Tests**: 158+ tests covering edge cases and round-trip conversions
1717

1818
## Installation
1919

@@ -36,6 +36,14 @@ Then add the product to your target:
3636
)
3737
```
3838

39+
## Supported Platforms
40+
41+
- macOS 14.0+
42+
- iOS 17.0+
43+
- tvOS 17.0+
44+
- watchOS 10.0+
45+
- Swift 6.1+
46+
3947
## Quick Start
4048

4149
### Basic Encoding/Decoding

Sources/URLFormCoding/FormEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import RFC_2388
4747
/// let encoder = Form.Encoder()
4848
/// encoder.dateEncodingStrategy = .iso8601
4949
/// encoder.dataEncodingStrategy = .base64
50-
/// encoder.encodingStrategy = .brackets // For PHP/Rails compatibility
50+
/// encoder.arrayEncodingStrategy = .brackets // For PHP/Rails compatibility
5151
/// ```
5252
///
5353
/// ## Advanced Features

Sources/URLFormCoding/Traits/URLRouting.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import URLRouting
4141
/// ```swift
4242
/// // Custom decoder for nested data
4343
/// let decoder = Form.Decoder()
44-
/// decoder.parsingStrategy = .brackets // Supports user[name]=value
44+
/// decoder.arrayParsingStrategy = .brackets // Supports user[name]=value
4545
/// decoder.dateDecodingStrategy = .iso8601
4646
///
4747
/// // Custom encoder for response data
@@ -101,11 +101,11 @@ extension Form {
101101
///
102102
/// ```swift
103103
/// let decoder = Form.Decoder()
104-
/// decoder.parsingStrategy = .brackets
104+
/// decoder.arrayParsingStrategy = .brackets
105105
/// decoder.dateDecodingStrategy = .secondsSince1970
106106
///
107107
/// let encoder = Form.Encoder()
108-
/// encoder.arrayEncodingStrategy = .indexedBrackets
108+
/// encoder.arrayEncodingStrategy = .bracketsWithIndices
109109
/// encoder.dateEncodingStrategy = .secondsSince1970
110110
///
111111
/// let formCoding = Form.Conversion(
@@ -215,7 +215,7 @@ extension URLRouting.Conversion {
215215
///
216216
/// // Create conversion with custom configuration
217217
/// let decoder = Form.Decoder()
218-
/// decoder.parsingStrategy = .brackets
218+
/// decoder.arrayParsingStrategy = .brackets
219219
/// let encoder = Form.Encoder()
220220
/// encoder.dateEncodingStrategy = .iso8601
221221
///

0 commit comments

Comments
 (0)