Skip to content

[BUG][swift6] Docs generated still use completion even when AsyncAwait flag set #24631

Description

@lilidotshi

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When we generate with --additional-properties=responseAs=AsyncAwait, I noticed that the .md files generated with it aren't using async await, and instead still referencing completion blocks as examples. This is super minor, but it would be nice to have the docs match the output of the swift file.

Using

openapi-generator version 7.24.0

I think this has always been the case. I'm looking even at the sample code generated in the code base and the docs:

https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/swift5/asyncAwaitLibrary/docs/PetAPI.md?plain=1

Generation Details

Swift 6 and Swift 5 both show this

Steps to reproduce

Run the openapi-generator with --additional-properties=responseAs=AsyncAwait and observe that the .md files don't change

Related issues/PRs
Suggest a fix

the .md files should generate sample code that matches the flag set by the user for responseAs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions