Generate accurate Swift async/await API documentation
Corrected Swift 5 and Swift 6 API documentation templates so async/await clients show the signatures and `try await` examples their generated source actually exposes.
OpenAPITools/openapi-generator · #24717
Developer experience fix
Generated Swift 5 and Swift 6 documentation now matches the actual async/await client APIs instead of teaching incompatible callback usage.
Problem
Clients generated with `responseAs: AsyncAwait` still documented completion-handler signatures and callback examples, leading users toward code that did not match the generated API, including Swift 6 typed-error and non-static configurations.
Approach
Added AsyncAwait-specific template branches for Swift 5 and Swift 6, documented Swift 6 typed throws and default configuration, respected static versus instance methods, preserved completion-handler modes, and kept Vapor on its EventLoopFuture path.
Impact and scope
- Prevents generated documentation from teaching uncompilable callback usage for async/await clients.
- Accurately represents Swift 6 typed errors, configuration defaults, and instance API invocation.
- Preserves behavior for completion-handler and Vapor libraries while correcting only the affected generation modes.
Validation
- Regenerated affected Swift 5 and Swift 6 samples and confirmed Vapor produced no tracked changes.
- Ran 64 focused Swift client generator tests with zero failures, errors, or skips.
- The upstream merge commit is GitHub-verified, credits Goutam Adwant, and closed GH-24631 as completed.