-
Notifications
You must be signed in to change notification settings - Fork 148
/
template.yml
54 lines (54 loc) · 2.02 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
formatter: swift
options:
name: API # the name of the API
fixedWidthIntegers: false # whether to use types like Int32 and Int64
mutableModels: true # whether model properties are mutable
safeOptionalDecoding: false # set invalid optionals to nil instead of throwing
safeArrayDecoding: false # filter out invalid items in array instead of throwing
modelPrefix: null # applied to model classes and enums
modelSuffix: null # applied to model classes
modelType: class # can be struct or class
modelInheritance: true # must be false for struct modelType
modelProtocol: APIModel # the protocol all models conform to
modelNames: {} # override model type names
enumNames: {} # override enum type names
enumUndecodableCase: false # whether to add undecodable case to enums
codableResponses: false # constrains all responses/model to be Codable
propertyNames: {} # override property names
anyType: Any # override Any in generated models
numberType: Double # number type without format
typeAliases:
ID: UUID
DateTime: Date
File: Data
dependencies:
- name: Alamofire
pod: Alamofire
github: Alamofire/Alamofire
version: 5.4.4
templateFiles:
- path: README.md
- path: Package.swift
- path: Cartfile
- path: Info.plist
- path: Sources/API.swift
- path: Sources/Coding.swift
- path: Sources/APIRequest.swift
- path: Sources/APIClient.swift
- path: Sources/APIService.swift
- path: Sources/APIClientError.swift
- path: Sources/APIResponse.swift
- path: Sources/APIResult.swift
- path: Sources/RequestBehaviour.swift
- path: Sources/AnyCodable.swift
- path: Podspec.podspec
destination: "{{ options.name }}.podspec"
- path: Sources/Enum.swift
context: enums
destination: "Sources/Enums/{{ enumName }}.swift"
- path: Sources/Model.swift
context: schemas
destination: "Sources/Models/{{ type }}.swift"
- path: Sources/Request.swift
context: operations
destination: "Sources/Requests{% if tag %}/{{ tag|upperCamelCase }}{% endif %}/{{ type }}.swift"