Skip to content

[Swift] Add debugPrint mode #345

@d-date

Description

@d-date
Description

With using Alamofire, we can print cURL command from request object in console.
It's useful to debug network not only for iOS developers but also for server-side engineers.

However, if we include print(request) without any condition, user cannot avoid including cURL printing into release build.

To avoid this, we should add static var debugPrint: Bool option to SwaggerClientAPI class so that user can choose whether print request or not.

In use case, when building app with debug build, all request can be printed in your console, and not printed in release build setting with preprocesser macros.

openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions