yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an option to exclude and not generate the APIClient.default property

zummenix opened this issue · comments

Currently APIClient has the default static property which creates the instance of the class with a base url and default parameters:

/// Manages and sends APIRequests
public class APIClient {
public static var `default` = APIClient(baseURL: {% if options.baseURL %}"{{ options.baseURL }}"{% elif defaultServer %}{{ options.name }}.Server.{{ defaultServer.name }}{% else %}""{% endif %})

In our usecase, because urls will be different, it will be somewhat confusing and error prone to have it. I would want to add an option to exclude and not generate this property. What do you think?