8 Commits

Author SHA1 Message Date
Rick Newton-Rogers 915aeff168 Enable MemberImportVisibility check on all targets (#43)
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.
2024-12-11 15:32:13 +00:00
PARAIPAN SORIN e48b152d18 Disable "respectsExistingLineBreaks" in .swift-format for more consistent styling (#23)
### Motivation

- Relates to
[#230](https://github.com/apple/swift-openapi-generator/issues/230)

### Modifications

- Disable respectsExistingLineBreaks .swift-format rule and address
changes requested

### Result

- One of the .swift-format rules will be disabled

### Test Plan

- Run Tests
2023-11-01 17:49:29 +01:00
Honza Dvorsky 2e72905ccc Bump swift-format to 5.9 (#20)
Bump swift-format to 5.9

### Motivation

As per https://github.com/apple/swift-openapi-generator/issues/175.

### Modifications

Bump swift-format, update to make soundness pass.

### Result

Using swift-format 5.9.

### Test Plan

Soundness passed.


Reviewed by: dnadoba

Builds:
     ✔︎ pull request validation (5.10) - Build finished. 
     ✔︎ pull request validation (5.8) - Build finished. 
     ✔︎ pull request validation (5.9) - Build finished. 
     ✔︎ pull request validation (nightly) - Build finished. 
     ✔︎ pull request validation (soundness) - Build finished. 

https://github.com/swift-server/swift-openapi-async-http-client/pull/20
2023-10-24 08:50:44 +02:00
Honza Dvorsky 0a0c648c90 [AHC Transport] Async bodies + swift-http-types adoption (#16)
[AHC Transport] Async bodies + swift-http-types adoption

### Motivation

AHC transport changes of the approved proposals apple/swift-openapi-generator#255 and apple/swift-openapi-generator#254.

### Modifications

- Adapts to the runtime changes, depends on HTTPTypes now.
- Both request and response streaming works.

### Result

Transport works with the 0.3.0 runtime API of.

### Test Plan

Adapted tests.


Reviewed by: dnadoba, simonjbeaumont

Builds:
     ✔︎ pull request validation (5.8) - Build finished. 
     ✔︎ pull request validation (5.9) - Build finished. 
     ✔︎ pull request validation (nightly) - Build finished. 
     ✔︎ pull request validation (soundness) - Build finished. 

https://github.com/swift-server/swift-openapi-async-http-client/pull/16
2023-09-27 17:58:10 +02:00
Honza Dvorsky f228a33bdf Adopt a custom shared client (#18)
### Motivation

We previously defaulted the HTTPClient to .init(), but that's not
correct as it was never getting shut down.

### Modifications

Instead of creating a new client, just introduce our own shared one and
use that as the default value.

Once AHC provides a shared client, we can default to that in the
configuration initializer.

### Result

No more crashing clients on dealloc.

### Test Plan

All tests pass.

---------

Co-authored-by: David Nadoba <dnadoba@gmail.com>
2023-09-18 15:38:11 +02:00
Honza Dvorsky 7e40bff52d Fix double encoding of path parameters (#15)
Fix double encoding of path parameters

### Motivation

Fixes https://github.com/apple/swift-openapi-generator/issues/251.

### Modifications

Use the already escaped path setter on `URLComponents` to avoid the second encoding pass.

### Result

Path parameters that needed escaping are only escaped once, not twice.

### Test Plan

Adapted the existing unit test to cover a path item that needs escaping.


Reviewed by: simonjbeaumont

Builds:
     ✔︎ pull request validation (5.8) - Build finished. 
     ✔︎ pull request validation (5.9) - Build finished. 
     ✔︎ pull request validation (nightly) - Build finished. 
     ✔︎ pull request validation (soundness) - Build finished. 

https://github.com/swift-server/swift-openapi-async-http-client/pull/15
2023-09-07 14:53:14 +02:00
Honza Dvorsky 762f5e50ef [AHCTransport] Consistent style for initializing local variables (#10)
[AHCTransport] Consistent style for initializing local variables

### Motivation

Move to a consistent style when initializing local variables, always use `let foo = Foo(...)` vs `let foo: Foo = .init(...)`.

### Modifications

Updated all occurrences of the latter to use the former.

### Result

Consistent local variable initialization.

### Test Plan

All tests passed.


Reviewed by: gjcairo, simonjbeaumont

Builds:
     ✔︎ pull request validation (5.8) - Build finished. 
     ✔︎ pull request validation (5.9) - Build finished. 
     ✔︎ pull request validation (nightly) - Build finished. 
     ✔︎ pull request validation (soundness) - Build finished. 

https://github.com/swift-server/swift-openapi-async-http-client/pull/10
2023-08-01 16:14:00 +02:00
Si Beaumont db38b1b57e Initial commit
Co-authored-by: Honza Dvorsky <honza@apple.com>
Co-authored-by: Si Beaumont <beaumont@apple.com>
Co-authored-by: David Nadoba <d_nadoba@apple.com>
2023-05-10 12:17:57 +01:00