1
+ // Copyright Dave Verwer, Sven A. Schmidt, and other contributors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
import Foundation
2
16
3
17
import VaporToOpenAPI
4
18
import DependencyResolution
19
+ import PackageCollectionsSigning
20
+
5
21
6
22
// MARK: - External types
7
23
8
- extension Date : WithExample {
24
+ extension Date : VaporToOpenAPI . WithExample {
9
25
public static var example : Self { . init( rfc1123: " Sat, 25 Apr 2020 10:55:00 UTC " ) ! }
10
26
}
11
27
@@ -85,7 +101,7 @@ extension API.PostPackageCollectionDTO: WithExample {
85
101
}
86
102
}
87
103
88
- extension PackageCollectionModel . V1 . Collection : WithExample {
104
+ extension PackageCollectionModel . V1 . Collection : VaporToOpenAPI . WithExample {
89
105
public static var example : Self {
90
106
. init( name: " Packages by mona " ,
91
107
overview: " A collection of packages authored by mona from the Swift Package Index " ,
@@ -104,7 +120,7 @@ extension PackageCollectionModel.V1.Collection: WithExample {
104
120
}
105
121
}
106
122
107
- extension PackageCollectionModel . V1 . Signature . Certificate : WithExample {
123
+ extension PackageCollectionModel . V1 . Signature . Certificate : VaporToOpenAPI . WithExample {
108
124
public static var example : Self {
109
125
. init( subject: . init( userID: " V676TFACYJ " ,
110
126
commonName: " Swift Package Collection: SPI Operations Limited " ,
@@ -117,13 +133,13 @@ extension PackageCollectionModel.V1.Signature.Certificate: WithExample {
117
133
}
118
134
}
119
135
120
- extension PackageCollectionModel . V1 . Signature : WithExample {
136
+ extension PackageCollectionModel . V1 . Signature : VaporToOpenAPI . WithExample {
121
137
public static var example : Self {
122
138
. init( signature: " ewogICJhbGciIDogIlJ...<snip>...WD1pXXPrkvVJlv4w " , certificate: . example)
123
139
}
124
140
}
125
141
126
- extension SignedCollection : WithExample {
142
+ extension PackageCollectionSigning . Model . SignedCollection : VaporToOpenAPI . WithExample {
127
143
public static var example : Self {
128
144
. init( collection: . example, signature: . example)
129
145
}
0 commit comments