+1
-1
atproto/data/blob.go
+1
-1
atproto/data/blob.go
···
27
27
}
28
28
29
29
type BlobSchema struct {
30
-
LexiconTypeID string `json:"$type,const=blob" cborgen:"$type,const=blob"`
30
+
LexiconTypeID string `json:"$type" cborgen:"$type,const=blob"`
31
31
Ref CIDLink `json:"ref" cborgen:"ref"`
32
32
MimeType string `json:"mimeType" cborgen:"mimeType"`
33
33
Size int64 `json:"size" cborgen:"size"`
+19
-19
atproto/lexicon/language.go
+19
-19
atproto/lexicon/language.go
···
14
14
15
15
// Serialization helper type for top-level Lexicon schema JSON objects (files)
16
16
type SchemaFile struct {
17
-
Lexicon int `json:"lexicon,const=1"`
17
+
Lexicon int `json:"lexicon"` // must be 1
18
18
ID string `json:"id"`
19
19
Description *string `json:"description,omitempty"`
20
20
Defs map[string]SchemaDef `json:"defs"`
···
287
287
}
288
288
289
289
type SchemaRecord struct {
290
-
Type string `json:"type,const=record"`
290
+
Type string `json:"type"` // "record"
291
291
Description *string `json:"description,omitempty"`
292
292
Key string `json:"key"`
293
293
Record SchemaObject `json:"record"`
···
306
306
}
307
307
308
308
type SchemaQuery struct {
309
-
Type string `json:"type,const=query"`
309
+
Type string `json:"type"` // "query"
310
310
Description *string `json:"description,omitempty"`
311
311
Parameters SchemaParams `json:"parameters"`
312
312
Output *SchemaBody `json:"output"`
···
328
328
}
329
329
330
330
type SchemaProcedure struct {
331
-
Type string `json:"type,const=procedure"`
331
+
Type string `json:"type"` // "procedure"
332
332
Description *string `json:"description,omitempty"`
333
333
Parameters SchemaParams `json:"parameters"`
334
334
Output *SchemaBody `json:"output"` // optional
···
356
356
}
357
357
358
358
type SchemaSubscription struct {
359
-
Type string `json:"type,const=subscription"`
359
+
Type string `json:"type"` // "subscription"
360
360
Description *string `json:"description,omitempty"`
361
361
Parameters SchemaParams `json:"parameters"`
362
362
Message *SchemaMessage `json:"message,omitempty"` // TODO(specs): is this really optional?
···
429
429
}
430
430
431
431
type SchemaNull struct {
432
-
Type string `json:"type,const=null"`
432
+
Type string `json:"type"` // "null"
433
433
Description *string `json:"description,omitempty"`
434
434
}
435
435
···
445
445
}
446
446
447
447
type SchemaBoolean struct {
448
-
Type string `json:"type,const=bool"`
448
+
Type string `json:"type"` // "bool"
449
449
Description *string `json:"description,omitempty"`
450
450
Default *bool `json:"default,omitempty"`
451
451
Const *bool `json:"const,omitempty"`
···
470
470
}
471
471
472
472
type SchemaInteger struct {
473
-
Type string `json:"type,const=integer"`
473
+
Type string `json:"type"` // "integer"
474
474
Description *string `json:"description,omitempty"`
475
475
Minimum *int `json:"minimum,omitempty"`
476
476
Maximum *int `json:"maximum,omitempty"`
···
518
518
}
519
519
520
520
type SchemaString struct {
521
-
Type string `json:"type,const=string"`
521
+
Type string `json:"type"` // "string"
522
522
Description *string `json:"description,omitempty"`
523
523
Format *string `json:"format,omitempty"`
524
524
MinLength *int `json:"minLength,omitempty"`
···
647
647
}
648
648
649
649
type SchemaBytes struct {
650
-
Type string `json:"type,const=bytes"`
650
+
Type string `json:"type"` // "bytes"
651
651
Description *string `json:"description,omitempty"`
652
652
MinLength *int `json:"minLength,omitempty"`
653
653
MaxLength *int `json:"maxLength,omitempty"`
···
676
676
}
677
677
678
678
type SchemaCIDLink struct {
679
-
Type string `json:"type,const=cid-link"`
679
+
Type string `json:"type"` // "cid-link"
680
680
Description *string `json:"description,omitempty"`
681
681
}
682
682
···
693
693
}
694
694
695
695
type SchemaArray struct {
696
-
Type string `json:"type,const=array"`
696
+
Type string `json:"type"` // "array"
697
697
Description *string `json:"description,omitempty"`
698
698
Items SchemaDef `json:"items"`
699
699
MinLength *int `json:"minLength,omitempty"`
···
712
712
}
713
713
714
714
type SchemaObject struct {
715
-
Type string `json:"type,const=object"`
715
+
Type string `json:"type"` // "object"
716
716
Description *string `json:"description,omitempty"`
717
717
Properties map[string]SchemaDef `json:"properties"`
718
718
Required []string `json:"required,omitempty"`
···
755
755
}
756
756
757
757
type SchemaBlob struct {
758
-
Type string `json:"type,const=blob"`
758
+
Type string `json:"type"` // "blob"
759
759
Description *string `json:"description,omitempty"`
760
760
Accept []string `json:"accept,omitempty"`
761
761
MaxSize *int `json:"maxSize,omitempty"`
···
796
796
}
797
797
798
798
type SchemaParams struct {
799
-
Type string `json:"type,const=params"`
799
+
Type string `json:"type"` // "params"
800
800
Description *string `json:"description,omitempty"`
801
801
Properties map[string]SchemaDef `json:"properties"` // boolean, integer, string, or unknown; or an array of these types
802
802
Required []string `json:"required,omitempty"`
···
835
835
}
836
836
837
837
type SchemaToken struct {
838
-
Type string `json:"type,const=token"`
838
+
Type string `json:"type"` // "token"
839
839
Description *string `json:"description,omitempty"`
840
840
// the fully-qualified identifier of this token
841
841
fullName string
···
863
863
}
864
864
865
865
type SchemaRef struct {
866
-
Type string `json:"type,const=ref"`
866
+
Type string `json:"type"` // "ref"
867
867
Description *string `json:"description,omitempty"`
868
868
Ref string `json:"ref"`
869
869
// full path of reference
···
882
882
}
883
883
884
884
type SchemaUnion struct {
885
-
Type string `json:"type,const=union"`
885
+
Type string `json:"type"` // "union"
886
886
Description *string `json:"description,omitempty"`
887
887
Refs []string `json:"refs"`
888
888
Closed *bool `json:"closed,omitempty"`
···
905
905
}
906
906
907
907
type SchemaUnknown struct {
908
-
Type string `json:"type,const=unknown"`
908
+
Type string `json:"type"` // "unknown"
909
909
Description *string `json:"description,omitempty"`
910
910
}
911
911