Skip to content

Commit 66b34a2

Browse files
authored
Merge pull request #112 from mfreiwald/fix-StarterPackViewBasicDefinition-decoding
Remove `type` from StarterPackViewBasicDefinition
2 parents e5b6b03 + c70014e commit 66b34a2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Sources/ATProtoKit/Models/Lexicons/app.bsky/Graph/AppBskyGraphDefs.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,6 @@ extension AppBskyLexicon.Graph {
352352
/// [github]: https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/graph/defs.json
353353
public struct StarterPackViewBasicDefinition: Sendable, Codable, Equatable, Hashable {
354354

355-
/// The identifier of the lexicon.
356-
///
357-
/// - Warning: The value must not change.
358-
public let type: String = "app.bsky.graph.defs#starterPackViewBasic"
359-
360355
/// The URI of the starter pack.
361356
public let uri: String
362357

@@ -389,11 +384,6 @@ extension AppBskyLexicon.Graph {
389384
public init(from decoder: any Decoder) throws {
390385
let container = try decoder.container(keyedBy: CodingKeys.self)
391386

392-
let decodedType = try container.decode(String.self, forKey: .type)
393-
if decodedType != type {
394-
throw DecodingError.typeMismatch(ListViewDefinition.self, .init(codingPath: [CodingKeys.type], debugDescription: "type did not match expected type \(type)"))
395-
}
396-
397387
self.uri = try container.decode(String.self, forKey: CodingKeys.uri)
398388
self.cid = try container.decode(String.self, forKey: .cid)
399389
self.record = try container.decode(UnknownType.self, forKey: .record)
@@ -420,7 +410,6 @@ extension AppBskyLexicon.Graph {
420410
}
421411

422412
enum CodingKeys: String, CodingKey {
423-
case type = "$type"
424413
case uri
425414
case cid
426415
case record

0 commit comments

Comments
 (0)