@@ -113,14 +113,16 @@ enum SiteURL: Resourceable, Sendable {
113113 case blogPost( _ slug: Parameter < String > )
114114 case buildMonitor
115115 case builds( _ id: Parameter < UUID > )
116+ case collections( _ name: Parameter < String > )
116117 case docs( Docs )
117118 case faq
118119 case home
119120 case images( String )
120121 case javascripts( String )
121122 case keywords( _ keyword: Parameter < String > )
122123 case package ( _ owner: Parameter < String > , _ repository: Parameter < String > , PackagePathComponents ? )
123- case packageCollection( _ owner: Parameter < String > )
124+ case packageCollectionAuthor( _ owner: Parameter < String > )
125+ case packageCollectionCustom( _ name: Parameter < String > )
124126 case packageCollections
125127 case privacy
126128 case readyForSwift6
@@ -169,6 +171,12 @@ enum SiteURL: Resourceable, Sendable {
169171 case . buildMonitor:
170172 return " build-monitor "
171173
174+ case let . collections( . value( name) ) :
175+ return " collections/ \( name. urlPathEncoded) "
176+
177+ case . collections( . key) :
178+ fatalError ( " path must not be called with a name parameter " )
179+
172180 case let . docs( next) :
173181 return " docs/ \( next. path) "
174182
@@ -201,10 +209,16 @@ enum SiteURL: Resourceable, Sendable {
201209 case . package :
202210 fatalError ( " invalid path: \( self ) " )
203211
204- case let . packageCollection ( . value( owner) ) :
212+ case let . packageCollectionAuthor ( . value( owner) ) :
205213 return " \( owner) /collection.json "
206214
207- case . packageCollection( . key) :
215+ case . packageCollectionAuthor( . key) :
216+ fatalError ( " invalid path: \( self ) " )
217+
218+ case let . packageCollectionCustom( . value( name) ) :
219+ return " collections/ \( name. urlPathEncoded) /collection.json "
220+
221+ case . packageCollectionCustom( . key) :
208222 fatalError ( " invalid path: \( self ) " )
209223
210224 case . packageCollections:
@@ -283,6 +297,12 @@ enum SiteURL: Resourceable, Sendable {
283297 case . builds( . value) :
284298 fatalError ( " pathComponents must not be called with a value parameter " )
285299
300+ case . collections( . key) :
301+ return [ " collections " , " :name " ]
302+
303+ case . collections( . value) :
304+ fatalError ( " pathComponents must not be called with a value parameter " )
305+
286306 case let . docs( next) :
287307 return [ " docs " ] + next. pathComponents
288308
@@ -298,10 +318,16 @@ enum SiteURL: Resourceable, Sendable {
298318 case . package :
299319 fatalError ( " pathComponents must not be called with a value parameter " )
300320
301- case . packageCollection ( . key) :
321+ case . packageCollectionAuthor ( . key) :
302322 return [ " :owner " , " collection.json " ]
303323
304- case . packageCollection( . value) :
324+ case . packageCollectionAuthor( . value) :
325+ fatalError ( " pathComponents must not be called with a value parameter " )
326+
327+ case . packageCollectionCustom( . key) :
328+ return [ " collections " , " :name " , " collection.json " ]
329+
330+ case . packageCollectionCustom( . value) :
305331 fatalError ( " pathComponents must not be called with a value parameter " )
306332
307333 case . images, . javascripts, . stylesheets:
0 commit comments