Test case
1 generated file · +2 −2test/inputs/graphql/github1.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github2.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github3.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github4.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github5.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github6.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github7.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github8.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +2 −2test/inputs/graphql/github9.graphql
Mgraphql-golangdefault / quicktype.go+2 −2
| @@ -19,8 +19,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Data *Data `json:"data"` | |
| 23 | - Errors []Error `json:"errors,omitempty"` | |
| 22 | + Data *Data `json:"data"` | |
| 23 | + Errors *[]Error `json:"errors,omitempty"` | |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | type Data struct { |
Test case
1 generated file · +1 −1test/inputs/json/misc/0a91a.json
Mgolangdefault / quicktype.go+1 −1
| @@ -45,7 +45,7 @@ type Actor struct { | ||
| 45 | 45 | type Payload struct { |
| 46 | 46 | Action *string `json:"action,omitempty"` |
| 47 | 47 | Before *string `json:"before,omitempty"` |
| 48 | - Commits []Commit `json:"commits,omitempty"` | |
| 48 | + Commits *[]Commit `json:"commits,omitempty"` | |
| 49 | 49 | Description *string `json:"description"` |
| 50 | 50 | DistinctSize *int64 `json:"distinct_size,omitempty"` |
| 51 | 51 | Head *string `json:"head,omitempty"` |
Test case
1 generated file · +1 −1test/inputs/json/misc/26c9c.json
Mgolangdefault / quicktype.go+1 −1
| @@ -75,7 +75,7 @@ type Column struct { | ||
| 75 | 75 | CachedContents *CachedContents `json:"cachedContents,omitempty"` |
| 76 | 76 | DataTypeName string `json:"dataTypeName"` |
| 77 | 77 | FieldName string `json:"fieldName"` |
| 78 | - Flags []string `json:"flags,omitempty"` | |
| 78 | + Flags *[]string `json:"flags,omitempty"` | |
| 79 | 79 | Format Format `json:"format"` |
| 80 | 80 | ID int64 `json:"id"` |
| 81 | 81 | Name string `json:"name"` |
Test case
1 generated file · +2 −2test/inputs/json/misc/421d4.json
Mgolangdefault / quicktype.go+2 −2
| @@ -77,7 +77,7 @@ type Column struct { | ||
| 77 | 77 | CachedContents *CachedContents `json:"cachedContents,omitempty"` |
| 78 | 78 | DataTypeName string `json:"dataTypeName"` |
| 79 | 79 | FieldName string `json:"fieldName"` |
| 80 | - Flags []string `json:"flags,omitempty"` | |
| 80 | + Flags *[]string `json:"flags,omitempty"` | |
| 81 | 81 | Format Query `json:"format"` |
| 82 | 82 | ID int64 `json:"id"` |
| 83 | 83 | Name string `json:"name"` |
| @@ -94,7 +94,7 @@ type CachedContents struct { | ||
| 94 | 94 | Null int64 `json:"null"` |
| 95 | 95 | Smallest *string `json:"smallest,omitempty"` |
| 96 | 96 | Sum *string `json:"sum,omitempty"` |
| 97 | - Top []Top `json:"top,omitempty"` | |
| 97 | + Top *[]Top `json:"top,omitempty"` | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | type Top struct { |
Test case
1 generated file · +1 −1test/inputs/json/misc/5f7fe.json
Mgolangdefault / quicktype.go+1 −1
| @@ -75,7 +75,7 @@ type Column struct { | ||
| 75 | 75 | CachedContents *CachedContents `json:"cachedContents,omitempty"` |
| 76 | 76 | DataTypeName TypeName `json:"dataTypeName"` |
| 77 | 77 | FieldName string `json:"fieldName"` |
| 78 | - Flags []string `json:"flags,omitempty"` | |
| 78 | + Flags *[]string `json:"flags,omitempty"` | |
| 79 | 79 | Format Format `json:"format"` |
| 80 | 80 | ID int64 `json:"id"` |
| 81 | 81 | Name string `json:"name"` |
Test case
1 generated file · +1 −1test/inputs/json/misc/617e8.json
Mgolangdefault / quicktype.go+1 −1
| @@ -76,7 +76,7 @@ type Column struct { | ||
| 76 | 76 | DataTypeName TypeName `json:"dataTypeName"` |
| 77 | 77 | Description *string `json:"description,omitempty"` |
| 78 | 78 | FieldName string `json:"fieldName"` |
| 79 | - Flags []string `json:"flags,omitempty"` | |
| 79 | + Flags *[]string `json:"flags,omitempty"` | |
| 80 | 80 | Format Format `json:"format"` |
| 81 | 81 | ID int64 `json:"id"` |
| 82 | 82 | Name string `json:"name"` |
Test case
1 generated file · +6 −6test/inputs/json/misc/65dec.json
Mgolangdefault / quicktype.go+6 −6
| @@ -35,8 +35,8 @@ type TopLevel struct { | ||
| 35 | 35 | type Card struct { |
| 36 | 36 | Artist string `json:"artist"` |
| 37 | 37 | Cmc int64 `json:"cmc"` |
| 38 | - ColorIdentity []ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | - Colors []Watermark `json:"colors,omitempty"` | |
| 38 | + ColorIdentity *[]ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | + Colors *[]Watermark `json:"colors,omitempty"` | |
| 40 | 40 | Flavor *string `json:"flavor,omitempty"` |
| 41 | 41 | ID string `json:"id"` |
| 42 | 42 | ImageName string `json:"imageName"` |
| @@ -52,14 +52,14 @@ type Card struct { | ||
| 52 | 52 | Printings []string `json:"printings"` |
| 53 | 53 | Rarity Rarity `json:"rarity"` |
| 54 | 54 | Reserved *bool `json:"reserved,omitempty"` |
| 55 | - Rulings []Ruling `json:"rulings,omitempty"` | |
| 56 | - Subtypes []string `json:"subtypes,omitempty"` | |
| 57 | - Supertypes []string `json:"supertypes,omitempty"` | |
| 55 | + Rulings *[]Ruling `json:"rulings,omitempty"` | |
| 56 | + Subtypes *[]string `json:"subtypes,omitempty"` | |
| 57 | + Supertypes *[]string `json:"supertypes,omitempty"` | |
| 58 | 58 | Text *string `json:"text,omitempty"` |
| 59 | 59 | Toughness *string `json:"toughness,omitempty"` |
| 60 | 60 | Type string `json:"type"` |
| 61 | 61 | Types []Type `json:"types"` |
| 62 | - Variations []int64 `json:"variations,omitempty"` | |
| 62 | + Variations *[]int64 `json:"variations,omitempty"` | |
| 63 | 63 | Watermark *Watermark `json:"watermark,omitempty"` |
| 64 | 64 | } |
Test case
1 generated file · +1 −1test/inputs/json/misc/a3d8c.json
Mgolangdefault / quicktype.go+1 −1
| @@ -74,7 +74,7 @@ type Column struct { | ||
| 74 | 74 | CachedContents *CachedContents `json:"cachedContents,omitempty"` |
| 75 | 75 | DataTypeName TypeName `json:"dataTypeName"` |
| 76 | 76 | FieldName string `json:"fieldName"` |
| 77 | - Flags []string `json:"flags,omitempty"` | |
| 77 | + Flags *[]string `json:"flags,omitempty"` | |
| 78 | 78 | Format Query `json:"format"` |
| 79 | 79 | ID int64 `json:"id"` |
| 80 | 80 | Name string `json:"name"` |
Test case
1 generated file · +6 −6test/inputs/json/misc/dc44f.json
Mgolangdefault / quicktype.go+6 −6
| @@ -35,8 +35,8 @@ type TopLevel struct { | ||
| 35 | 35 | type Card struct { |
| 36 | 36 | Artist string `json:"artist"` |
| 37 | 37 | Cmc int64 `json:"cmc"` |
| 38 | - ColorIdentity []ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | - Colors []Color `json:"colors,omitempty"` | |
| 38 | + ColorIdentity *[]ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | + Colors *[]Color `json:"colors,omitempty"` | |
| 40 | 40 | Flavor *string `json:"flavor,omitempty"` |
| 41 | 41 | ID string `json:"id"` |
| 42 | 42 | ImageName string `json:"imageName"` |
| @@ -52,14 +52,14 @@ type Card struct { | ||
| 52 | 52 | Printings []string `json:"printings"` |
| 53 | 53 | Rarity Rarity `json:"rarity"` |
| 54 | 54 | Reserved *bool `json:"reserved,omitempty"` |
| 55 | - Rulings []Ruling `json:"rulings,omitempty"` | |
| 56 | - Subtypes []string `json:"subtypes,omitempty"` | |
| 57 | - Supertypes []Supertype `json:"supertypes,omitempty"` | |
| 55 | + Rulings *[]Ruling `json:"rulings,omitempty"` | |
| 56 | + Subtypes *[]string `json:"subtypes,omitempty"` | |
| 57 | + Supertypes *[]Supertype `json:"supertypes,omitempty"` | |
| 58 | 58 | Text *string `json:"text,omitempty"` |
| 59 | 59 | Toughness *string `json:"toughness,omitempty"` |
| 60 | 60 | Type string `json:"type"` |
| 61 | 61 | Types []Type `json:"types"` |
| 62 | - Variations []int64 `json:"variations,omitempty"` | |
| 62 | + Variations *[]int64 `json:"variations,omitempty"` | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | type LegalityElement struct { |
Test case
1 generated file · +6 −6test/inputs/json/misc/dd1ce.json
Mgolangdefault / quicktype.go+6 −6
| @@ -35,8 +35,8 @@ type TopLevel struct { | ||
| 35 | 35 | type Card struct { |
| 36 | 36 | Artist string `json:"artist"` |
| 37 | 37 | Cmc int64 `json:"cmc"` |
| 38 | - ColorIdentity []ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | - Colors []Color `json:"colors,omitempty"` | |
| 38 | + ColorIdentity *[]ColorIdentity `json:"colorIdentity,omitempty"` | |
| 39 | + Colors *[]Color `json:"colors,omitempty"` | |
| 40 | 40 | Flavor *string `json:"flavor,omitempty"` |
| 41 | 41 | ID string `json:"id"` |
| 42 | 42 | ImageName string `json:"imageName"` |
| @@ -52,14 +52,14 @@ type Card struct { | ||
| 52 | 52 | Printings []string `json:"printings"` |
| 53 | 53 | Rarity Rarity `json:"rarity"` |
| 54 | 54 | Reserved *bool `json:"reserved,omitempty"` |
| 55 | - Rulings []Ruling `json:"rulings,omitempty"` | |
| 56 | - Subtypes []string `json:"subtypes,omitempty"` | |
| 57 | - Supertypes []Supertype `json:"supertypes,omitempty"` | |
| 55 | + Rulings *[]Ruling `json:"rulings,omitempty"` | |
| 56 | + Subtypes *[]string `json:"subtypes,omitempty"` | |
| 57 | + Supertypes *[]Supertype `json:"supertypes,omitempty"` | |
| 58 | 58 | Text *string `json:"text,omitempty"` |
| 59 | 59 | Toughness *string `json:"toughness,omitempty"` |
| 60 | 60 | Type string `json:"type"` |
| 61 | 61 | Types []Type `json:"types"` |
| 62 | - Variations []int64 `json:"variations,omitempty"` | |
| 62 | + Variations *[]int64 `json:"variations,omitempty"` | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | type LegalityElement struct { |
Test case
1 generated file · +12 −12test/inputs/json/misc/e8b04.json
Mgolangdefault / quicktype.go+12 −12
| @@ -27,7 +27,7 @@ type TopLevelElement struct { | ||
| 27 | 27 | Description *string `json:"description,omitempty"` |
| 28 | 28 | DisplayType *DisplayType `json:"displayType,omitempty"` |
| 29 | 29 | DownloadCount int64 `json:"downloadCount"` |
| 30 | - Flags []TopLevelFlag `json:"flags,omitempty"` | |
| 30 | + Flags *[]TopLevelFlag `json:"flags,omitempty"` | |
| 31 | 31 | Grants []Grant `json:"grants"` |
| 32 | 32 | HideFromCatalog bool `json:"hideFromCatalog"` |
| 33 | 33 | HideFromDataJSON bool `json:"hideFromDataJson"` |
| @@ -56,7 +56,7 @@ type TopLevelElement struct { | ||
| 56 | 56 | RowsUpdatedBy *RowsUpdatedBy `json:"rowsUpdatedBy,omitempty"` |
| 57 | 57 | TableAuthor TableAuthor `json:"tableAuthor"` |
| 58 | 58 | TableID int64 `json:"tableId"` |
| 59 | - Tags []string `json:"tags,omitempty"` | |
| 59 | + Tags *[]string `json:"tags,omitempty"` | |
| 60 | 60 | TotalTimesRated int64 `json:"totalTimesRated"` |
| 61 | 61 | ViewCount int64 `json:"viewCount"` |
| 62 | 62 | ViewLastModified int64 `json:"viewLastModified"` |
| @@ -70,7 +70,7 @@ type Grant struct { | ||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | type TopLevelMetadata struct { |
| 73 | - AvailableDisplayTypes []DisplayType `json:"availableDisplayTypes,omitempty"` | |
| 73 | + AvailableDisplayTypes *[]DisplayType `json:"availableDisplayTypes,omitempty"` | |
| 74 | 74 | CustomFields *CustomFields `json:"custom_fields,omitempty"` |
| 75 | 75 | JSONQuery *JSONQuery `json:"jsonQuery,omitempty"` |
| 76 | 76 | RDFClass *string `json:"rdfClass,omitempty"` |
| @@ -91,10 +91,10 @@ type Test struct { | ||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | type JSONQuery struct { |
| 94 | - Group []Group `json:"group,omitempty"` | |
| 95 | - Order []Order `json:"order,omitempty"` | |
| 96 | - Select []Select `json:"select,omitempty"` | |
| 97 | - Where *Where `json:"where,omitempty"` | |
| 94 | + Group *[]Group `json:"group,omitempty"` | |
| 95 | + Order *[]Order `json:"order,omitempty"` | |
| 96 | + Select *[]Select `json:"select,omitempty"` | |
| 97 | + Where *Where `json:"where,omitempty"` | |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | type Group struct { |
| @@ -112,7 +112,7 @@ type Select struct { | ||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | type Where struct { |
| 115 | - Children []Child `json:"children,omitempty"` | |
| 115 | + Children *[]Child `json:"children,omitempty"` | |
| 116 | 116 | ColumnFieldName *ChildColumnFieldName `json:"columnFieldName,omitempty"` |
| 117 | 117 | Metadata *ChildMetadata `json:"metadata,omitempty"` |
| 118 | 118 | Operator WhereOperator `json:"operator"` |
| @@ -127,7 +127,7 @@ type Child struct { | ||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | type ChildMetadata struct { |
| 130 | - CustomValues []string `json:"customValues,omitempty"` | |
| 130 | + CustomValues *[]string `json:"customValues,omitempty"` | |
| 131 | 131 | Freeform *bool `json:"freeform,omitempty"` |
| 132 | 132 | IncludeAuto *int64 `json:"includeAuto,omitempty"` |
| 133 | 133 | Operator *MetadataOperator `json:"operator,omitempty"` |
| @@ -194,13 +194,13 @@ type FluffyVisible struct { | ||
| 194 | 194 | |
| 195 | 195 | type Owner struct { |
| 196 | 196 | DisplayName string `json:"displayName"` |
| 197 | - Flags []string `json:"flags,omitempty"` | |
| 197 | + Flags *[]string `json:"flags,omitempty"` | |
| 198 | 198 | ID string `json:"id"` |
| 199 | 199 | LastNotificationSeenAt *int64 `json:"lastNotificationSeenAt,omitempty"` |
| 200 | 200 | ProfileImageURLLarge *string `json:"profileImageUrlLarge,omitempty"` |
| 201 | 201 | ProfileImageURLMedium *string `json:"profileImageUrlMedium,omitempty"` |
| 202 | 202 | ProfileImageURLSmall *string `json:"profileImageUrlSmall,omitempty"` |
| 203 | - Rights []string `json:"rights,omitempty"` | |
| 203 | + Rights *[]string `json:"rights,omitempty"` | |
| 204 | 204 | RoleName *RoleName `json:"roleName,omitempty"` |
| 205 | 205 | ScreenName string `json:"screenName"` |
| 206 | 206 | } |
| @@ -212,7 +212,7 @@ type Ratings struct { | ||
| 212 | 212 | type TableAuthor struct { |
| 213 | 213 | DisplayName string `json:"displayName"` |
| 214 | 214 | ID string `json:"id"` |
| 215 | - Rights []string `json:"rights,omitempty"` | |
| 215 | + Rights *[]string `json:"rights,omitempty"` | |
| 216 | 216 | RoleName *RoleName `json:"roleName,omitempty"` |
| 217 | 217 | ScreenName string `json:"screenName"` |
| 218 | 218 | } |
Test case
1 generated file · +1 −1test/inputs/json/misc/f74d5.json
Mgolangdefault / quicktype.go+1 −1
| @@ -74,7 +74,7 @@ type Column struct { | ||
| 74 | 74 | CachedContents *CachedContents `json:"cachedContents,omitempty"` |
| 75 | 75 | DataTypeName TypeName `json:"dataTypeName"` |
| 76 | 76 | FieldName string `json:"fieldName"` |
| 77 | - Flags []string `json:"flags,omitempty"` | |
| 77 | + Flags *[]string `json:"flags,omitempty"` | |
| 78 | 78 | Format Query `json:"format"` |
| 79 | 79 | ID int64 `json:"id"` |
| 80 | 80 | Name string `json:"name"` |
Test case
1 generated file · +1 −1test/inputs/json/misc/fcca3.json
Mgolangdefault / quicktype.go+1 −1
| @@ -75,7 +75,7 @@ type Column struct { | ||
| 75 | 75 | DataTypeName TypeName `json:"dataTypeName"` |
| 76 | 76 | Description *string `json:"description,omitempty"` |
| 77 | 77 | FieldName string `json:"fieldName"` |
| 78 | - Flags []string `json:"flags,omitempty"` | |
| 78 | + Flags *[]string `json:"flags,omitempty"` | |
| 79 | 79 | Format Format `json:"format"` |
| 80 | 80 | ID int64 `json:"id"` |
| 81 | 81 | Name string `json:"name"` |
Test case
1 generated file · +138 −138test/inputs/json/priority/bug427.json
Mgolangdefault / quicktype.go+138 −138
| @@ -41,56 +41,56 @@ type TopLevelChild struct { | ||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | type PurpleChild struct { |
| 44 | - Children []FluffyChild `json:"children,omitempty"` | |
| 45 | - Comment *StickyComment `json:"comment,omitempty"` | |
| 46 | - DefaultValue *string `json:"defaultValue,omitempty"` | |
| 47 | - ExtendedBy []ExtendedBy `json:"extendedBy,omitempty"` | |
| 48 | - ExtendedTypes []ExtendedBy `json:"extendedTypes,omitempty"` | |
| 49 | - Flags IndecentFlags `json:"flags"` | |
| 50 | - Groups []Group `json:"groups,omitempty"` | |
| 51 | - ID int64 `json:"id"` | |
| 52 | - ImplementedBy []ExtendedBy `json:"implementedBy,omitempty"` | |
| 53 | - ImplementedTypes []ExtendedBy `json:"implementedTypes,omitempty"` | |
| 54 | - Kind int64 `json:"kind"` | |
| 55 | - KindString FluffyKindString `json:"kindString"` | |
| 56 | - Name string `json:"name"` | |
| 57 | - Signatures []StickySignature `json:"signatures,omitempty"` | |
| 58 | - Sources []Source `json:"sources"` | |
| 59 | - Type *MagentaType `json:"type,omitempty"` | |
| 60 | - TypeParameter []TypeParameterElement `json:"typeParameter,omitempty"` | |
| 44 | + Children *[]FluffyChild `json:"children,omitempty"` | |
| 45 | + Comment *StickyComment `json:"comment,omitempty"` | |
| 46 | + DefaultValue *string `json:"defaultValue,omitempty"` | |
| 47 | + ExtendedBy *[]ExtendedBy `json:"extendedBy,omitempty"` | |
| 48 | + ExtendedTypes *[]ExtendedBy `json:"extendedTypes,omitempty"` | |
| 49 | + Flags IndecentFlags `json:"flags"` | |
| 50 | + Groups *[]Group `json:"groups,omitempty"` | |
| 51 | + ID int64 `json:"id"` | |
| 52 | + ImplementedBy *[]ExtendedBy `json:"implementedBy,omitempty"` | |
| 53 | + ImplementedTypes *[]ExtendedBy `json:"implementedTypes,omitempty"` | |
| 54 | + Kind int64 `json:"kind"` | |
| 55 | + KindString FluffyKindString `json:"kindString"` | |
| 56 | + Name string `json:"name"` | |
| 57 | + Signatures *[]StickySignature `json:"signatures,omitempty"` | |
| 58 | + Sources []Source `json:"sources"` | |
| 59 | + Type *MagentaType `json:"type,omitempty"` | |
| 60 | + TypeParameter *[]TypeParameterElement `json:"typeParameter,omitempty"` | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | type FluffyChild struct { |
| 64 | - Children []TentacledChild `json:"children,omitempty"` | |
| 65 | - Comment *StickyComment `json:"comment,omitempty"` | |
| 66 | - DefaultValue *string `json:"defaultValue,omitempty"` | |
| 67 | - Flags StickyFlags `json:"flags"` | |
| 68 | - GetSignature *GetSignature `json:"getSignature,omitempty"` | |
| 69 | - Groups []Group `json:"groups,omitempty"` | |
| 70 | - ID int64 `json:"id"` | |
| 71 | - ImplementationOf *ExtendedBy `json:"implementationOf,omitempty"` | |
| 72 | - InheritedFrom *ExtendedBy `json:"inheritedFrom,omitempty"` | |
| 73 | - Kind int64 `json:"kind"` | |
| 74 | - KindString PurpleKindString `json:"kindString"` | |
| 75 | - Name string `json:"name"` | |
| 76 | - Overwrites *ExtendedBy `json:"overwrites,omitempty"` | |
| 77 | - SetSignature *GetSignature `json:"setSignature,omitempty"` | |
| 78 | - Signatures []FluffySignature `json:"signatures,omitempty"` | |
| 79 | - Sources []Source `json:"sources"` | |
| 80 | - Type *IndigoType `json:"type,omitempty"` | |
| 64 | + Children *[]TentacledChild `json:"children,omitempty"` | |
| 65 | + Comment *StickyComment `json:"comment,omitempty"` | |
| 66 | + DefaultValue *string `json:"defaultValue,omitempty"` | |
| 67 | + Flags StickyFlags `json:"flags"` | |
| 68 | + GetSignature *GetSignature `json:"getSignature,omitempty"` | |
| 69 | + Groups *[]Group `json:"groups,omitempty"` | |
| 70 | + ID int64 `json:"id"` | |
| 71 | + ImplementationOf *ExtendedBy `json:"implementationOf,omitempty"` | |
| 72 | + InheritedFrom *ExtendedBy `json:"inheritedFrom,omitempty"` | |
| 73 | + Kind int64 `json:"kind"` | |
| 74 | + KindString PurpleKindString `json:"kindString"` | |
| 75 | + Name string `json:"name"` | |
| 76 | + Overwrites *ExtendedBy `json:"overwrites,omitempty"` | |
| 77 | + SetSignature *GetSignature `json:"setSignature,omitempty"` | |
| 78 | + Signatures *[]FluffySignature `json:"signatures,omitempty"` | |
| 79 | + Sources []Source `json:"sources"` | |
| 80 | + Type *IndigoType `json:"type,omitempty"` | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | type TentacledChild struct { |
| 84 | - Comment *PurpleComment `json:"comment,omitempty"` | |
| 85 | - DefaultValue *string `json:"defaultValue,omitempty"` | |
| 86 | - Flags PurpleFlags `json:"flags"` | |
| 87 | - ID int64 `json:"id"` | |
| 88 | - Kind int64 `json:"kind"` | |
| 89 | - KindString PurpleKindString `json:"kindString"` | |
| 90 | - Name string `json:"name"` | |
| 91 | - Signatures []PurpleSignature `json:"signatures,omitempty"` | |
| 92 | - Sources []Source `json:"sources"` | |
| 93 | - Type *TypeElement `json:"type,omitempty"` | |
| 84 | + Comment *PurpleComment `json:"comment,omitempty"` | |
| 85 | + DefaultValue *string `json:"defaultValue,omitempty"` | |
| 86 | + Flags PurpleFlags `json:"flags"` | |
| 87 | + ID int64 `json:"id"` | |
| 88 | + Kind int64 `json:"kind"` | |
| 89 | + KindString PurpleKindString `json:"kindString"` | |
| 90 | + Name string `json:"name"` | |
| 91 | + Signatures *[]PurpleSignature `json:"signatures,omitempty"` | |
| 92 | + Sources []Source `json:"sources"` | |
| 93 | + Type *TypeElement `json:"type,omitempty"` | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | type PurpleComment struct { |
| @@ -128,7 +128,7 @@ type IndexSignatureElement struct { | ||
| 128 | 128 | Kind int64 `json:"kind"` |
| 129 | 129 | KindString string `json:"kindString"` |
| 130 | 130 | Name string `json:"name"` |
| 131 | - Parameters []GetSignature `json:"parameters,omitempty"` | |
| 131 | + Parameters *[]GetSignature `json:"parameters,omitempty"` | |
| 132 | 132 | Type PurpleType `json:"type"` |
| 133 | 133 | } |
| 134 | 134 | |
| @@ -150,20 +150,20 @@ type GetSignatureChild struct { | ||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | type GetSignature struct { |
| 153 | - Children []GetSignatureChild `json:"children,omitempty"` | |
| 154 | - Comment *GetSignatureComment `json:"comment,omitempty"` | |
| 155 | - DefaultValue *string `json:"defaultValue,omitempty"` | |
| 156 | - Flags GetSignatureFlags `json:"flags"` | |
| 157 | - Groups []Group `json:"groups,omitempty"` | |
| 158 | - ID int64 `json:"id"` | |
| 159 | - Kind int64 `json:"kind"` | |
| 160 | - KindString string `json:"kindString"` | |
| 161 | - Name string `json:"name"` | |
| 162 | - Parameters []GetSignatureParameter `json:"parameters,omitempty"` | |
| 163 | - Signatures []IndexSignatureElement `json:"signatures,omitempty"` | |
| 164 | - Sources []Source `json:"sources,omitempty"` | |
| 165 | - Type *GetSignatureType `json:"type,omitempty"` | |
| 166 | - TypeParameter []GetSignature `json:"typeParameter,omitempty"` | |
| 153 | + Children *[]GetSignatureChild `json:"children,omitempty"` | |
| 154 | + Comment *GetSignatureComment `json:"comment,omitempty"` | |
| 155 | + DefaultValue *string `json:"defaultValue,omitempty"` | |
| 156 | + Flags GetSignatureFlags `json:"flags"` | |
| 157 | + Groups *[]Group `json:"groups,omitempty"` | |
| 158 | + ID int64 `json:"id"` | |
| 159 | + Kind int64 `json:"kind"` | |
| 160 | + KindString string `json:"kindString"` | |
| 161 | + Name string `json:"name"` | |
| 162 | + Parameters *[]GetSignatureParameter `json:"parameters,omitempty"` | |
| 163 | + Signatures *[]IndexSignatureElement `json:"signatures,omitempty"` | |
| 164 | + Sources *[]Source `json:"sources,omitempty"` | |
| 165 | + Type *GetSignatureType `json:"type,omitempty"` | |
| 166 | + TypeParameter *[]GetSignature `json:"typeParameter,omitempty"` | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | type ElementType struct { |
| @@ -218,10 +218,10 @@ type TentacledFlags struct { | ||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | type FluffyType struct { |
| 221 | - ElementType *ElementType `json:"elementType,omitempty"` | |
| 222 | - Name *Name `json:"name,omitempty"` | |
| 223 | - Type TypeEnum `json:"type"` | |
| 224 | - TypeArguments []ElementType `json:"typeArguments,omitempty"` | |
| 221 | + ElementType *ElementType `json:"elementType,omitempty"` | |
| 222 | + Name *Name `json:"name,omitempty"` | |
| 223 | + Type TypeEnum `json:"type"` | |
| 224 | + TypeArguments *[]ElementType `json:"typeArguments,omitempty"` | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | type TentacledType struct { |
| @@ -241,17 +241,17 @@ type PurpleDeclaration struct { | ||
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | type TypeElement struct { |
| 244 | - Declaration *GetSignature `json:"declaration,omitempty"` | |
| 245 | - ElementType *ElementType `json:"elementType,omitempty"` | |
| 246 | - Name *Name `json:"name,omitempty"` | |
| 247 | - Type TypeEnum `json:"type"` | |
| 248 | - TypeArguments []ElementType `json:"typeArguments,omitempty"` | |
| 244 | + Declaration *GetSignature `json:"declaration,omitempty"` | |
| 245 | + ElementType *ElementType `json:"elementType,omitempty"` | |
| 246 | + Name *Name `json:"name,omitempty"` | |
| 247 | + Type TypeEnum `json:"type"` | |
| 248 | + TypeArguments *[]ElementType `json:"typeArguments,omitempty"` | |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | type StickyComment struct { |
| 252 | 252 | Returns *string `json:"returns,omitempty"` |
| 253 | 253 | ShortText *string `json:"shortText,omitempty"` |
| 254 | - Tags []Tag `json:"tags,omitempty"` | |
| 254 | + Tags *[]Tag `json:"tags,omitempty"` | |
| 255 | 255 | Text *string `json:"text,omitempty"` |
| 256 | 256 | } |
| 257 | 257 | |
| @@ -271,11 +271,11 @@ type StickyFlags struct { | ||
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | type ExtendedBy struct { |
| 274 | - Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 275 | - ID *int64 `json:"id,omitempty"` | |
| 276 | - Name string `json:"name"` | |
| 277 | - Type TypeEnum `json:"type"` | |
| 278 | - TypeArguments []ExtendedBy `json:"typeArguments,omitempty"` | |
| 274 | + Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 275 | + ID *int64 `json:"id,omitempty"` | |
| 276 | + Name string `json:"name"` | |
| 277 | + Type TypeEnum `json:"type"` | |
| 278 | + TypeArguments *[]ExtendedBy `json:"typeArguments,omitempty"` | |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | type FluffySignature struct { |
| @@ -288,9 +288,9 @@ type FluffySignature struct { | ||
| 288 | 288 | KindString SignatureKindString `json:"kindString"` |
| 289 | 289 | Name string `json:"name"` |
| 290 | 290 | Overwrites *ExtendedBy `json:"overwrites,omitempty"` |
| 291 | - Parameters []PurpleParameter `json:"parameters,omitempty"` | |
| 291 | + Parameters *[]PurpleParameter `json:"parameters,omitempty"` | |
| 292 | 292 | Type ExtendedBy `json:"type"` |
| 293 | - TypeParameter []GetSignature `json:"typeParameter,omitempty"` | |
| 293 | + TypeParameter *[]GetSignature `json:"typeParameter,omitempty"` | |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | type IndigoFlags struct { |
| @@ -309,39 +309,39 @@ type PurpleParameter struct { | ||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | type StickyType struct { |
| 312 | - Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 313 | - Declaration *GetSignature `json:"declaration,omitempty"` | |
| 314 | - ElementType *ElementType `json:"elementType,omitempty"` | |
| 315 | - Elements []ExtendedBy `json:"elements,omitempty"` | |
| 316 | - ID *int64 `json:"id,omitempty"` | |
| 317 | - Name *string `json:"name,omitempty"` | |
| 318 | - Type TypeEnum `json:"type"` | |
| 319 | - TypeArguments []ElementType `json:"typeArguments,omitempty"` | |
| 312 | + Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 313 | + Declaration *GetSignature `json:"declaration,omitempty"` | |
| 314 | + ElementType *ElementType `json:"elementType,omitempty"` | |
| 315 | + Elements *[]ExtendedBy `json:"elements,omitempty"` | |
| 316 | + ID *int64 `json:"id,omitempty"` | |
| 317 | + Name *string `json:"name,omitempty"` | |
| 318 | + Type TypeEnum `json:"type"` | |
| 319 | + TypeArguments *[]ElementType `json:"typeArguments,omitempty"` | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | type IndigoType struct { |
| 323 | - Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 324 | - Declaration *FluffyDeclaration `json:"declaration,omitempty"` | |
| 325 | - ElementType *ExtendedBy `json:"elementType,omitempty"` | |
| 326 | - Elements []ElementType `json:"elements,omitempty"` | |
| 327 | - ID *int64 `json:"id,omitempty"` | |
| 328 | - Name *string `json:"name,omitempty"` | |
| 329 | - Type TypeEnum `json:"type"` | |
| 330 | - TypeArguments []PurpleTypeArgument `json:"typeArguments,omitempty"` | |
| 331 | - Types []TypeElement `json:"types,omitempty"` | |
| 323 | + Constraint *ExtendedBy `json:"constraint,omitempty"` | |
| 324 | + Declaration *FluffyDeclaration `json:"declaration,omitempty"` | |
| 325 | + ElementType *ExtendedBy `json:"elementType,omitempty"` | |
| 326 | + Elements *[]ElementType `json:"elements,omitempty"` | |
| 327 | + ID *int64 `json:"id,omitempty"` | |
| 328 | + Name *string `json:"name,omitempty"` | |
| 329 | + Type TypeEnum `json:"type"` | |
| 330 | + TypeArguments *[]PurpleTypeArgument `json:"typeArguments,omitempty"` | |
| 331 | + Types *[]TypeElement `json:"types,omitempty"` | |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | type FluffyDeclaration struct { |
| 335 | - Children []StickyChild `json:"children,omitempty"` | |
| 336 | - Flags GetSignatureFlags `json:"flags"` | |
| 337 | - Groups []Group `json:"groups,omitempty"` | |
| 338 | - ID int64 `json:"id"` | |
| 339 | - IndexSignature *IndexSignature `json:"indexSignature,omitempty"` | |
| 340 | - Kind int64 `json:"kind"` | |
| 341 | - KindString string `json:"kindString"` | |
| 342 | - Name string `json:"name"` | |
| 343 | - Signatures []TentacledSignature `json:"signatures,omitempty"` | |
| 344 | - Sources []Source `json:"sources"` | |
| 335 | + Children *[]StickyChild `json:"children,omitempty"` | |
| 336 | + Flags GetSignatureFlags `json:"flags"` | |
| 337 | + Groups *[]Group `json:"groups,omitempty"` | |
| 338 | + ID int64 `json:"id"` | |
| 339 | + IndexSignature *IndexSignature `json:"indexSignature,omitempty"` | |
| 340 | + Kind int64 `json:"kind"` | |
| 341 | + KindString string `json:"kindString"` | |
| 342 | + Name string `json:"name"` | |
| 343 | + Signatures *[]TentacledSignature `json:"signatures,omitempty"` | |
| 344 | + Sources []Source `json:"sources"` | |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | type StickyChild struct { |
| @@ -356,10 +356,10 @@ type StickyChild struct { | ||
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | type IndecentType struct { |
| 359 | - Declaration *GetSignature `json:"declaration,omitempty"` | |
| 360 | - Elements []ElementType `json:"elements,omitempty"` | |
| 361 | - Name *Name `json:"name,omitempty"` | |
| 362 | - Type TypeEnum `json:"type"` | |
| 359 | + Declaration *GetSignature `json:"declaration,omitempty"` | |
| 360 | + Elements *[]ElementType `json:"elements,omitempty"` | |
| 361 | + Name *Name `json:"name,omitempty"` | |
| 362 | + Type TypeEnum `json:"type"` | |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | 365 | type IndexSignature struct { |
| @@ -384,7 +384,7 @@ type TentacledSignature struct { | ||
| 384 | 384 | Kind int64 `json:"kind"` |
| 385 | 385 | KindString SignatureKindString `json:"kindString"` |
| 386 | 386 | Name string `json:"name"` |
| 387 | - Parameters []FluffyParameter `json:"parameters,omitempty"` | |
| 387 | + Parameters *[]FluffyParameter `json:"parameters,omitempty"` | |
| 388 | 388 | Type ExtendedBy `json:"type"` |
| 389 | 389 | } |
| 390 | 390 | |
| @@ -400,7 +400,7 @@ type FluffyParameter struct { | ||
| 400 | 400 | Kind int64 `json:"kind"` |
| 401 | 401 | KindString string `json:"kindString"` |
| 402 | 402 | Name string `json:"name"` |
| 403 | - Sources []Source `json:"sources,omitempty"` | |
| 403 | + Sources *[]Source `json:"sources,omitempty"` | |
| 404 | 404 | Type ElementType `json:"type"` |
| 405 | 405 | } |
| 406 | 406 | |
| @@ -421,15 +421,15 @@ type IndecentFlags struct { | ||
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | type StickySignature struct { |
| 424 | - Comment StickyComment `json:"comment"` | |
| 425 | - Flags IndigoFlags `json:"flags"` | |
| 426 | - ID int64 `json:"id"` | |
| 427 | - Kind int64 `json:"kind"` | |
| 428 | - KindString SignatureKindString `json:"kindString"` | |
| 429 | - Name string `json:"name"` | |
| 430 | - Parameters []TentacledParameter `json:"parameters,omitempty"` | |
| 431 | - Type CunningType `json:"type"` | |
| 432 | - TypeParameter []GetSignature `json:"typeParameter,omitempty"` | |
| 424 | + Comment StickyComment `json:"comment"` | |
| 425 | + Flags IndigoFlags `json:"flags"` | |
| 426 | + ID int64 `json:"id"` | |
| 427 | + Kind int64 `json:"kind"` | |
| 428 | + KindString SignatureKindString `json:"kindString"` | |
| 429 | + Name string `json:"name"` | |
| 430 | + Parameters *[]TentacledParameter `json:"parameters,omitempty"` | |
| 431 | + Type CunningType `json:"type"` | |
| 432 | + TypeParameter *[]GetSignature `json:"typeParameter,omitempty"` | |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | type TentacledParameter struct { |
| @@ -450,19 +450,19 @@ type AmbitiousType struct { | ||
| 450 | 450 | ID *int64 `json:"id,omitempty"` |
| 451 | 451 | Name *string `json:"name,omitempty"` |
| 452 | 452 | Type TypeEnum `json:"type"` |
| 453 | - TypeArguments []ElementType `json:"typeArguments,omitempty"` | |
| 453 | + TypeArguments *[]ElementType `json:"typeArguments,omitempty"` | |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | type TentacledDeclaration struct { |
| 457 | - Children []IndigoChild `json:"children,omitempty"` | |
| 457 | + Children *[]IndigoChild `json:"children,omitempty"` | |
| 458 | 458 | Flags GetSignatureFlags `json:"flags"` |
| 459 | - Groups []Group `json:"groups,omitempty"` | |
| 459 | + Groups *[]Group `json:"groups,omitempty"` | |
| 460 | 460 | ID int64 `json:"id"` |
| 461 | 461 | IndexSignature *IndexSignatureElement `json:"indexSignature,omitempty"` |
| 462 | 462 | Kind int64 `json:"kind"` |
| 463 | 463 | KindString string `json:"kindString"` |
| 464 | 464 | Name string `json:"name"` |
| 465 | - Signatures []GetSignature `json:"signatures,omitempty"` | |
| 465 | + Signatures *[]GetSignature `json:"signatures,omitempty"` | |
| 466 | 466 | Sources []Source `json:"sources"` |
| 467 | 467 | } |
| 468 | 468 | |
| @@ -483,25 +483,25 @@ type CunningType struct { | ||
| 483 | 483 | ID *int64 `json:"id,omitempty"` |
| 484 | 484 | Name *Name `json:"name,omitempty"` |
| 485 | 485 | Type TypeEnum `json:"type"` |
| 486 | - TypeArguments []ElementType `json:"typeArguments,omitempty"` | |
| 486 | + TypeArguments *[]ElementType `json:"typeArguments,omitempty"` | |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | type MagentaType struct { |
| 490 | - Declaration *StickyDeclaration `json:"declaration,omitempty"` | |
| 491 | - ElementType *ElementType `json:"elementType,omitempty"` | |
| 492 | - Elements []ExtendedBy `json:"elements,omitempty"` | |
| 493 | - ID *int64 `json:"id,omitempty"` | |
| 494 | - Name *string `json:"name,omitempty"` | |
| 495 | - Type TypeEnum `json:"type"` | |
| 496 | - TypeArguments []FluffyTypeArgument `json:"typeArguments,omitempty"` | |
| 497 | - Types []ExtendedBy `json:"types,omitempty"` | |
| 498 | - Value *string `json:"value,omitempty"` | |
| 490 | + Declaration *StickyDeclaration `json:"declaration,omitempty"` | |
| 491 | + ElementType *ElementType `json:"elementType,omitempty"` | |
| 492 | + Elements *[]ExtendedBy `json:"elements,omitempty"` | |
| 493 | + ID *int64 `json:"id,omitempty"` | |
| 494 | + Name *string `json:"name,omitempty"` | |
| 495 | + Type TypeEnum `json:"type"` | |
| 496 | + TypeArguments *[]FluffyTypeArgument `json:"typeArguments,omitempty"` | |
| 497 | + Types *[]ExtendedBy `json:"types,omitempty"` | |
| 498 | + Value *string `json:"value,omitempty"` | |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | 501 | type StickyDeclaration struct { |
| 502 | - Children []IndecentChild `json:"children,omitempty"` | |
| 502 | + Children *[]IndecentChild `json:"children,omitempty"` | |
| 503 | 503 | Flags GetSignatureFlags `json:"flags"` |
| 504 | - Groups []Group `json:"groups,omitempty"` | |
| 504 | + Groups *[]Group `json:"groups,omitempty"` | |
| 505 | 505 | ID int64 `json:"id"` |
| 506 | 506 | Kind int64 `json:"kind"` |
| 507 | 507 | KindString string `json:"kindString"` |
| @@ -527,14 +527,14 @@ type FriskyType struct { | ||
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | type IndigoDeclaration struct { |
| 530 | - Children []GetSignature `json:"children,omitempty"` | |
| 530 | + Children *[]GetSignature `json:"children,omitempty"` | |
| 531 | 531 | Flags GetSignatureFlags `json:"flags"` |
| 532 | - Groups []Group `json:"groups,omitempty"` | |
| 532 | + Groups *[]Group `json:"groups,omitempty"` | |
| 533 | 533 | ID int64 `json:"id"` |
| 534 | 534 | Kind int64 `json:"kind"` |
| 535 | 535 | KindString string `json:"kindString"` |
| 536 | 536 | Name string `json:"name"` |
| 537 | - Signatures []GetSignature `json:"signatures,omitempty"` | |
| 537 | + Signatures *[]GetSignature `json:"signatures,omitempty"` | |
| 538 | 538 | Sources []Source `json:"sources"` |
| 539 | 539 | } |
| 540 | 540 | |
| @@ -563,7 +563,7 @@ type MischievousType struct { | ||
| 563 | 563 | |
| 564 | 564 | type IndecentComment struct { |
| 565 | 565 | ShortText string `json:"shortText"` |
| 566 | - Tags []Tag `json:"tags,omitempty"` | |
| 566 | + Tags *[]Tag `json:"tags,omitempty"` | |
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | type PurpleKindString string |
Test case
1 generated file · +1 −1test/inputs/json/priority/nbl-stats.json
Mgolangdefault / quicktype.go+1 −1
| @@ -110,7 +110,7 @@ type Scorer struct { | ||
| 110 | 110 | ScoreboardName *ScoreboardNameEnum `json:"scoreboardName,omitempty"` |
| 111 | 111 | ShirtNumber string `json:"shirtNumber"` |
| 112 | 112 | Summary *string `json:"summary,omitempty"` |
| 113 | - Times []Time `json:"times,omitempty"` | |
| 113 | + Times *[]Time `json:"times,omitempty"` | |
| 114 | 114 | Tno int64 `json:"tno"` |
| 115 | 115 | Tot *int64 `json:"tot,omitempty"` |
| 116 | 116 | } |
Test case
1 generated file · +4 −4test/inputs/json/priority/recursive.json
Mgolangdefault / quicktype.go+4 −4
| @@ -135,8 +135,8 @@ type Format struct { | ||
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | type FormatsClass struct { |
| 138 | - Formats []Format `json:"formats,omitempty"` | |
| 139 | - Height int64 `json:"height"` | |
| 140 | - URL string `json:"url"` | |
| 141 | - Width int64 `json:"width"` | |
| 138 | + Formats *[]Format `json:"formats,omitempty"` | |
| 139 | + Height int64 `json:"height"` | |
| 140 | + URL string `json:"url"` | |
| 141 | + Width int64 `json:"width"` | |
| 142 | 142 | } |
Test case
1 generated file · +316 −0test/inputs/json/samples/github-events.json
Agolangdefault / quicktype.go+316 −0
| @@ -0,0 +1,316 @@ | ||
| 1 | +// Code generated from JSON Schema using quicktype. DO NOT EDIT. | |
| 2 | +// To parse and unparse this JSON data, add this code to your project and do: | |
| 3 | +// | |
| 4 | +// topLevel, err := UnmarshalTopLevel(bytes) | |
| 5 | +// bytes, err = topLevel.Marshal() | |
| 6 | + | |
| 7 | +package main | |
| 8 | + | |
| 9 | +import "time" | |
| 10 | + | |
| 11 | +import "encoding/json" | |
| 12 | + | |
| 13 | +type TopLevel []TopLevelElement | |
| 14 | + | |
| 15 | +func UnmarshalTopLevel(data []byte) (TopLevel, error) { | |
| 16 | + var r TopLevel | |
| 17 | + err := json.Unmarshal(data, &r) | |
| 18 | + return r, err | |
| 19 | +} | |
| 20 | + | |
| 21 | +func (r *TopLevel) Marshal() ([]byte, error) { | |
| 22 | + return json.Marshal(r) | |
| 23 | +} | |
| 24 | + | |
| 25 | +type TopLevelElement struct { | |
| 26 | + Actor Actor `json:"actor"` | |
| 27 | + CreatedAt time.Time `json:"created_at"` | |
| 28 | + ID string `json:"id"` | |
| 29 | + Org *Actor `json:"org,omitempty"` | |
| 30 | + Payload Payload `json:"payload"` | |
| 31 | + Public bool `json:"public"` | |
| 32 | + Repo TopLevelRepo `json:"repo"` | |
| 33 | + Type string `json:"type"` | |
| 34 | +} | |
| 35 | + | |
| 36 | +type Actor struct { | |
| 37 | + AvatarURL string `json:"avatar_url"` | |
| 38 | + DisplayLogin *string `json:"display_login,omitempty"` | |
| 39 | + GravatarID string `json:"gravatar_id"` | |
| 40 | + ID int64 `json:"id"` | |
| 41 | + Login string `json:"login"` | |
| 42 | + URL string `json:"url"` | |
| 43 | +} | |
| 44 | + | |
| 45 | +type Payload struct { | |
| 46 | + Action *string `json:"action,omitempty"` | |
| 47 | + Before *string `json:"before,omitempty"` | |
| 48 | + Comment *Comment `json:"comment,omitempty"` | |
| 49 | + Commits *[]Commit `json:"commits,omitempty"` | |
| 50 | + Description *string `json:"description,omitempty"` | |
| 51 | + DistinctSize *int64 `json:"distinct_size,omitempty"` | |
| 52 | + Head *string `json:"head,omitempty"` | |
| 53 | + Issue *Issue `json:"issue,omitempty"` | |
| 54 | + MasterBranch *string `json:"master_branch,omitempty"` | |
| 55 | + Number *int64 `json:"number,omitempty"` | |
| 56 | + PullRequest *PayloadPullRequest `json:"pull_request,omitempty"` | |
| 57 | + PushID *int64 `json:"push_id,omitempty"` | |
| 58 | + PusherType *string `json:"pusher_type,omitempty"` | |
| 59 | + Ref *string `json:"ref,omitempty"` | |
| 60 | + RefType *string `json:"ref_type,omitempty"` | |
| 61 | + Size *int64 `json:"size,omitempty"` | |
| 62 | +} | |
| 63 | + | |
| 64 | +type Comment struct { | |
| 65 | + Body string `json:"body"` | |
| 66 | + CreatedAt time.Time `json:"created_at"` | |
| 67 | + HTMLURL string `json:"html_url"` | |
| 68 | + ID int64 `json:"id"` | |
| 69 | + IssueURL string `json:"issue_url"` | |
| 70 | + URL string `json:"url"` | |
| 71 | + UpdatedAt time.Time `json:"updated_at"` | |
| 72 | + User UserClass `json:"user"` | |
| 73 | +} | |
| 74 | + | |
| 75 | +type UserClass struct { | |
| 76 | + AvatarURL string `json:"avatar_url"` | |
| 77 | + EventsURL string `json:"events_url"` | |
| 78 | + FollowersURL string `json:"followers_url"` | |
| 79 | + FollowingURL string `json:"following_url"` | |
| 80 | + GistsURL string `json:"gists_url"` | |
| 81 | + GravatarID string `json:"gravatar_id"` | |
| 82 | + HTMLURL string `json:"html_url"` | |
| 83 | + ID int64 `json:"id"` | |
| 84 | + Login string `json:"login"` | |
| 85 | + OrganizationsURL string `json:"organizations_url"` | |
| 86 | + ReceivedEventsURL string `json:"received_events_url"` | |
| 87 | + ReposURL string `json:"repos_url"` | |
| 88 | + SiteAdmin bool `json:"site_admin"` | |
| 89 | + StarredURL string `json:"starred_url"` | |
| 90 | + SubscriptionsURL string `json:"subscriptions_url"` | |
| 91 | + Type Type `json:"type"` | |
| 92 | + URL string `json:"url"` | |
| 93 | +} | |
| 94 | + | |
| 95 | +type Commit struct { | |
| 96 | + Author Author `json:"author"` | |
| 97 | + Distinct bool `json:"distinct"` | |
| 98 | + Message string `json:"message"` | |
| 99 | + SHA string `json:"sha"` | |
| 100 | + URL string `json:"url"` | |
| 101 | +} | |
| 102 | + | |
| 103 | +type Author struct { | |
| 104 | + Email string `json:"email"` | |
| 105 | + Name string `json:"name"` | |
| 106 | +} | |
| 107 | + | |
| 108 | +type Issue struct { | |
| 109 | + Assignee interface{} `json:"assignee"` | |
| 110 | + Assignees []interface{} `json:"assignees"` | |
| 111 | + Body string `json:"body"` | |
| 112 | + ClosedAt *time.Time `json:"closed_at"` | |
| 113 | + Comments int64 `json:"comments"` | |
| 114 | + CommentsURL string `json:"comments_url"` | |
| 115 | + CreatedAt time.Time `json:"created_at"` | |
| 116 | + EventsURL string `json:"events_url"` | |
| 117 | + HTMLURL string `json:"html_url"` | |
| 118 | + ID int64 `json:"id"` | |
| 119 | + Labels []Label `json:"labels"` | |
| 120 | + LabelsURL string `json:"labels_url"` | |
| 121 | + Locked bool `json:"locked"` | |
| 122 | + Milestone *Milestone `json:"milestone"` | |
| 123 | + Number int64 `json:"number"` | |
| 124 | + PullRequest *IssuePullRequest `json:"pull_request,omitempty"` | |
| 125 | + RepositoryURL string `json:"repository_url"` | |
| 126 | + State string `json:"state"` | |
| 127 | + Title string `json:"title"` | |
| 128 | + URL string `json:"url"` | |
| 129 | + UpdatedAt time.Time `json:"updated_at"` | |
| 130 | + User UserClass `json:"user"` | |
| 131 | +} | |
| 132 | + | |
| 133 | +type Label struct { | |
| 134 | + Color string `json:"color"` | |
| 135 | + Default bool `json:"default"` | |
| 136 | + ID int64 `json:"id"` | |
| 137 | + Name string `json:"name"` | |
| 138 | + URL string `json:"url"` | |
| 139 | +} | |
| 140 | + | |
| 141 | +type Milestone struct { | |
| 142 | + ClosedAt interface{} `json:"closed_at"` | |
| 143 | + ClosedIssues int64 `json:"closed_issues"` | |
| 144 | + CreatedAt time.Time `json:"created_at"` | |
| 145 | + Creator UserClass `json:"creator"` | |
| 146 | + Description string `json:"description"` | |
| 147 | + DueOn *time.Time `json:"due_on"` | |
| 148 | + HTMLURL string `json:"html_url"` | |
| 149 | + ID int64 `json:"id"` | |
| 150 | + LabelsURL string `json:"labels_url"` | |
| 151 | + Number int64 `json:"number"` | |
| 152 | + OpenIssues int64 `json:"open_issues"` | |
| 153 | + State string `json:"state"` | |
| 154 | + Title string `json:"title"` | |
| 155 | + URL string `json:"url"` | |
| 156 | + UpdatedAt time.Time `json:"updated_at"` | |
| 157 | +} | |
| 158 | + | |
| 159 | +type IssuePullRequest struct { | |
| 160 | + DiffURL string `json:"diff_url"` | |
| 161 | + HTMLURL string `json:"html_url"` | |
| 162 | + PatchURL string `json:"patch_url"` | |
| 163 | + URL string `json:"url"` | |
| 164 | +} | |
| 165 | + | |
| 166 | +type PayloadPullRequest struct { | |
| 167 | + Additions int64 `json:"additions"` | |
| 168 | + Assignee interface{} `json:"assignee"` | |
| 169 | + Assignees []interface{} `json:"assignees"` | |
| 170 | + Base Base `json:"base"` | |
| 171 | + Body string `json:"body"` | |
| 172 | + ChangedFiles int64 `json:"changed_files"` | |
| 173 | + ClosedAt time.Time `json:"closed_at"` | |
| 174 | + Comments int64 `json:"comments"` | |
| 175 | + CommentsURL string `json:"comments_url"` | |
| 176 | + Commits int64 `json:"commits"` | |
| 177 | + CommitsURL string `json:"commits_url"` | |
| 178 | + CreatedAt time.Time `json:"created_at"` | |
| 179 | + Deletions int64 `json:"deletions"` | |
| 180 | + DiffURL string `json:"diff_url"` | |
| 181 | + HTMLURL string `json:"html_url"` | |
| 182 | + Head Base `json:"head"` | |
| 183 | + ID int64 `json:"id"` | |
| 184 | + IssueURL string `json:"issue_url"` | |
| 185 | + Links Links `json:"_links"` | |
| 186 | + Locked bool `json:"locked"` | |
| 187 | + MaintainerCanModify bool `json:"maintainer_can_modify"` | |
| 188 | + MergeCommitSHA string `json:"merge_commit_sha"` | |
| 189 | + Mergeable interface{} `json:"mergeable"` | |
| 190 | + MergeableState string `json:"mergeable_state"` | |
| 191 | + Merged bool `json:"merged"` | |
| 192 | + MergedAt time.Time `json:"merged_at"` | |
| 193 | + MergedBy UserClass `json:"merged_by"` | |
| 194 | + Milestone interface{} `json:"milestone"` | |
| 195 | + Number int64 `json:"number"` | |
| 196 | + PatchURL string `json:"patch_url"` | |
| 197 | + Rebaseable interface{} `json:"rebaseable"` | |
| 198 | + RequestedReviewers []interface{} `json:"requested_reviewers"` | |
| 199 | + ReviewCommentURL string `json:"review_comment_url"` | |
| 200 | + ReviewComments int64 `json:"review_comments"` | |
| 201 | + ReviewCommentsURL string `json:"review_comments_url"` | |
| 202 | + State string `json:"state"` | |
| 203 | + StatusesURL string `json:"statuses_url"` | |
| 204 | + Title string `json:"title"` | |
| 205 | + URL string `json:"url"` | |
| 206 | + UpdatedAt time.Time `json:"updated_at"` | |
| 207 | + User UserClass `json:"user"` | |
| 208 | +} | |
| 209 | + | |
| 210 | +type Base struct { | |
| 211 | + Label string `json:"label"` | |
| 212 | + Ref string `json:"ref"` | |
| 213 | + Repo BaseRepo `json:"repo"` | |
| 214 | + SHA string `json:"sha"` | |
| 215 | + User UserClass `json:"user"` | |
| 216 | +} | |
| 217 | + | |
| 218 | +type BaseRepo struct { | |
| 219 | + ArchiveURL string `json:"archive_url"` | |
| 220 | + AssigneesURL string `json:"assignees_url"` | |
| 221 | + BlobsURL string `json:"blobs_url"` | |
| 222 | + BranchesURL string `json:"branches_url"` | |
| 223 | + CloneURL string `json:"clone_url"` | |
| 224 | + CollaboratorsURL string `json:"collaborators_url"` | |
| 225 | + CommentsURL string `json:"comments_url"` | |
| 226 | + CommitsURL string `json:"commits_url"` | |
| 227 | + CompareURL string `json:"compare_url"` | |
| 228 | + ContentsURL string `json:"contents_url"` | |
| 229 | + ContributorsURL string `json:"contributors_url"` | |
| 230 | + CreatedAt time.Time `json:"created_at"` | |
| 231 | + DefaultBranch string `json:"default_branch"` | |
| 232 | + DeploymentsURL string `json:"deployments_url"` | |
| 233 | + Description string `json:"description"` | |
| 234 | + DownloadsURL string `json:"downloads_url"` | |
| 235 | + EventsURL string `json:"events_url"` | |
| 236 | + Fork bool `json:"fork"` | |
| 237 | + Forks int64 `json:"forks"` | |
| 238 | + ForksCount int64 `json:"forks_count"` | |
| 239 | + ForksURL string `json:"forks_url"` | |
| 240 | + FullName string `json:"full_name"` | |
| 241 | + GitCommitsURL string `json:"git_commits_url"` | |
| 242 | + GitRefsURL string `json:"git_refs_url"` | |
| 243 | + GitTagsURL string `json:"git_tags_url"` | |
| 244 | + GitURL string `json:"git_url"` | |
| 245 | + HTMLURL string `json:"html_url"` | |
| 246 | + HasDownloads bool `json:"has_downloads"` | |
| 247 | + HasIssues bool `json:"has_issues"` | |
| 248 | + HasPages bool `json:"has_pages"` | |
| 249 | + HasProjects bool `json:"has_projects"` | |
| 250 | + HasWiki bool `json:"has_wiki"` | |
| 251 | + Homepage string `json:"homepage"` | |
| 252 | + HooksURL string `json:"hooks_url"` | |
| 253 | + ID int64 `json:"id"` | |
| 254 | + IssueCommentURL string `json:"issue_comment_url"` | |
| 255 | + IssueEventsURL string `json:"issue_events_url"` | |
| 256 | + IssuesURL string `json:"issues_url"` | |
| 257 | + KeysURL string `json:"keys_url"` | |
| 258 | + LabelsURL string `json:"labels_url"` | |
| 259 | + Language string `json:"language"` | |
| 260 | + LanguagesURL string `json:"languages_url"` | |
| 261 | + MergesURL string `json:"merges_url"` | |
| 262 | + MilestonesURL string `json:"milestones_url"` | |
| 263 | + MirrorURL interface{} `json:"mirror_url"` | |
| 264 | + Name string `json:"name"` | |
| 265 | + NotificationsURL string `json:"notifications_url"` | |
| 266 | + OpenIssues int64 `json:"open_issues"` | |
| 267 | + OpenIssuesCount int64 `json:"open_issues_count"` | |
| 268 | + Owner UserClass `json:"owner"` | |
| 269 | + Private bool `json:"private"` | |
| 270 | + PullsURL string `json:"pulls_url"` | |
| 271 | + PushedAt time.Time `json:"pushed_at"` | |
| 272 | + ReleasesURL string `json:"releases_url"` | |
| 273 | + SSHURL string `json:"ssh_url"` | |
| 274 | + Size int64 `json:"size"` | |
| 275 | + StargazersCount int64 `json:"stargazers_count"` | |
| 276 | + StargazersURL string `json:"stargazers_url"` | |
| 277 | + StatusesURL string `json:"statuses_url"` | |
| 278 | + SubscribersURL string `json:"subscribers_url"` | |
| 279 | + SubscriptionURL string `json:"subscription_url"` | |
| 280 | + SvnURL string `json:"svn_url"` | |
| 281 | + TagsURL string `json:"tags_url"` | |
| 282 | + TeamsURL string `json:"teams_url"` | |
| 283 | + TreesURL string `json:"trees_url"` | |
| 284 | + URL string `json:"url"` | |
| 285 | + UpdatedAt time.Time `json:"updated_at"` | |
| 286 | + Watchers int64 `json:"watchers"` | |
| 287 | + WatchersCount int64 `json:"watchers_count"` | |
| 288 | +} | |
| 289 | + | |
| 290 | +type Links struct { | |
| 291 | + Comments Comments `json:"comments"` | |
| 292 | + Commits Comments `json:"commits"` | |
| 293 | + HTML Comments `json:"html"` | |
| 294 | + Issue Comments `json:"issue"` | |
| 295 | + ReviewComment Comments `json:"review_comment"` | |
| 296 | + ReviewComments Comments `json:"review_comments"` | |
| 297 | + Self Comments `json:"self"` | |
| 298 | + Statuses Comments `json:"statuses"` | |
| 299 | +} | |
| 300 | + | |
| 301 | +type Comments struct { | |
| 302 | + Href string `json:"href"` | |
| 303 | +} | |
| 304 | + | |
| 305 | +type TopLevelRepo struct { | |
| 306 | + ID int64 `json:"id"` | |
| 307 | + Name string `json:"name"` | |
| 308 | + URL string `json:"url"` | |
| 309 | +} | |
| 310 | + | |
| 311 | +type Type string | |
| 312 | + | |
| 313 | +const ( | |
| 314 | + User Type = "User" | |
| 315 | + Organization Type = "Organization" | |
| 316 | +) |
Test case
1 generated file · +17 −17test/inputs/json/samples/pokedex.json
Mgolangdefault / quicktype.go+17 −17
| @@ -23,23 +23,23 @@ type TopLevel struct { | ||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | type Pokemon struct { |
| 26 | - AvgSpawns float64 `json:"avg_spawns"` | |
| 27 | - Candy string `json:"candy"` | |
| 28 | - CandyCount *int64 `json:"candy_count,omitempty"` | |
| 29 | - Egg Egg `json:"egg"` | |
| 30 | - Height string `json:"height"` | |
| 31 | - ID int64 `json:"id"` | |
| 32 | - Img string `json:"img"` | |
| 33 | - Multipliers []float64 `json:"multipliers"` | |
| 34 | - Name string `json:"name"` | |
| 35 | - NextEvolution []Evolution `json:"next_evolution,omitempty"` | |
| 36 | - Num string `json:"num"` | |
| 37 | - PrevEvolution []Evolution `json:"prev_evolution,omitempty"` | |
| 38 | - SpawnChance float64 `json:"spawn_chance"` | |
| 39 | - SpawnTime string `json:"spawn_time"` | |
| 40 | - Type []Type `json:"type"` | |
| 41 | - Weaknesses []Type `json:"weaknesses"` | |
| 42 | - Weight string `json:"weight"` | |
| 26 | + AvgSpawns float64 `json:"avg_spawns"` | |
| 27 | + Candy string `json:"candy"` | |
| 28 | + CandyCount *int64 `json:"candy_count,omitempty"` | |
| 29 | + Egg Egg `json:"egg"` | |
| 30 | + Height string `json:"height"` | |
| 31 | + ID int64 `json:"id"` | |
| 32 | + Img string `json:"img"` | |
| 33 | + Multipliers []float64 `json:"multipliers"` | |
| 34 | + Name string `json:"name"` | |
| 35 | + NextEvolution *[]Evolution `json:"next_evolution,omitempty"` | |
| 36 | + Num string `json:"num"` | |
| 37 | + PrevEvolution *[]Evolution `json:"prev_evolution,omitempty"` | |
| 38 | + SpawnChance float64 `json:"spawn_chance"` | |
| 39 | + SpawnTime string `json:"spawn_time"` | |
| 40 | + Type []Type `json:"type"` | |
| 41 | + Weaknesses []Type `json:"weaknesses"` | |
| 42 | + Weight string `json:"weight"` | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | type Evolution struct { |
Test case
1 generated file · +2 −2test/inputs/schema/bool-string.schema
Mschema-golangdefault / quicktype.go+2 −2
| @@ -22,8 +22,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - ArrNullable []*string `json:"arrNullable,omitempty"` | |
| 26 | - ArrOne []string `json:"arrOne,omitempty"` | |
| 25 | + ArrNullable *[]*string `json:"arrNullable,omitempty"` | |
| 26 | + ArrOne *[]string `json:"arrOne,omitempty"` | |
| 27 | 27 | Nullable *string `json:"nullable"` |
| 28 | 28 | One string `json:"one"` |
| 29 | 29 | Optional *string `json:"optional,omitempty"` |
Test case
1 generated file · +1 −1test/inputs/schema/class-map-union.schema
Mschema-golangdefault / quicktype.go+1 −1
| @@ -22,7 +22,7 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - Union map[string]*UnionValue `json:"union,omitempty"` | |
| 25 | + Union *map[string]*UnionValue `json:"union,omitempty"` | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | type UnionClass struct { |
Test case
1 generated file · +1 −1test/inputs/schema/class-with-additional.schema
Mschema-golangdefault / quicktype.go+1 −1
| @@ -22,7 +22,7 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - Map map[string]*Map `json:"map,omitempty"` | |
| 25 | + Map *map[string]*Map `json:"map,omitempty"` | |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | type Map struct { |
Test case
2 generated files · +10 −10test/inputs/schema/enum.schema
Mschema-golangdefault / quicktype.go+5 −5
| @@ -22,11 +22,11 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - Arr []Arr `json:"arr,omitempty"` | |
| 26 | - For *string `json:"for,omitempty"` | |
| 27 | - Gve Gve `json:"gve"` | |
| 28 | - Lvc *Lvc `json:"lvc,omitempty"` | |
| 29 | - OtherArr []OtherArr `json:"otherArr,omitempty"` | |
| 25 | + Arr *[]Arr `json:"arr,omitempty"` | |
| 26 | + For *string `json:"for,omitempty"` | |
| 27 | + Gve Gve `json:"gve"` | |
| 28 | + Lvc *Lvc `json:"lvc,omitempty"` | |
| 29 | + OtherArr *[]OtherArr `json:"otherArr,omitempty"` | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | type OtherArr string |
Mschema-golangenum-type-name-suffix-true--6270b65ee01d / quicktype.go+5 −5
| @@ -22,11 +22,11 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - Arr []Arr `json:"arr,omitempty"` | |
| 26 | - For *string `json:"for,omitempty"` | |
| 27 | - Gve Gve `json:"gve"` | |
| 28 | - Lvc *Lvc `json:"lvc,omitempty"` | |
| 29 | - OtherArr []OtherArr `json:"otherArr,omitempty"` | |
| 25 | + Arr *[]Arr `json:"arr,omitempty"` | |
| 26 | + For *string `json:"for,omitempty"` | |
| 27 | + Gve Gve `json:"gve"` | |
| 28 | + Lvc *Lvc `json:"lvc,omitempty"` | |
| 29 | + OtherArr *[]OtherArr `json:"otherArr,omitempty"` | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | type OtherArr string |
Test case
1 generated file · +2 −2test/inputs/schema/integer-string.schema
Mschema-golangdefault / quicktype.go+2 −2
| @@ -22,8 +22,8 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - ArrNullable []*string `json:"arrNullable,omitempty"` | |
| 26 | - ArrOne []string `json:"arrOne,omitempty"` | |
| 25 | + ArrNullable *[]*string `json:"arrNullable,omitempty"` | |
| 26 | + ArrOne *[]string `json:"arrOne,omitempty"` | |
| 27 | 27 | Nullable *string `json:"nullable"` |
| 28 | 28 | One string `json:"one"` |
| 29 | 29 | Optional *string `json:"optional,omitempty"` |
Test case
1 generated file · +7 −7test/inputs/schema/optional-const-ref.schema
Mschema-golangdefault / quicktype.go+7 −7
| @@ -19,13 +19,13 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Coordinates []Coordinate `json:"coordinates,omitempty"` | |
| 23 | - Count *int64 `json:"count,omitempty"` | |
| 24 | - Label *string `json:"label,omitempty"` | |
| 25 | - RequiredCoordinates []Coordinate `json:"requiredCoordinates"` | |
| 26 | - RequiredCount int64 `json:"requiredCount"` | |
| 27 | - RequiredLabel string `json:"requiredLabel"` | |
| 28 | - Weight *float64 `json:"weight,omitempty"` | |
| 22 | + Coordinates *[]Coordinate `json:"coordinates,omitempty"` | |
| 23 | + Count *int64 `json:"count,omitempty"` | |
| 24 | + Label *string `json:"label,omitempty"` | |
| 25 | + RequiredCoordinates []Coordinate `json:"requiredCoordinates"` | |
| 26 | + RequiredCount int64 `json:"requiredCount"` | |
| 27 | + RequiredLabel string `json:"requiredLabel"` | |
| 28 | + Weight *float64 `json:"weight,omitempty"` | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | type Coordinate struct { |
Test case
1 generated file · +30 −0test/inputs/schema/postman-collection.schema
Aschema-golangdefault / quicktype.go+30 −0
| @@ -0,0 +1,30 @@ | ||
| 1 | +// Code generated from JSON Schema using quicktype. DO NOT EDIT. | |
| 2 | +// To parse and unparse this JSON data, add this code to your project and do: | |
| 3 | +// | |
| 4 | +// topLevel, err := UnmarshalTopLevel(bytes) | |
| 5 | +// bytes, err = topLevel.Marshal() | |
| 6 | + | |
| 7 | +package main | |
| 8 | + | |
| 9 | +import "encoding/json" | |
| 10 | + | |
| 11 | +func UnmarshalTopLevel(data []byte) (TopLevel, error) { | |
| 12 | + var r TopLevel | |
| 13 | + err := json.Unmarshal(data, &r) | |
| 14 | + return r, err | |
| 15 | +} | |
| 16 | + | |
| 17 | +func (r *TopLevel) Marshal() ([]byte, error) { | |
| 18 | + return json.Marshal(r) | |
| 19 | +} | |
| 20 | + | |
| 21 | +// Postman collection | |
| 22 | +type TopLevel struct { | |
| 23 | + Item *[]TopLevel `json:"item,omitempty"` | |
| 24 | + Name *string `json:"name,omitempty"` | |
| 25 | + Response *[]Response `json:"response,omitempty"` | |
| 26 | +} | |
| 27 | + | |
| 28 | +type Response struct { | |
| 29 | + Body *string `json:"body,omitempty"` | |
| 30 | +} |
Test case
1 generated file · +12 −12test/inputs/schema/renaming-bug.schema
Mschema-golangdefault / quicktype.go+12 −12
| @@ -19,21 +19,21 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - Version *string `json:"version,omitempty"` | |
| 23 | - Fruits []Fruit `json:"fruits,omitempty"` | |
| 24 | - Vehicles []Vehicle `json:"vehicles,omitempty"` | |
| 22 | + Version *string `json:"version,omitempty"` | |
| 23 | + Fruits *[]Fruit `json:"fruits,omitempty"` | |
| 24 | + Vehicles *[]Vehicle `json:"vehicles,omitempty"` | |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | type Fruit struct { |
| 28 | - Apple *bool `json:"apple,omitempty"` | |
| 29 | - Berries []Berry `json:"berries,omitempty"` | |
| 30 | - Orange *bool `json:"orange,omitempty"` | |
| 28 | + Apple *bool `json:"apple,omitempty"` | |
| 29 | + Berries *[]Berry `json:"berries,omitempty"` | |
| 30 | + Orange *bool `json:"orange,omitempty"` | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | type Berry struct { |
| 34 | - Color *Color `json:"color,omitempty"` | |
| 35 | - Name *string `json:"name,omitempty"` | |
| 36 | - Shapes []Shape `json:"shapes,omitempty"` | |
| 34 | + Color *Color `json:"color,omitempty"` | |
| 35 | + Name *string `json:"name,omitempty"` | |
| 36 | + Shapes *[]Shape `json:"shapes,omitempty"` | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | type Color struct { |
| @@ -46,8 +46,8 @@ type Shape struct { | ||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | type Geometry struct { |
| 49 | - RectShape *RectShape `json:"rectShape,omitempty"` | |
| 50 | - CircularShape []CircularShape `json:"circularShape,omitempty"` | |
| 49 | + RectShape *RectShape `json:"rectShape,omitempty"` | |
| 50 | + CircularShape *[]CircularShape `json:"circularShape,omitempty"` | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | type CircularShape struct { |
| @@ -55,7 +55,7 @@ type CircularShape struct { | ||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | type RectShape struct { |
| 58 | - Parts []Part `json:"parts,omitempty"` | |
| 58 | + Parts *[]Part `json:"parts,omitempty"` | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | type Part struct { |
Test case
1 generated file · +3 −3test/inputs/schema/unevaluated-properties.schema
Mschema-golangdefault / quicktype.go+3 −3
| @@ -26,9 +26,9 @@ type TopLevel struct { | ||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | type Config struct { |
| 29 | - Closed *Closed `json:"closed"` | |
| 30 | - Name *string `json:"name,omitempty"` | |
| 31 | - Settings map[string][]Item `json:"settings,omitempty"` | |
| 29 | + Closed *Closed `json:"closed"` | |
| 30 | + Name *string `json:"name,omitempty"` | |
| 31 | + Settings *map[string][]Item `json:"settings,omitempty"` | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | type ClosedClass struct { |
Test case
1 generated file · +6 −6test/inputs/schema/uuid.schema
Mschema-golangdefault / quicktype.go+6 −6
| @@ -19,10 +19,10 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | type TopLevel struct { |
| 22 | - ArrNullable []*string `json:"arrNullable,omitempty"` | |
| 23 | - ArrOne []string `json:"arrOne,omitempty"` | |
| 24 | - Nullable *string `json:"nullable"` | |
| 25 | - One string `json:"one"` | |
| 26 | - Optional *string `json:"optional,omitempty"` | |
| 27 | - UnionWithEnum string `json:"unionWithEnum"` | |
| 22 | + ArrNullable *[]*string `json:"arrNullable,omitempty"` | |
| 23 | + ArrOne *[]string `json:"arrOne,omitempty"` | |
| 24 | + Nullable *string `json:"nullable"` | |
| 25 | + One string `json:"one"` | |
| 26 | + Optional *string `json:"optional,omitempty"` | |
| 27 | + UnionWithEnum string `json:"unionWithEnum"` | |
| 28 | 28 | } |
Test case
1 generated file · +727 −727test/inputs/schema/vega-lite.schema
Mschema-golangdefault / quicktype.go+727 −727
| @@ -22,123 +22,123 @@ func (r *TopLevel) Marshal() ([]byte, error) { | ||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | type TopLevel struct { |
| 25 | - // URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you | |
| 26 | - // have a reason to change this, use `https://vega.github.io/schema/vega-lite/v2.json`. | |
| 27 | - // Setting the `$schema` property allows automatic validation and autocomplete in editors | |
| 28 | - // that support JSON schema. | |
| 29 | - Schema *string `json:"$schema,omitempty"` | |
| 30 | - // Sets how the visualization size should be determined. If a string, should be one of | |
| 31 | - // `"pad"`, `"fit"` or `"none"`. | |
| 32 | - // Object values can additionally specify parameters for content sizing and automatic | |
| 33 | - // resizing. | |
| 34 | - // `"fit"` is only supported for single and layered views that don't use `rangeStep`. | |
| 35 | - // | |
| 36 | - // __Default value__: `pad` | |
| 37 | - Autosize *Autosize `json:"autosize"` | |
| 38 | - // CSS color property to use as the background of visualization. | |
| 39 | - // | |
| 40 | - // __Default value:__ none (transparent) | |
| 41 | - Background *string `json:"background,omitempty"` | |
| 42 | - // Vega-Lite configuration object. This property can only be defined at the top-level of a | |
| 43 | - // specification. | |
| 44 | - Config *Config `json:"config,omitempty"` | |
| 45 | - // An object describing the data source | |
| 46 | - Data *Data `json:"data,omitempty"` | |
| 47 | - // Description of this mark for commenting purpose. | |
| 48 | - Description *string `json:"description,omitempty"` | |
| 49 | - // A key-value mapping between encoding channels and definition of fields. | |
| 50 | - Encoding *EncodingWithFacet `json:"encoding,omitempty"` | |
| 51 | - // The height of a visualization. | |
| 52 | - // | |
| 53 | - // __Default value:__ | |
| 54 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 55 | - // [continuous scale](scale.html#continuous), the height will be the value of | |
| 56 | - // [`config.view.height`](spec.html#config). | |
| 57 | - // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 58 | - // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 59 | - // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 60 | - // `rangeStep` is `null`, the height will be the value of | |
| 61 | - // [`config.view.height`](spec.html#config). | |
| 62 | - // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 63 | - // | |
| 64 | - // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 65 | - // represents the height of a single view. | |
| 66 | - // | |
| 67 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 68 | - Height *float64 `json:"height,omitempty"` | |
| 69 | - // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 70 | - // `"line"`, | |
| 71 | - // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 72 | - // object](mark.html#mark-def). | |
| 73 | - Mark *AnyMark `json:"mark"` | |
| 74 | - // Name of the visualization for later reference. | |
| 75 | - Name *string `json:"name,omitempty"` | |
| 76 | - // The default visualization padding, in pixels, from the edge of the visualization canvas | |
| 77 | - // to the data rectangle. If a number, specifies padding for all sides. | |
| 78 | - // If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, | |
| 79 | - // "bottom": 5}` to specify padding for each side of the visualization. | |
| 80 | - // | |
| 81 | - // __Default value__: `5` | |
| 82 | - Padding *Padding `json:"padding"` | |
| 83 | - // An object defining properties of geographic projection. | |
| 84 | - // | |
| 85 | - // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 86 | - // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 87 | - Projection *Projection `json:"projection,omitempty"` | |
| 88 | - // A key-value mapping between selection names and definitions. | |
| 89 | - Selection map[string]SelectionDef `json:"selection,omitempty"` | |
| 90 | - // Title for the plot. | |
| 91 | - Title *Title `json:"title"` | |
| 92 | - // An array of data transformations such as filter and new field calculation. | |
| 93 | - Transform []Transform `json:"transform,omitempty"` | |
| 94 | - // The width of a visualization. | |
| 95 | - // | |
| 96 | - // __Default value:__ This will be determined by the following rules: | |
| 97 | - // | |
| 98 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 99 | - // [continuous scale](scale.html#continuous), the width will be the value of | |
| 100 | - // [`config.view.width`](spec.html#config). | |
| 101 | - // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 102 | - // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 103 | - // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 104 | - // `rangeStep` is `null`, the width will be the value of | |
| 105 | - // [`config.view.width`](spec.html#config). | |
| 106 | - // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 107 | - // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 108 | - // the value of `rangeStep` for other marks. | |
| 109 | - // | |
| 110 | - // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 111 | - // represents the width of a single view. | |
| 112 | - // | |
| 113 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 114 | - Width *float64 `json:"width,omitempty"` | |
| 115 | - // Layer or single view specifications to be layered. | |
| 116 | - // | |
| 117 | - // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 118 | - // layering facet specifications is not allowed. | |
| 119 | - Layer []LayerSpec `json:"layer,omitempty"` | |
| 120 | - // Scale, axis, and legend resolutions for layers. | |
| 121 | - // | |
| 122 | - // Scale, axis, and legend resolutions for facets. | |
| 123 | - // | |
| 124 | - // Scale and legend resolutions for repeated charts. | |
| 125 | - // | |
| 126 | - // Scale, axis, and legend resolutions for vertically concatenated charts. | |
| 127 | - // | |
| 128 | - // Scale, axis, and legend resolutions for horizontally concatenated charts. | |
| 129 | - Resolve *Resolve `json:"resolve,omitempty"` | |
| 130 | - // An object that describes mappings between `row` and `column` channels and their field | |
| 131 | - // definitions. | |
| 132 | - Facet *FacetMapping `json:"facet,omitempty"` | |
| 133 | - // A specification of the view that gets faceted. | |
| 134 | - Spec *Spec `json:"spec,omitempty"` | |
| 135 | - // An object that describes what fields should be repeated into views that are laid out as a | |
| 136 | - // `row` or `column`. | |
| 137 | - Repeat *Repeat `json:"repeat,omitempty"` | |
| 138 | - // A list of views that should be concatenated and put into a column. | |
| 139 | - Vconcat []Spec `json:"vconcat,omitempty"` | |
| 140 | - // A list of views that should be concatenated and put into a row. | |
| 141 | - Hconcat []Spec `json:"hconcat,omitempty"` | |
| 25 | + // URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you | |
| 26 | + // have a reason to change this, use `https://vega.github.io/schema/vega-lite/v2.json`. | |
| 27 | + // Setting the `$schema` property allows automatic validation and autocomplete in editors | |
| 28 | + // that support JSON schema. | |
| 29 | + Schema *string `json:"$schema,omitempty"` | |
| 30 | + // Sets how the visualization size should be determined. If a string, should be one of | |
| 31 | + // `"pad"`, `"fit"` or `"none"`. | |
| 32 | + // Object values can additionally specify parameters for content sizing and automatic | |
| 33 | + // resizing. | |
| 34 | + // `"fit"` is only supported for single and layered views that don't use `rangeStep`. | |
| 35 | + // | |
| 36 | + // __Default value__: `pad` | |
| 37 | + Autosize *Autosize `json:"autosize"` | |
| 38 | + // CSS color property to use as the background of visualization. | |
| 39 | + // | |
| 40 | + // __Default value:__ none (transparent) | |
| 41 | + Background *string `json:"background,omitempty"` | |
| 42 | + // Vega-Lite configuration object. This property can only be defined at the top-level of a | |
| 43 | + // specification. | |
| 44 | + Config *Config `json:"config,omitempty"` | |
| 45 | + // An object describing the data source | |
| 46 | + Data *Data `json:"data,omitempty"` | |
| 47 | + // Description of this mark for commenting purpose. | |
| 48 | + Description *string `json:"description,omitempty"` | |
| 49 | + // A key-value mapping between encoding channels and definition of fields. | |
| 50 | + Encoding *EncodingWithFacet `json:"encoding,omitempty"` | |
| 51 | + // The height of a visualization. | |
| 52 | + // | |
| 53 | + // __Default value:__ | |
| 54 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 55 | + // [continuous scale](scale.html#continuous), the height will be the value of | |
| 56 | + // [`config.view.height`](spec.html#config). | |
| 57 | + // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 58 | + // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 59 | + // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 60 | + // `rangeStep` is `null`, the height will be the value of | |
| 61 | + // [`config.view.height`](spec.html#config). | |
| 62 | + // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 63 | + // | |
| 64 | + // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 65 | + // represents the height of a single view. | |
| 66 | + // | |
| 67 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 68 | + Height *float64 `json:"height,omitempty"` | |
| 69 | + // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 70 | + // `"line"`, | |
| 71 | + // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 72 | + // object](mark.html#mark-def). | |
| 73 | + Mark *AnyMark `json:"mark"` | |
| 74 | + // Name of the visualization for later reference. | |
| 75 | + Name *string `json:"name,omitempty"` | |
| 76 | + // The default visualization padding, in pixels, from the edge of the visualization canvas | |
| 77 | + // to the data rectangle. If a number, specifies padding for all sides. | |
| 78 | + // If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, | |
| 79 | + // "bottom": 5}` to specify padding for each side of the visualization. | |
| 80 | + // | |
| 81 | + // __Default value__: `5` | |
| 82 | + Padding *Padding `json:"padding"` | |
| 83 | + // An object defining properties of geographic projection. | |
| 84 | + // | |
| 85 | + // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 86 | + // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 87 | + Projection *Projection `json:"projection,omitempty"` | |
| 88 | + // A key-value mapping between selection names and definitions. | |
| 89 | + Selection *map[string]SelectionDef `json:"selection,omitempty"` | |
| 90 | + // Title for the plot. | |
| 91 | + Title *Title `json:"title"` | |
| 92 | + // An array of data transformations such as filter and new field calculation. | |
| 93 | + Transform *[]Transform `json:"transform,omitempty"` | |
| 94 | + // The width of a visualization. | |
| 95 | + // | |
| 96 | + // __Default value:__ This will be determined by the following rules: | |
| 97 | + // | |
| 98 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 99 | + // [continuous scale](scale.html#continuous), the width will be the value of | |
| 100 | + // [`config.view.width`](spec.html#config). | |
| 101 | + // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 102 | + // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 103 | + // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 104 | + // `rangeStep` is `null`, the width will be the value of | |
| 105 | + // [`config.view.width`](spec.html#config). | |
| 106 | + // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 107 | + // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 108 | + // the value of `rangeStep` for other marks. | |
| 109 | + // | |
| 110 | + // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 111 | + // represents the width of a single view. | |
| 112 | + // | |
| 113 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 114 | + Width *float64 `json:"width,omitempty"` | |
| 115 | + // Layer or single view specifications to be layered. | |
| 116 | + // | |
| 117 | + // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 118 | + // layering facet specifications is not allowed. | |
| 119 | + Layer *[]LayerSpec `json:"layer,omitempty"` | |
| 120 | + // Scale, axis, and legend resolutions for layers. | |
| 121 | + // | |
| 122 | + // Scale, axis, and legend resolutions for facets. | |
| 123 | + // | |
| 124 | + // Scale and legend resolutions for repeated charts. | |
| 125 | + // | |
| 126 | + // Scale, axis, and legend resolutions for vertically concatenated charts. | |
| 127 | + // | |
| 128 | + // Scale, axis, and legend resolutions for horizontally concatenated charts. | |
| 129 | + Resolve *Resolve `json:"resolve,omitempty"` | |
| 130 | + // An object that describes mappings between `row` and `column` channels and their field | |
| 131 | + // definitions. | |
| 132 | + Facet *FacetMapping `json:"facet,omitempty"` | |
| 133 | + // A specification of the view that gets faceted. | |
| 134 | + Spec *Spec `json:"spec,omitempty"` | |
| 135 | + // An object that describes what fields should be repeated into views that are laid out as a | |
| 136 | + // `row` or `column`. | |
| 137 | + Repeat *Repeat `json:"repeat,omitempty"` | |
| 138 | + // A list of views that should be concatenated and put into a column. | |
| 139 | + Vconcat *[]Spec `json:"vconcat,omitempty"` | |
| 140 | + // A list of views that should be concatenated and put into a row. | |
| 141 | + Hconcat *[]Spec `json:"hconcat,omitempty"` | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | type AutoSizeParams struct { |
| @@ -166,125 +166,125 @@ type AutoSizeParams struct { | ||
| 166 | 166 | // Vega-Lite configuration object. This property can only be defined at the top-level of a |
| 167 | 167 | // specification. |
| 168 | 168 | type Config struct { |
| 169 | - // Area-Specific Config | |
| 170 | - Area *MarkConfig `json:"area,omitempty"` | |
| 171 | - // Sets how the visualization size should be determined. If a string, should be one of | |
| 172 | - // `"pad"`, `"fit"` or `"none"`. | |
| 173 | - // Object values can additionally specify parameters for content sizing and automatic | |
| 174 | - // resizing. | |
| 175 | - // `"fit"` is only supported for single and layered views that don't use `rangeStep`. | |
| 176 | - // | |
| 177 | - // __Default value__: `pad` | |
| 178 | - Autosize *Autosize `json:"autosize"` | |
| 179 | - // Axis configuration, which determines default properties for all `x` and `y` | |
| 180 | - // [axes](axis.html). For a full list of axis configuration options, please see the | |
| 181 | - // [corresponding section of the axis documentation](axis.html#config). | |
| 182 | - Axis *AxisConfig `json:"axis,omitempty"` | |
| 183 | - // Specific axis config for axes with "band" scales. | |
| 184 | - AxisBand *VGAxisConfig `json:"axisBand,omitempty"` | |
| 185 | - // Specific axis config for x-axis along the bottom edge of the chart. | |
| 186 | - AxisBottom *VGAxisConfig `json:"axisBottom,omitempty"` | |
| 187 | - // Specific axis config for y-axis along the left edge of the chart. | |
| 188 | - AxisLeft *VGAxisConfig `json:"axisLeft,omitempty"` | |
| 189 | - // Specific axis config for y-axis along the right edge of the chart. | |
| 190 | - AxisRight *VGAxisConfig `json:"axisRight,omitempty"` | |
| 191 | - // Specific axis config for x-axis along the top edge of the chart. | |
| 192 | - AxisTop *VGAxisConfig `json:"axisTop,omitempty"` | |
| 193 | - // X-axis specific config. | |
| 194 | - AxisX *VGAxisConfig `json:"axisX,omitempty"` | |
| 195 | - // Y-axis specific config. | |
| 196 | - AxisY *VGAxisConfig `json:"axisY,omitempty"` | |
| 197 | - // CSS color property to use as the background of visualization. | |
| 198 | - // | |
| 199 | - // __Default value:__ none (transparent) | |
| 200 | - Background *string `json:"background,omitempty"` | |
| 201 | - // Bar-Specific Config | |
| 202 | - Bar *BarConfig `json:"bar,omitempty"` | |
| 203 | - // Circle-Specific Config | |
| 204 | - Circle *MarkConfig `json:"circle,omitempty"` | |
| 205 | - // Default axis and legend title for count fields. | |
| 206 | - // | |
| 207 | - // __Default value:__ `'Number of Records'`. | |
| 208 | - CountTitle *string `json:"countTitle,omitempty"` | |
| 209 | - // Defines how Vega-Lite generates title for fields. There are three possible styles: | |
| 210 | - // | |
| 211 | - // - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field", | |
| 212 | - // "Year-month of date", "field (binned)"). | |
| 213 | - // - `"function"` - displays function using parentheses and capitalized texts (e.g., | |
| 214 | - // "SUM(field)", "YEARMONTH(date)", "BIN(field)"). | |
| 215 | - // - `"plain"` - displays only the field name without functions (e.g., "field", "date", | |
| 216 | - // "field"). | |
| 217 | - FieldTitle *FieldTitle `json:"fieldTitle,omitempty"` | |
| 218 | - // Geoshape-Specific Config | |
| 219 | - Geoshape *MarkConfig `json:"geoshape,omitempty"` | |
| 220 | - // Defines how Vega-Lite should handle invalid values (`null` and `NaN`). | |
| 221 | - // - If set to `"filter"` (default), all data items with null values are filtered. | |
| 222 | - // - If `null`, all data items are included. In this case, invalid values will be | |
| 223 | - // interpreted as zeroes. | |
| 224 | - InvalidValues *InvalidValues `json:"invalidValues,omitempty"` | |
| 225 | - // Legend configuration, which determines default properties for all [legends](legend.html). | |
| 226 | - // For a full list of legend configuration options, please see the [corresponding section of | |
| 227 | - // in the legend documentation](legend.html#config). | |
| 228 | - Legend *LegendConfig `json:"legend,omitempty"` | |
| 229 | - // Line-Specific Config | |
| 230 | - Line *MarkConfig `json:"line,omitempty"` | |
| 231 | - // Mark Config | |
| 232 | - Mark *MarkConfig `json:"mark,omitempty"` | |
| 233 | - // D3 Number format for axis labels and text tables. For example "s" for SI units. Use [D3's | |
| 234 | - // number format pattern](https://github.com/d3/d3-format#locale_format). | |
| 235 | - NumberFormat *string `json:"numberFormat,omitempty"` | |
| 236 | - // The default visualization padding, in pixels, from the edge of the visualization canvas | |
| 237 | - // to the data rectangle. If a number, specifies padding for all sides. | |
| 238 | - // If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, | |
| 239 | - // "bottom": 5}` to specify padding for each side of the visualization. | |
| 240 | - // | |
| 241 | - // __Default value__: `5` | |
| 242 | - Padding *Padding `json:"padding"` | |
| 243 | - // Point-Specific Config | |
| 244 | - Point *MarkConfig `json:"point,omitempty"` | |
| 245 | - // Projection configuration, which determines default properties for all | |
| 246 | - // [projections](projection.html). For a full list of projection configuration options, | |
| 247 | - // please see the [corresponding section of the projection | |
| 248 | - // documentation](projection.html#config). | |
| 249 | - Projection *ProjectionConfig `json:"projection,omitempty"` | |
| 250 | - // An object hash that defines default range arrays or schemes for using with scales. | |
| 251 | - // For a full list of scale range configuration options, please see the [corresponding | |
| 252 | - // section of the scale documentation](scale.html#config). | |
| 253 | - Range map[string]*RangeConfigValue `json:"range,omitempty"` | |
| 254 | - // Rect-Specific Config | |
| 255 | - Rect *MarkConfig `json:"rect,omitempty"` | |
| 256 | - // Rule-Specific Config | |
| 257 | - Rule *MarkConfig `json:"rule,omitempty"` | |
| 258 | - // Scale configuration determines default properties for all [scales](scale.html). For a | |
| 259 | - // full list of scale configuration options, please see the [corresponding section of the | |
| 260 | - // scale documentation](scale.html#config). | |
| 261 | - Scale *ScaleConfig `json:"scale,omitempty"` | |
| 262 | - // An object hash for defining default properties for each type of selections. | |
| 263 | - Selection *SelectionConfig `json:"selection,omitempty"` | |
| 264 | - // Square-Specific Config | |
| 265 | - Square *MarkConfig `json:"square,omitempty"` | |
| 266 | - // Default stack offset for stackable mark. | |
| 267 | - Stack *StackOffset `json:"stack,omitempty"` | |
| 268 | - // An object hash that defines key-value mappings to determine default properties for marks | |
| 269 | - // with a given [style](mark.html#mark-def). The keys represent styles names; the value are | |
| 270 | - // valid [mark configuration objects](mark.html#config). | |
| 271 | - Style map[string]VGMarkConfig `json:"style,omitempty"` | |
| 272 | - // Text-Specific Config | |
| 273 | - Text *TextConfig `json:"text,omitempty"` | |
| 274 | - // Tick-Specific Config | |
| 275 | - Tick *TickConfig `json:"tick,omitempty"` | |
| 276 | - // Default datetime format for axis and legend labels. The format can be set directly on | |
| 277 | - // each axis and legend. Use [D3's time format | |
| 278 | - // pattern](https://github.com/d3/d3-time-format#locale_format). | |
| 279 | - // | |
| 280 | - // __Default value:__ `'%b %d, %Y'`. | |
| 281 | - TimeFormat *string `json:"timeFormat,omitempty"` | |
| 282 | - // Title configuration, which determines default properties for all [titles](title.html). | |
| 283 | - // For a full list of title configuration options, please see the [corresponding section of | |
| 284 | - // the title documentation](title.html#config). | |
| 285 | - Title *VGTitleConfig `json:"title,omitempty"` | |
| 286 | - // Default properties for [single view plots](spec.html#single). | |
| 287 | - View *ViewConfig `json:"view,omitempty"` | |
| 169 | + // Area-Specific Config | |
| 170 | + Area *MarkConfig `json:"area,omitempty"` | |
| 171 | + // Sets how the visualization size should be determined. If a string, should be one of | |
| 172 | + // `"pad"`, `"fit"` or `"none"`. | |
| 173 | + // Object values can additionally specify parameters for content sizing and automatic | |
| 174 | + // resizing. | |
| 175 | + // `"fit"` is only supported for single and layered views that don't use `rangeStep`. | |
| 176 | + // | |
| 177 | + // __Default value__: `pad` | |
| 178 | + Autosize *Autosize `json:"autosize"` | |
| 179 | + // Axis configuration, which determines default properties for all `x` and `y` | |
| 180 | + // [axes](axis.html). For a full list of axis configuration options, please see the | |
| 181 | + // [corresponding section of the axis documentation](axis.html#config). | |
| 182 | + Axis *AxisConfig `json:"axis,omitempty"` | |
| 183 | + // Specific axis config for axes with "band" scales. | |
| 184 | + AxisBand *VGAxisConfig `json:"axisBand,omitempty"` | |
| 185 | + // Specific axis config for x-axis along the bottom edge of the chart. | |
| 186 | + AxisBottom *VGAxisConfig `json:"axisBottom,omitempty"` | |
| 187 | + // Specific axis config for y-axis along the left edge of the chart. | |
| 188 | + AxisLeft *VGAxisConfig `json:"axisLeft,omitempty"` | |
| 189 | + // Specific axis config for y-axis along the right edge of the chart. | |
| 190 | + AxisRight *VGAxisConfig `json:"axisRight,omitempty"` | |
| 191 | + // Specific axis config for x-axis along the top edge of the chart. | |
| 192 | + AxisTop *VGAxisConfig `json:"axisTop,omitempty"` | |
| 193 | + // X-axis specific config. | |
| 194 | + AxisX *VGAxisConfig `json:"axisX,omitempty"` | |
| 195 | + // Y-axis specific config. | |
| 196 | + AxisY *VGAxisConfig `json:"axisY,omitempty"` | |
| 197 | + // CSS color property to use as the background of visualization. | |
| 198 | + // | |
| 199 | + // __Default value:__ none (transparent) | |
| 200 | + Background *string `json:"background,omitempty"` | |
| 201 | + // Bar-Specific Config | |
| 202 | + Bar *BarConfig `json:"bar,omitempty"` | |
| 203 | + // Circle-Specific Config | |
| 204 | + Circle *MarkConfig `json:"circle,omitempty"` | |
| 205 | + // Default axis and legend title for count fields. | |
| 206 | + // | |
| 207 | + // __Default value:__ `'Number of Records'`. | |
| 208 | + CountTitle *string `json:"countTitle,omitempty"` | |
| 209 | + // Defines how Vega-Lite generates title for fields. There are three possible styles: | |
| 210 | + // | |
| 211 | + // - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field", | |
| 212 | + // "Year-month of date", "field (binned)"). | |
| 213 | + // - `"function"` - displays function using parentheses and capitalized texts (e.g., | |
| 214 | + // "SUM(field)", "YEARMONTH(date)", "BIN(field)"). | |
| 215 | + // - `"plain"` - displays only the field name without functions (e.g., "field", "date", | |
| 216 | + // "field"). | |
| 217 | + FieldTitle *FieldTitle `json:"fieldTitle,omitempty"` | |
| 218 | + // Geoshape-Specific Config | |
| 219 | + Geoshape *MarkConfig `json:"geoshape,omitempty"` | |
| 220 | + // Defines how Vega-Lite should handle invalid values (`null` and `NaN`). | |
| 221 | + // - If set to `"filter"` (default), all data items with null values are filtered. | |
| 222 | + // - If `null`, all data items are included. In this case, invalid values will be | |
| 223 | + // interpreted as zeroes. | |
| 224 | + InvalidValues *InvalidValues `json:"invalidValues,omitempty"` | |
| 225 | + // Legend configuration, which determines default properties for all [legends](legend.html). | |
| 226 | + // For a full list of legend configuration options, please see the [corresponding section of | |
| 227 | + // in the legend documentation](legend.html#config). | |
| 228 | + Legend *LegendConfig `json:"legend,omitempty"` | |
| 229 | + // Line-Specific Config | |
| 230 | + Line *MarkConfig `json:"line,omitempty"` | |
| 231 | + // Mark Config | |
| 232 | + Mark *MarkConfig `json:"mark,omitempty"` | |
| 233 | + // D3 Number format for axis labels and text tables. For example "s" for SI units. Use [D3's | |
| 234 | + // number format pattern](https://github.com/d3/d3-format#locale_format). | |
| 235 | + NumberFormat *string `json:"numberFormat,omitempty"` | |
| 236 | + // The default visualization padding, in pixels, from the edge of the visualization canvas | |
| 237 | + // to the data rectangle. If a number, specifies padding for all sides. | |
| 238 | + // If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, | |
| 239 | + // "bottom": 5}` to specify padding for each side of the visualization. | |
| 240 | + // | |
| 241 | + // __Default value__: `5` | |
| 242 | + Padding *Padding `json:"padding"` | |
| 243 | + // Point-Specific Config | |
| 244 | + Point *MarkConfig `json:"point,omitempty"` | |
| 245 | + // Projection configuration, which determines default properties for all | |
| 246 | + // [projections](projection.html). For a full list of projection configuration options, | |
| 247 | + // please see the [corresponding section of the projection | |
| 248 | + // documentation](projection.html#config). | |
| 249 | + Projection *ProjectionConfig `json:"projection,omitempty"` | |
| 250 | + // An object hash that defines default range arrays or schemes for using with scales. | |
| 251 | + // For a full list of scale range configuration options, please see the [corresponding | |
| 252 | + // section of the scale documentation](scale.html#config). | |
| 253 | + Range *map[string]*RangeConfigValue `json:"range,omitempty"` | |
| 254 | + // Rect-Specific Config | |
| 255 | + Rect *MarkConfig `json:"rect,omitempty"` | |
| 256 | + // Rule-Specific Config | |
| 257 | + Rule *MarkConfig `json:"rule,omitempty"` | |
| 258 | + // Scale configuration determines default properties for all [scales](scale.html). For a | |
| 259 | + // full list of scale configuration options, please see the [corresponding section of the | |
| 260 | + // scale documentation](scale.html#config). | |
| 261 | + Scale *ScaleConfig `json:"scale,omitempty"` | |
| 262 | + // An object hash for defining default properties for each type of selections. | |
| 263 | + Selection *SelectionConfig `json:"selection,omitempty"` | |
| 264 | + // Square-Specific Config | |
| 265 | + Square *MarkConfig `json:"square,omitempty"` | |
| 266 | + // Default stack offset for stackable mark. | |
| 267 | + Stack *StackOffset `json:"stack,omitempty"` | |
| 268 | + // An object hash that defines key-value mappings to determine default properties for marks | |
| 269 | + // with a given [style](mark.html#mark-def). The keys represent styles names; the value are | |
| 270 | + // valid [mark configuration objects](mark.html#config). | |
| 271 | + Style *map[string]VGMarkConfig `json:"style,omitempty"` | |
| 272 | + // Text-Specific Config | |
| 273 | + Text *TextConfig `json:"text,omitempty"` | |
| 274 | + // Tick-Specific Config | |
| 275 | + Tick *TickConfig `json:"tick,omitempty"` | |
| 276 | + // Default datetime format for axis and legend labels. The format can be set directly on | |
| 277 | + // each axis and legend. Use [D3's time format | |
| 278 | + // pattern](https://github.com/d3/d3-time-format#locale_format). | |
| 279 | + // | |
| 280 | + // __Default value:__ `'%b %d, %Y'`. | |
| 281 | + TimeFormat *string `json:"timeFormat,omitempty"` | |
| 282 | + // Title configuration, which determines default properties for all [titles](title.html). | |
| 283 | + // For a full list of title configuration options, please see the [corresponding section of | |
| 284 | + // the title documentation](title.html#config). | |
| 285 | + Title *VGTitleConfig `json:"title,omitempty"` | |
| 286 | + // Default properties for [single view plots](spec.html#single). | |
| 287 | + View *ViewConfig `json:"view,omitempty"` | |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | // Area-Specific Config |
| @@ -411,7 +411,7 @@ type MarkConfig struct { | ||
| 411 | 411 | // __Default value:__ (None) |
| 412 | 412 | Stroke *string `json:"stroke,omitempty"` |
| 413 | 413 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 414 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 414 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 415 | 415 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 416 | 416 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 417 | 417 | // The stroke opacity (value between [0,1]). |
| @@ -460,7 +460,7 @@ type AxisConfig struct { | ||
| 460 | 460 | // Color of gridlines. |
| 461 | 461 | GridColor *string `json:"gridColor,omitempty"` |
| 462 | 462 | // The offset (in pixels) into which to begin drawing with the grid dash array. |
| 463 | - GridDash []float64 `json:"gridDash,omitempty"` | |
| 463 | + GridDash *[]float64 `json:"gridDash,omitempty"` | |
| 464 | 464 | // The stroke opacity of grid (value between [0,1]) |
| 465 | 465 | // |
| 466 | 466 | // __Default value:__ (`1` by default) |
| @@ -602,7 +602,7 @@ type VGAxisConfig struct { | ||
| 602 | 602 | // Color of gridlines. |
| 603 | 603 | GridColor *string `json:"gridColor,omitempty"` |
| 604 | 604 | // The offset (in pixels) into which to begin drawing with the grid dash array. |
| 605 | - GridDash []float64 `json:"gridDash,omitempty"` | |
| 605 | + GridDash *[]float64 `json:"gridDash,omitempty"` | |
| 606 | 606 | // The stroke opacity of grid (value between [0,1]) |
| 607 | 607 | // |
| 608 | 608 | // __Default value:__ (`1` by default) |
| @@ -821,7 +821,7 @@ type BarConfig struct { | ||
| 821 | 821 | // __Default value:__ (None) |
| 822 | 822 | Stroke *string `json:"stroke,omitempty"` |
| 823 | 823 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 824 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 824 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 825 | 825 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 826 | 826 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 827 | 827 | // The stroke opacity (value between [0,1]). |
| @@ -901,7 +901,7 @@ type LegendConfig struct { | ||
| 901 | 901 | // Border stroke color for the full legend. |
| 902 | 902 | StrokeColor *string `json:"strokeColor,omitempty"` |
| 903 | 903 | // Border stroke dash pattern for the full legend. |
| 904 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 904 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 905 | 905 | // Border stroke width for the full legend. |
| 906 | 906 | StrokeWidth *float64 `json:"strokeWidth,omitempty"` |
| 907 | 907 | // The color of the legend symbol, |
| @@ -944,56 +944,56 @@ type PaddingClass struct { | ||
| 944 | 944 | // |
| 945 | 945 | // Any property of Projection can be in config |
| 946 | 946 | type ProjectionConfig struct { |
| 947 | - // Sets the projection’s center to the specified center, a two-element array of longitude | |
| 948 | - // and latitude in degrees. | |
| 949 | - // | |
| 950 | - // __Default value:__ `[0, 0]` | |
| 951 | - Center []float64 `json:"center,omitempty"` | |
| 952 | - // Sets the projection’s clipping circle radius to the specified angle in degrees. If | |
| 953 | - // `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather | |
| 954 | - // than small-circle clipping. | |
| 955 | - ClipAngle *float64 `json:"clipAngle,omitempty"` | |
| 956 | - // Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent | |
| 957 | - // bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of | |
| 958 | - // the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no | |
| 959 | - // viewport clipping is performed. | |
| 960 | - ClipExtent [][]float64 `json:"clipExtent,omitempty"` | |
| 961 | - Coefficient *float64 `json:"coefficient,omitempty"` | |
| 962 | - Distance *float64 `json:"distance,omitempty"` | |
| 963 | - Fraction *float64 `json:"fraction,omitempty"` | |
| 964 | - Lobes *float64 `json:"lobes,omitempty"` | |
| 965 | - Parallel *float64 `json:"parallel,omitempty"` | |
| 966 | - // Sets the threshold for the projection’s [adaptive | |
| 967 | - // resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This | |
| 968 | - // value corresponds to the [Douglas–Peucker | |
| 969 | - // distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). | |
| 970 | - // If precision is not specified, returns the projection’s current resampling precision | |
| 971 | - // which defaults to `√0.5 ≅ 0.70710…`. | |
| 972 | - Precision map[string]*TitleFontWeight `json:"precision,omitempty"` | |
| 973 | - Radius *float64 `json:"radius,omitempty"` | |
| 974 | - Ratio *float64 `json:"ratio,omitempty"` | |
| 975 | - // Sets the projection’s three-axis rotation to the specified angles, which must be a two- | |
| 976 | - // or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation | |
| 977 | - // angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.) | |
| 978 | - // | |
| 979 | - // __Default value:__ `[0, 0, 0]` | |
| 980 | - Rotate []float64 `json:"rotate,omitempty"` | |
| 981 | - Spacing *float64 `json:"spacing,omitempty"` | |
| 982 | - Tilt *float64 `json:"tilt,omitempty"` | |
| 983 | - // The cartographic projection to use. This value is case-insensitive, for example | |
| 984 | - // `"albers"` and `"Albers"` indicate the same projection type. You can find all valid | |
| 985 | - // projection types [in the | |
| 986 | - // documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types). | |
| 987 | - // | |
| 988 | - // __Default value:__ `mercator` | |
| 989 | - Type *VGProjectionType `json:"type,omitempty"` | |
| 947 | + // Sets the projection’s center to the specified center, a two-element array of longitude | |
| 948 | + // and latitude in degrees. | |
| 949 | + // | |
| 950 | + // __Default value:__ `[0, 0]` | |
| 951 | + Center *[]float64 `json:"center,omitempty"` | |
| 952 | + // Sets the projection’s clipping circle radius to the specified angle in degrees. If | |
| 953 | + // `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather | |
| 954 | + // than small-circle clipping. | |
| 955 | + ClipAngle *float64 `json:"clipAngle,omitempty"` | |
| 956 | + // Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent | |
| 957 | + // bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of | |
| 958 | + // the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no | |
| 959 | + // viewport clipping is performed. | |
| 960 | + ClipExtent *[][]float64 `json:"clipExtent,omitempty"` | |
| 961 | + Coefficient *float64 `json:"coefficient,omitempty"` | |
| 962 | + Distance *float64 `json:"distance,omitempty"` | |
| 963 | + Fraction *float64 `json:"fraction,omitempty"` | |
| 964 | + Lobes *float64 `json:"lobes,omitempty"` | |
| 965 | + Parallel *float64 `json:"parallel,omitempty"` | |
| 966 | + // Sets the threshold for the projection’s [adaptive | |
| 967 | + // resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This | |
| 968 | + // value corresponds to the [Douglas–Peucker | |
| 969 | + // distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). | |
| 970 | + // If precision is not specified, returns the projection’s current resampling precision | |
| 971 | + // which defaults to `√0.5 ≅ 0.70710…`. | |
| 972 | + Precision *map[string]*TitleFontWeight `json:"precision,omitempty"` | |
| 973 | + Radius *float64 `json:"radius,omitempty"` | |
| 974 | + Ratio *float64 `json:"ratio,omitempty"` | |
| 975 | + // Sets the projection’s three-axis rotation to the specified angles, which must be a two- | |
| 976 | + // or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation | |
| 977 | + // angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.) | |
| 978 | + // | |
| 979 | + // __Default value:__ `[0, 0, 0]` | |
| 980 | + Rotate *[]float64 `json:"rotate,omitempty"` | |
| 981 | + Spacing *float64 `json:"spacing,omitempty"` | |
| 982 | + Tilt *float64 `json:"tilt,omitempty"` | |
| 983 | + // The cartographic projection to use. This value is case-insensitive, for example | |
| 984 | + // `"albers"` and `"Albers"` indicate the same projection type. You can find all valid | |
| 985 | + // projection types [in the | |
| 986 | + // documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types). | |
| 987 | + // | |
| 988 | + // __Default value:__ `mercator` | |
| 989 | + Type *VGProjectionType `json:"type,omitempty"` | |
| 990 | 990 | } |
| 991 | 991 | |
| 992 | 992 | type VGScheme struct { |
| 993 | - Count *float64 `json:"count,omitempty"` | |
| 994 | - Extent []float64 `json:"extent,omitempty"` | |
| 995 | - Scheme *string `json:"scheme,omitempty"` | |
| 996 | - Step *float64 `json:"step,omitempty"` | |
| 993 | + Count *float64 `json:"count,omitempty"` | |
| 994 | + Extent *[]float64 `json:"extent,omitempty"` | |
| 995 | + Scheme *string `json:"scheme,omitempty"` | |
| 996 | + Step *float64 `json:"step,omitempty"` | |
| 997 | 997 | } |
| 998 | 998 | |
| 999 | 999 | // Scale configuration determines default properties for all [scales](scale.html). For a |
| @@ -1128,10 +1128,10 @@ type IntervalSelectionConfig struct { | ||
| 1128 | 1128 | Empty *Empty `json:"empty,omitempty"` |
| 1129 | 1129 | // An array of encoding channels. The corresponding data field values |
| 1130 | 1130 | // must match for a data tuple to fall within the selection. |
| 1131 | - Encodings []SingleDefChannel `json:"encodings,omitempty"` | |
| 1131 | + Encodings *[]SingleDefChannel `json:"encodings,omitempty"` | |
| 1132 | 1132 | // An array of field names whose values must match for a data tuple to |
| 1133 | 1133 | // fall within the selection. |
| 1134 | - Fields []string `json:"fields,omitempty"` | |
| 1134 | + Fields *[]string `json:"fields,omitempty"` | |
| 1135 | 1135 | // An interval selection also adds a rectangle mark to depict the |
| 1136 | 1136 | // extents of the interval. The `mark` property can be used to customize the |
| 1137 | 1137 | // appearance of the mark. |
| @@ -1168,27 +1168,27 @@ type IntervalSelectionConfig struct { | ||
| 1168 | 1168 | // extents of the interval. The `mark` property can be used to customize the |
| 1169 | 1169 | // appearance of the mark. |
| 1170 | 1170 | type BrushConfig struct { |
| 1171 | - // The fill color of the interval mark. | |
| 1172 | - // | |
| 1173 | - // __Default value:__ `#333333` | |
| 1174 | - Fill *string `json:"fill,omitempty"` | |
| 1175 | - // The fill opacity of the interval mark (a value between 0 and 1). | |
| 1176 | - // | |
| 1177 | - // __Default value:__ `0.125` | |
| 1178 | - FillOpacity *float64 `json:"fillOpacity,omitempty"` | |
| 1179 | - // The stroke color of the interval mark. | |
| 1180 | - // | |
| 1181 | - // __Default value:__ `#ffffff` | |
| 1182 | - Stroke *string `json:"stroke,omitempty"` | |
| 1183 | - // An array of alternating stroke and space lengths, | |
| 1184 | - // for creating dashed or dotted lines. | |
| 1185 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 1186 | - // The offset (in pixels) with which to begin drawing the stroke dash array. | |
| 1187 | - StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` | |
| 1188 | - // The stroke opacity of the interval mark (a value between 0 and 1). | |
| 1189 | - StrokeOpacity *float64 `json:"strokeOpacity,omitempty"` | |
| 1190 | - // The stroke width of the interval mark. | |
| 1191 | - StrokeWidth *float64 `json:"strokeWidth,omitempty"` | |
| 1171 | + // The fill color of the interval mark. | |
| 1172 | + // | |
| 1173 | + // __Default value:__ `#333333` | |
| 1174 | + Fill *string `json:"fill,omitempty"` | |
| 1175 | + // The fill opacity of the interval mark (a value between 0 and 1). | |
| 1176 | + // | |
| 1177 | + // __Default value:__ `0.125` | |
| 1178 | + FillOpacity *float64 `json:"fillOpacity,omitempty"` | |
| 1179 | + // The stroke color of the interval mark. | |
| 1180 | + // | |
| 1181 | + // __Default value:__ `#ffffff` | |
| 1182 | + Stroke *string `json:"stroke,omitempty"` | |
| 1183 | + // An array of alternating stroke and space lengths, | |
| 1184 | + // for creating dashed or dotted lines. | |
| 1185 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 1186 | + // The offset (in pixels) with which to begin drawing the stroke dash array. | |
| 1187 | + StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` | |
| 1188 | + // The stroke opacity of the interval mark (a value between 0 and 1). | |
| 1189 | + StrokeOpacity *float64 `json:"strokeOpacity,omitempty"` | |
| 1190 | + // The stroke width of the interval mark. | |
| 1191 | + StrokeWidth *float64 `json:"strokeWidth,omitempty"` | |
| 1192 | 1192 | } |
| 1193 | 1193 | |
| 1194 | 1194 | // The default definition for a [`multi`](selection.html#type) selection. All properties and |
| @@ -1203,10 +1203,10 @@ type MultiSelectionConfig struct { | ||
| 1203 | 1203 | Empty *Empty `json:"empty,omitempty"` |
| 1204 | 1204 | // An array of encoding channels. The corresponding data field values |
| 1205 | 1205 | // must match for a data tuple to fall within the selection. |
| 1206 | - Encodings []SingleDefChannel `json:"encodings,omitempty"` | |
| 1206 | + Encodings *[]SingleDefChannel `json:"encodings,omitempty"` | |
| 1207 | 1207 | // An array of field names whose values must match for a data tuple to |
| 1208 | 1208 | // fall within the selection. |
| 1209 | - Fields []string `json:"fields,omitempty"` | |
| 1209 | + Fields *[]string `json:"fields,omitempty"` | |
| 1210 | 1210 | // When true, an invisible voronoi diagram is computed to accelerate discrete |
| 1211 | 1211 | // selection. The data value _nearest_ the mouse cursor is added to the selection. |
| 1212 | 1212 | // |
| @@ -1239,45 +1239,45 @@ type MultiSelectionConfig struct { | ||
| 1239 | 1239 | // For instance, setting `single` to `{"on": "dblclick"}` populates single selections on |
| 1240 | 1240 | // double-click by default. |
| 1241 | 1241 | type SingleSelectionConfig struct { |
| 1242 | - // Establish a two-way binding between a single selection and input elements | |
| 1243 | - // (also known as dynamic query widgets). A binding takes the form of | |
| 1244 | - // Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) | |
| 1245 | - // or can be a mapping between projected field/encodings and binding definitions. | |
| 1246 | - // | |
| 1247 | - // See the [bind transform](bind.html) documentation for more information. | |
| 1248 | - Bind map[string]VGBinding `json:"bind,omitempty"` | |
| 1249 | - // By default, all data values are considered to lie within an empty selection. | |
| 1250 | - // When set to `none`, empty selections contain no data values. | |
| 1251 | - Empty *Empty `json:"empty,omitempty"` | |
| 1252 | - // An array of encoding channels. The corresponding data field values | |
| 1253 | - // must match for a data tuple to fall within the selection. | |
| 1254 | - Encodings []SingleDefChannel `json:"encodings,omitempty"` | |
| 1255 | - // An array of field names whose values must match for a data tuple to | |
| 1256 | - // fall within the selection. | |
| 1257 | - Fields []string `json:"fields,omitempty"` | |
| 1258 | - // When true, an invisible voronoi diagram is computed to accelerate discrete | |
| 1259 | - // selection. The data value _nearest_ the mouse cursor is added to the selection. | |
| 1260 | - // | |
| 1261 | - // See the [nearest transform](nearest.html) documentation for more information. | |
| 1262 | - Nearest *bool `json:"nearest,omitempty"` | |
| 1263 | - // A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or | |
| 1264 | - // selector) that triggers the selection. | |
| 1265 | - // For interval selections, the event stream must specify a [start and | |
| 1266 | - // end](https://vega.github.io/vega/docs/event-streams/#between-filters). | |
| 1267 | - On interface{} `json:"on"` | |
| 1268 | - // With layered and multi-view displays, a strategy that determines how | |
| 1269 | - // selections' data queries are resolved when applied in a filter transform, | |
| 1270 | - // conditional encoding rule, or scale domain. | |
| 1271 | - Resolve *SelectionResolution `json:"resolve,omitempty"` | |
| 1242 | + // Establish a two-way binding between a single selection and input elements | |
| 1243 | + // (also known as dynamic query widgets). A binding takes the form of | |
| 1244 | + // Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) | |
| 1245 | + // or can be a mapping between projected field/encodings and binding definitions. | |
| 1246 | + // | |
| 1247 | + // See the [bind transform](bind.html) documentation for more information. | |
| 1248 | + Bind *map[string]VGBinding `json:"bind,omitempty"` | |
| 1249 | + // By default, all data values are considered to lie within an empty selection. | |
| 1250 | + // When set to `none`, empty selections contain no data values. | |
| 1251 | + Empty *Empty `json:"empty,omitempty"` | |
| 1252 | + // An array of encoding channels. The corresponding data field values | |
| 1253 | + // must match for a data tuple to fall within the selection. | |
| 1254 | + Encodings *[]SingleDefChannel `json:"encodings,omitempty"` | |
| 1255 | + // An array of field names whose values must match for a data tuple to | |
| 1256 | + // fall within the selection. | |
| 1257 | + Fields *[]string `json:"fields,omitempty"` | |
| 1258 | + // When true, an invisible voronoi diagram is computed to accelerate discrete | |
| 1259 | + // selection. The data value _nearest_ the mouse cursor is added to the selection. | |
| 1260 | + // | |
| 1261 | + // See the [nearest transform](nearest.html) documentation for more information. | |
| 1262 | + Nearest *bool `json:"nearest,omitempty"` | |
| 1263 | + // A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or | |
| 1264 | + // selector) that triggers the selection. | |
| 1265 | + // For interval selections, the event stream must specify a [start and | |
| 1266 | + // end](https://vega.github.io/vega/docs/event-streams/#between-filters). | |
| 1267 | + On interface{} `json:"on"` | |
| 1268 | + // With layered and multi-view displays, a strategy that determines how | |
| 1269 | + // selections' data queries are resolved when applied in a filter transform, | |
| 1270 | + // conditional encoding rule, or scale domain. | |
| 1271 | + Resolve *SelectionResolution `json:"resolve,omitempty"` | |
| 1272 | 1272 | } |
| 1273 | 1273 | |
| 1274 | 1274 | type VGBinding struct { |
| 1275 | - Element *string `json:"element,omitempty"` | |
| 1276 | - Input string `json:"input"` | |
| 1277 | - Options []string `json:"options,omitempty"` | |
| 1278 | - Max *float64 `json:"max,omitempty"` | |
| 1279 | - Min *float64 `json:"min,omitempty"` | |
| 1280 | - Step *float64 `json:"step,omitempty"` | |
| 1275 | + Element *string `json:"element,omitempty"` | |
| 1276 | + Input string `json:"input"` | |
| 1277 | + Options *[]string `json:"options,omitempty"` | |
| 1278 | + Max *float64 `json:"max,omitempty"` | |
| 1279 | + Min *float64 `json:"min,omitempty"` | |
| 1280 | + Step *float64 `json:"step,omitempty"` | |
| 1281 | 1281 | } |
| 1282 | 1282 | |
| 1283 | 1283 | type VGMarkConfig struct { |
| @@ -1372,7 +1372,7 @@ type VGMarkConfig struct { | ||
| 1372 | 1372 | // __Default value:__ (None) |
| 1373 | 1373 | Stroke *string `json:"stroke,omitempty"` |
| 1374 | 1374 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 1375 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 1375 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 1376 | 1376 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 1377 | 1377 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 1378 | 1378 | // The stroke opacity (value between [0,1]). |
| @@ -1502,7 +1502,7 @@ type TextConfig struct { | ||
| 1502 | 1502 | // __Default value:__ (None) |
| 1503 | 1503 | Stroke *string `json:"stroke,omitempty"` |
| 1504 | 1504 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 1505 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 1505 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 1506 | 1506 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 1507 | 1507 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 1508 | 1508 | // The stroke opacity (value between [0,1]). |
| @@ -1634,7 +1634,7 @@ type TickConfig struct { | ||
| 1634 | 1634 | // __Default value:__ (None) |
| 1635 | 1635 | Stroke *string `json:"stroke,omitempty"` |
| 1636 | 1636 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 1637 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 1637 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 1638 | 1638 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 1639 | 1639 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 1640 | 1640 | // The stroke opacity (value between [0,1]). |
| @@ -1697,47 +1697,47 @@ type VGTitleConfig struct { | ||
| 1697 | 1697 | |
| 1698 | 1698 | // Default properties for [single view plots](spec.html#single). |
| 1699 | 1699 | type ViewConfig struct { |
| 1700 | - // Whether the view should be clipped. | |
| 1701 | - Clip *bool `json:"clip,omitempty"` | |
| 1702 | - // The fill color. | |
| 1703 | - // | |
| 1704 | - // __Default value:__ (none) | |
| 1705 | - Fill *string `json:"fill,omitempty"` | |
| 1706 | - // The fill opacity (value between [0,1]). | |
| 1707 | - // | |
| 1708 | - // __Default value:__ (none) | |
| 1709 | - FillOpacity *float64 `json:"fillOpacity,omitempty"` | |
| 1710 | - // The default height of the single plot or each plot in a trellis plot when the | |
| 1711 | - // visualization has a continuous (non-ordinal) y-scale with `rangeStep` = `null`. | |
| 1712 | - // | |
| 1713 | - // __Default value:__ `200` | |
| 1714 | - Height *float64 `json:"height,omitempty"` | |
| 1715 | - // The stroke color. | |
| 1716 | - // | |
| 1717 | - // __Default value:__ (none) | |
| 1718 | - Stroke *string `json:"stroke,omitempty"` | |
| 1719 | - // An array of alternating stroke, space lengths for creating dashed or dotted lines. | |
| 1720 | - // | |
| 1721 | - // __Default value:__ (none) | |
| 1722 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 1723 | - // The offset (in pixels) into which to begin drawing with the stroke dash array. | |
| 1724 | - // | |
| 1725 | - // __Default value:__ (none) | |
| 1726 | - StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` | |
| 1727 | - // The stroke opacity (value between [0,1]). | |
| 1728 | - // | |
| 1729 | - // __Default value:__ (none) | |
| 1730 | - StrokeOpacity *float64 `json:"strokeOpacity,omitempty"` | |
| 1731 | - // The stroke width, in pixels. | |
| 1732 | - // | |
| 1733 | - // __Default value:__ (none) | |
| 1734 | - StrokeWidth *float64 `json:"strokeWidth,omitempty"` | |
| 1735 | - // The default width of the single plot or each plot in a trellis plot when the | |
| 1736 | - // visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with `rangeStep` | |
| 1737 | - // = `null`. | |
| 1738 | - // | |
| 1739 | - // __Default value:__ `200` | |
| 1740 | - Width *float64 `json:"width,omitempty"` | |
| 1700 | + // Whether the view should be clipped. | |
| 1701 | + Clip *bool `json:"clip,omitempty"` | |
| 1702 | + // The fill color. | |
| 1703 | + // | |
| 1704 | + // __Default value:__ (none) | |
| 1705 | + Fill *string `json:"fill,omitempty"` | |
| 1706 | + // The fill opacity (value between [0,1]). | |
| 1707 | + // | |
| 1708 | + // __Default value:__ (none) | |
| 1709 | + FillOpacity *float64 `json:"fillOpacity,omitempty"` | |
| 1710 | + // The default height of the single plot or each plot in a trellis plot when the | |
| 1711 | + // visualization has a continuous (non-ordinal) y-scale with `rangeStep` = `null`. | |
| 1712 | + // | |
| 1713 | + // __Default value:__ `200` | |
| 1714 | + Height *float64 `json:"height,omitempty"` | |
| 1715 | + // The stroke color. | |
| 1716 | + // | |
| 1717 | + // __Default value:__ (none) | |
| 1718 | + Stroke *string `json:"stroke,omitempty"` | |
| 1719 | + // An array of alternating stroke, space lengths for creating dashed or dotted lines. | |
| 1720 | + // | |
| 1721 | + // __Default value:__ (none) | |
| 1722 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 1723 | + // The offset (in pixels) into which to begin drawing with the stroke dash array. | |
| 1724 | + // | |
| 1725 | + // __Default value:__ (none) | |
| 1726 | + StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` | |
| 1727 | + // The stroke opacity (value between [0,1]). | |
| 1728 | + // | |
| 1729 | + // __Default value:__ (none) | |
| 1730 | + StrokeOpacity *float64 `json:"strokeOpacity,omitempty"` | |
| 1731 | + // The stroke width, in pixels. | |
| 1732 | + // | |
| 1733 | + // __Default value:__ (none) | |
| 1734 | + StrokeWidth *float64 `json:"strokeWidth,omitempty"` | |
| 1735 | + // The default width of the single plot or each plot in a trellis plot when the | |
| 1736 | + // visualization has a continuous (non-ordinal) x-scale or ordinal x-scale with `rangeStep` | |
| 1737 | + // = `null`. | |
| 1738 | + // | |
| 1739 | + // __Default value:__ `200` | |
| 1740 | + Width *float64 `json:"width,omitempty"` | |
| 1741 | 1741 | } |
| 1742 | 1742 | |
| 1743 | 1743 | // An object describing the data source |
| @@ -1975,35 +1975,35 @@ type MarkPropDefWithCondition struct { | ||
| 1975 | 1975 | |
| 1976 | 1976 | // Binning properties or boolean flag for determining whether to bin data or not. |
| 1977 | 1977 | type BinParams struct { |
| 1978 | - // The number base to use for automatic bin determination (default is base 10). | |
| 1979 | - // | |
| 1980 | - // __Default value:__ `10` | |
| 1981 | - Base *float64 `json:"base,omitempty"` | |
| 1982 | - // Scale factors indicating allowable subdivisions. The default value is [5, 2], which | |
| 1983 | - // indicates that for base 10 numbers (the default base), the method may consider dividing | |
| 1984 | - // bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can | |
| 1985 | - // check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the | |
| 1986 | - // given constraints. | |
| 1987 | - // | |
| 1988 | - // __Default value:__ `[5, 2]` | |
| 1989 | - Divide []float64 `json:"divide,omitempty"` | |
| 1990 | - // A two-element (`[min, max]`) array indicating the range of desired bin values. | |
| 1991 | - Extent []float64 `json:"extent,omitempty"` | |
| 1992 | - // Maximum number of bins. | |
| 1993 | - // | |
| 1994 | - // __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels | |
| 1995 | - Maxbins *float64 `json:"maxbins,omitempty"` | |
| 1996 | - // A minimum allowable step size (particularly useful for integer values). | |
| 1997 | - Minstep *float64 `json:"minstep,omitempty"` | |
| 1998 | - // If true (the default), attempts to make the bin boundaries use human-friendly boundaries, | |
| 1999 | - // such as multiples of ten. | |
| 2000 | - Nice *bool `json:"nice,omitempty"` | |
| 2001 | - // An exact step size to use between bins. | |
| 2002 | - // | |
| 2003 | - // __Note:__ If provided, options such as maxbins will be ignored. | |
| 2004 | - Step *float64 `json:"step,omitempty"` | |
| 2005 | - // An array of allowable step sizes to choose from. | |
| 2006 | - Steps []float64 `json:"steps,omitempty"` | |
| 1978 | + // The number base to use for automatic bin determination (default is base 10). | |
| 1979 | + // | |
| 1980 | + // __Default value:__ `10` | |
| 1981 | + Base *float64 `json:"base,omitempty"` | |
| 1982 | + // Scale factors indicating allowable subdivisions. The default value is [5, 2], which | |
| 1983 | + // indicates that for base 10 numbers (the default base), the method may consider dividing | |
| 1984 | + // bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can | |
| 1985 | + // check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the | |
| 1986 | + // given constraints. | |
| 1987 | + // | |
| 1988 | + // __Default value:__ `[5, 2]` | |
| 1989 | + Divide *[]float64 `json:"divide,omitempty"` | |
| 1990 | + // A two-element (`[min, max]`) array indicating the range of desired bin values. | |
| 1991 | + Extent *[]float64 `json:"extent,omitempty"` | |
| 1992 | + // Maximum number of bins. | |
| 1993 | + // | |
| 1994 | + // __Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels | |
| 1995 | + Maxbins *float64 `json:"maxbins,omitempty"` | |
| 1996 | + // A minimum allowable step size (particularly useful for integer values). | |
| 1997 | + Minstep *float64 `json:"minstep,omitempty"` | |
| 1998 | + // If true (the default), attempts to make the bin boundaries use human-friendly boundaries, | |
| 1999 | + // such as multiples of ten. | |
| 2000 | + Nice *bool `json:"nice,omitempty"` | |
| 2001 | + // An exact step size to use between bins. | |
| 2002 | + // | |
| 2003 | + // __Note:__ If provided, options such as maxbins will be ignored. | |
| 2004 | + Step *float64 `json:"step,omitempty"` | |
| 2005 | + // An array of allowable step sizes to choose from. | |
| 2006 | + Steps *[]float64 `json:"steps,omitempty"` | |
| 2007 | 2007 | } |
| 2008 | 2008 | |
| 2009 | 2009 | type ConditionalValueDef struct { |
| @@ -2017,33 +2017,33 @@ type ConditionalValueDef struct { | ||
| 2017 | 2017 | } |
| 2018 | 2018 | |
| 2019 | 2019 | type Selection struct { |
| 2020 | - Not *SelectionOperand `json:"not"` | |
| 2021 | - And []SelectionOperand `json:"and,omitempty"` | |
| 2022 | - Or []SelectionOperand `json:"or,omitempty"` | |
| 2020 | + Not *SelectionOperand `json:"not"` | |
| 2021 | + And *[]SelectionOperand `json:"and,omitempty"` | |
| 2022 | + Or *[]SelectionOperand `json:"or,omitempty"` | |
| 2023 | 2023 | } |
| 2024 | 2024 | |
| 2025 | 2025 | type Predicate struct { |
| 2026 | - Not *LogicalOperandPredicate `json:"not"` | |
| 2027 | - And []LogicalOperandPredicate `json:"and,omitempty"` | |
| 2028 | - Or []LogicalOperandPredicate `json:"or,omitempty"` | |
| 2029 | - // The value that the field should be equal to. | |
| 2030 | - Equal *Equal `json:"equal"` | |
| 2031 | - // Field to be filtered. | |
| 2032 | - // | |
| 2033 | - // Field to be filtered | |
| 2034 | - Field *string `json:"field,omitempty"` | |
| 2035 | - // Time unit for the field to be filtered. | |
| 2036 | - // | |
| 2037 | - // time unit for the field to be filtered. | |
| 2038 | - TimeUnit *TimeUnit `json:"timeUnit,omitempty"` | |
| 2039 | - // An array of inclusive minimum and maximum values | |
| 2040 | - // for a field value of a data item to be included in the filtered data. | |
| 2041 | - Range []RangeElement `json:"range,omitempty"` | |
| 2042 | - // A set of values that the `field`'s value should be a member of, | |
| 2043 | - // for a data item included in the filtered data. | |
| 2044 | - OneOf []Equal `json:"oneOf,omitempty"` | |
| 2045 | - // Filter using a selection name. | |
| 2046 | - Selection *SelectionOperand `json:"selection"` | |
| 2026 | + Not *LogicalOperandPredicate `json:"not"` | |
| 2027 | + And *[]LogicalOperandPredicate `json:"and,omitempty"` | |
| 2028 | + Or *[]LogicalOperandPredicate `json:"or,omitempty"` | |
| 2029 | + // The value that the field should be equal to. | |
| 2030 | + Equal *Equal `json:"equal"` | |
| 2031 | + // Field to be filtered. | |
| 2032 | + // | |
| 2033 | + // Field to be filtered | |
| 2034 | + Field *string `json:"field,omitempty"` | |
| 2035 | + // Time unit for the field to be filtered. | |
| 2036 | + // | |
| 2037 | + // time unit for the field to be filtered. | |
| 2038 | + TimeUnit *TimeUnit `json:"timeUnit,omitempty"` | |
| 2039 | + // An array of inclusive minimum and maximum values | |
| 2040 | + // for a field value of a data item to be included in the filtered data. | |
| 2041 | + Range *[]RangeElement `json:"range,omitempty"` | |
| 2042 | + // A set of values that the `field`'s value should be a member of, | |
| 2043 | + // for a data item included in the filtered data. | |
| 2044 | + OneOf *[]Equal `json:"oneOf,omitempty"` | |
| 2045 | + // Filter using a selection name. | |
| 2046 | + Selection *SelectionOperand `json:"selection"` | |
| 2047 | 2047 | } |
| 2048 | 2048 | |
| 2049 | 2049 | // Object for defining datetime in Vega-Lite Filter. |
| @@ -2147,58 +2147,58 @@ type RepeatRef struct { | ||
| 2147 | 2147 | |
| 2148 | 2148 | // Properties of a legend or boolean flag for determining whether to show it. |
| 2149 | 2149 | type Legend struct { |
| 2150 | - // Padding (in pixels) between legend entries in a symbol legend. | |
| 2151 | - EntryPadding *float64 `json:"entryPadding,omitempty"` | |
| 2152 | - // The formatting pattern for labels. This is D3's [number format | |
| 2153 | - // pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's | |
| 2154 | - // [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time | |
| 2155 | - // field. | |
| 2156 | - // | |
| 2157 | - // See the [format documentation](format.html) for more information. | |
| 2158 | - // | |
| 2159 | - // __Default value:__ derived from [numberFormat](config.html#format) config for | |
| 2160 | - // quantitative fields and from [timeFormat](config.html#format) config for temporal fields. | |
| 2161 | - Format *string `json:"format,omitempty"` | |
| 2162 | - // The offset, in pixels, by which to displace the legend from the edge of the enclosing | |
| 2163 | - // group or data rectangle. | |
| 2164 | - // | |
| 2165 | - // __Default value:__ `0` | |
| 2166 | - Offset *float64 `json:"offset,omitempty"` | |
| 2167 | - // The orientation of the legend, which determines how the legend is positioned within the | |
| 2168 | - // scene. One of "left", "right", "top-left", "top-right", "bottom-left", "bottom-right", | |
| 2169 | - // "none". | |
| 2170 | - // | |
| 2171 | - // __Default value:__ `"right"` | |
| 2172 | - Orient *LegendOrient `json:"orient,omitempty"` | |
| 2173 | - // The padding, in pixels, between the legend and axis. | |
| 2174 | - Padding *float64 `json:"padding,omitempty"` | |
| 2175 | - // The desired number of tick values for quantitative legends. | |
| 2176 | - TickCount *float64 `json:"tickCount,omitempty"` | |
| 2177 | - // A title for the field. If `null`, the title will be removed. | |
| 2178 | - // | |
| 2179 | - // __Default value:__ derived from the field's name and transformation function | |
| 2180 | - // (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the | |
| 2181 | - // function is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field is | |
| 2182 | - // binned or has a time unit applied, the applied function will be denoted in parentheses | |
| 2183 | - // (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is | |
| 2184 | - // simply the field name. | |
| 2185 | - // | |
| 2186 | - // __Note__: You can customize the default field title format by providing the [`fieldTitle` | |
| 2187 | - // property in the [config](config.html) or [`fieldTitle` function via the `compile` | |
| 2188 | - // function's options](compile.html#field-title). | |
| 2189 | - Title *string `json:"title"` | |
| 2190 | - // The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a | |
| 2191 | - // continuous color gradient. | |
| 2192 | - // | |
| 2193 | - // __Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields; | |
| 2194 | - // `"symbol"` otherwise. | |
| 2195 | - Type *LegendType `json:"type,omitempty"` | |
| 2196 | - // Explicitly set the visible legend values. | |
| 2197 | - Values []LegendValue `json:"values,omitempty"` | |
| 2198 | - // A non-positive integer indicating z-index of the legend. | |
| 2199 | - // If zindex is 0, legend should be drawn behind all chart elements. | |
| 2200 | - // To put them in front, use zindex = 1. | |
| 2201 | - Zindex *float64 `json:"zindex,omitempty"` | |
| 2150 | + // Padding (in pixels) between legend entries in a symbol legend. | |
| 2151 | + EntryPadding *float64 `json:"entryPadding,omitempty"` | |
| 2152 | + // The formatting pattern for labels. This is D3's [number format | |
| 2153 | + // pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's | |
| 2154 | + // [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time | |
| 2155 | + // field. | |
| 2156 | + // | |
| 2157 | + // See the [format documentation](format.html) for more information. | |
| 2158 | + // | |
| 2159 | + // __Default value:__ derived from [numberFormat](config.html#format) config for | |
| 2160 | + // quantitative fields and from [timeFormat](config.html#format) config for temporal fields. | |
| 2161 | + Format *string `json:"format,omitempty"` | |
| 2162 | + // The offset, in pixels, by which to displace the legend from the edge of the enclosing | |
| 2163 | + // group or data rectangle. | |
| 2164 | + // | |
| 2165 | + // __Default value:__ `0` | |
| 2166 | + Offset *float64 `json:"offset,omitempty"` | |
| 2167 | + // The orientation of the legend, which determines how the legend is positioned within the | |
| 2168 | + // scene. One of "left", "right", "top-left", "top-right", "bottom-left", "bottom-right", | |
| 2169 | + // "none". | |
| 2170 | + // | |
| 2171 | + // __Default value:__ `"right"` | |
| 2172 | + Orient *LegendOrient `json:"orient,omitempty"` | |
| 2173 | + // The padding, in pixels, between the legend and axis. | |
| 2174 | + Padding *float64 `json:"padding,omitempty"` | |
| 2175 | + // The desired number of tick values for quantitative legends. | |
| 2176 | + TickCount *float64 `json:"tickCount,omitempty"` | |
| 2177 | + // A title for the field. If `null`, the title will be removed. | |
| 2178 | + // | |
| 2179 | + // __Default value:__ derived from the field's name and transformation function | |
| 2180 | + // (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the | |
| 2181 | + // function is displayed as a part of the title (e.g., `"Sum of Profit"`). If the field is | |
| 2182 | + // binned or has a time unit applied, the applied function will be denoted in parentheses | |
| 2183 | + // (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is | |
| 2184 | + // simply the field name. | |
| 2185 | + // | |
| 2186 | + // __Note__: You can customize the default field title format by providing the [`fieldTitle` | |
| 2187 | + // property in the [config](config.html) or [`fieldTitle` function via the `compile` | |
| 2188 | + // function's options](compile.html#field-title). | |
| 2189 | + Title *string `json:"title"` | |
| 2190 | + // The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a | |
| 2191 | + // continuous color gradient. | |
| 2192 | + // | |
| 2193 | + // __Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields; | |
| 2194 | + // `"symbol"` otherwise. | |
| 2195 | + Type *LegendType `json:"type,omitempty"` | |
| 2196 | + // Explicitly set the visible legend values. | |
| 2197 | + Values *[]LegendValue `json:"values,omitempty"` | |
| 2198 | + // A non-positive integer indicating z-index of the legend. | |
| 2199 | + // If zindex is 0, legend should be drawn behind all chart elements. | |
| 2200 | + // To put them in front, use zindex = 1. | |
| 2201 | + Zindex *float64 `json:"zindex,omitempty"` | |
| 2202 | 2202 | } |
| 2203 | 2203 | |
| 2204 | 2204 | // An object defining properties of the channel's scale, which is the function that |
| @@ -2401,15 +2401,15 @@ type NiceClass struct { | ||
| 2401 | 2401 | } |
| 2402 | 2402 | |
| 2403 | 2403 | type SchemeParams struct { |
| 2404 | - // For sequential and diverging schemes only, determines the extent of the color range to | |
| 2405 | - // use. For example `[0.2, 1]` will rescale the color scheme such that color values in the | |
| 2406 | - // range _[0, 0.2)_ are excluded from the scheme. | |
| 2407 | - Extent []float64 `json:"extent,omitempty"` | |
| 2408 | - // A color scheme name for sequential/ordinal scales (e.g., `"category10"` or `"viridis"`). | |
| 2409 | - // | |
| 2410 | - // For the full list of supported scheme, please refer to the [Vega | |
| 2411 | - // Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference. | |
| 2412 | - Name string `json:"name"` | |
| 2404 | + // For sequential and diverging schemes only, determines the extent of the color range to | |
| 2405 | + // use. For example `[0.2, 1]` will rescale the color scheme such that color values in the | |
| 2406 | + // range _[0, 0.2)_ are excluded from the scheme. | |
| 2407 | + Extent *[]float64 `json:"extent,omitempty"` | |
| 2408 | + // A color scheme name for sequential/ordinal scales (e.g., `"category10"` or `"viridis"`). | |
| 2409 | + // | |
| 2410 | + // For the full list of supported scheme, please refer to the [Vega | |
| 2411 | + // Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference. | |
| 2412 | + Name string `json:"name"` | |
| 2413 | 2413 | } |
| 2414 | 2414 | |
| 2415 | 2415 | type SortField struct { |
| @@ -2985,7 +2985,7 @@ type Axis struct { | ||
| 2985 | 2985 | // The padding, in pixels, between title and axis. |
| 2986 | 2986 | TitlePadding *float64 `json:"titlePadding,omitempty"` |
| 2987 | 2987 | // Explicitly set the visible axis tick values. |
| 2988 | - Values []AxisValue `json:"values,omitempty"` | |
| 2988 | + Values *[]AxisValue `json:"values,omitempty"` | |
| 2989 | 2989 | // A non-positive integer indicating z-index of the axis. |
| 2990 | 2990 | // If zindex is 0, axes should be drawn behind all chart elements. |
| 2991 | 2991 | // To put them in front, use `"zindex = 1"`. |
| @@ -3051,96 +3051,96 @@ type FacetMapping struct { | ||
| 3051 | 3051 | |
| 3052 | 3052 | // Unit spec that can have a composite mark. |
| 3053 | 3053 | type Spec struct { |
| 3054 | - // An object describing the data source | |
| 3055 | - Data *Data `json:"data,omitempty"` | |
| 3056 | - // Description of this mark for commenting purpose. | |
| 3057 | - Description *string `json:"description,omitempty"` | |
| 3058 | - // The height of a visualization. | |
| 3059 | - // | |
| 3060 | - // __Default value:__ | |
| 3061 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 3062 | - // [continuous scale](scale.html#continuous), the height will be the value of | |
| 3063 | - // [`config.view.height`](spec.html#config). | |
| 3064 | - // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3065 | - // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 3066 | - // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 3067 | - // `rangeStep` is `null`, the height will be the value of | |
| 3068 | - // [`config.view.height`](spec.html#config). | |
| 3069 | - // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 3070 | - // | |
| 3071 | - // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3072 | - // represents the height of a single view. | |
| 3073 | - // | |
| 3074 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3075 | - Height *float64 `json:"height,omitempty"` | |
| 3076 | - // Layer or single view specifications to be layered. | |
| 3077 | - // | |
| 3078 | - // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 3079 | - // layering facet specifications is not allowed. | |
| 3080 | - Layer []LayerSpec `json:"layer,omitempty"` | |
| 3081 | - // Name of the visualization for later reference. | |
| 3082 | - Name *string `json:"name,omitempty"` | |
| 3083 | - // Scale, axis, and legend resolutions for layers. | |
| 3084 | - // | |
| 3085 | - // Scale, axis, and legend resolutions for facets. | |
| 3086 | - // | |
| 3087 | - // Scale and legend resolutions for repeated charts. | |
| 3088 | - // | |
| 3089 | - // Scale, axis, and legend resolutions for vertically concatenated charts. | |
| 3090 | - // | |
| 3091 | - // Scale, axis, and legend resolutions for horizontally concatenated charts. | |
| 3092 | - Resolve *Resolve `json:"resolve,omitempty"` | |
| 3093 | - // Title for the plot. | |
| 3094 | - Title *Title `json:"title"` | |
| 3095 | - // An array of data transformations such as filter and new field calculation. | |
| 3096 | - Transform []Transform `json:"transform,omitempty"` | |
| 3097 | - // The width of a visualization. | |
| 3098 | - // | |
| 3099 | - // __Default value:__ This will be determined by the following rules: | |
| 3100 | - // | |
| 3101 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 3102 | - // [continuous scale](scale.html#continuous), the width will be the value of | |
| 3103 | - // [`config.view.width`](spec.html#config). | |
| 3104 | - // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3105 | - // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 3106 | - // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 3107 | - // `rangeStep` is `null`, the width will be the value of | |
| 3108 | - // [`config.view.width`](spec.html#config). | |
| 3109 | - // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 3110 | - // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 3111 | - // the value of `rangeStep` for other marks. | |
| 3112 | - // | |
| 3113 | - // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3114 | - // represents the width of a single view. | |
| 3115 | - // | |
| 3116 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3117 | - Width *float64 `json:"width,omitempty"` | |
| 3118 | - // A key-value mapping between encoding channels and definition of fields. | |
| 3119 | - Encoding *Encoding `json:"encoding,omitempty"` | |
| 3120 | - // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 3121 | - // `"line"`, | |
| 3122 | - // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 3123 | - // object](mark.html#mark-def). | |
| 3124 | - Mark *AnyMark `json:"mark"` | |
| 3125 | - // An object defining properties of geographic projection. | |
| 3126 | - // | |
| 3127 | - // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 3128 | - // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 3129 | - Projection *Projection `json:"projection,omitempty"` | |
| 3130 | - // A key-value mapping between selection names and definitions. | |
| 3131 | - Selection map[string]SelectionDef `json:"selection,omitempty"` | |
| 3132 | - // An object that describes mappings between `row` and `column` channels and their field | |
| 3133 | - // definitions. | |
| 3134 | - Facet *FacetMapping `json:"facet,omitempty"` | |
| 3135 | - // A specification of the view that gets faceted. | |
| 3136 | - Spec *Spec `json:"spec,omitempty"` | |
| 3137 | - // An object that describes what fields should be repeated into views that are laid out as a | |
| 3138 | - // `row` or `column`. | |
| 3139 | - Repeat *Repeat `json:"repeat,omitempty"` | |
| 3140 | - // A list of views that should be concatenated and put into a column. | |
| 3141 | - Vconcat []Spec `json:"vconcat,omitempty"` | |
| 3142 | - // A list of views that should be concatenated and put into a row. | |
| 3143 | - Hconcat []Spec `json:"hconcat,omitempty"` | |
| 3054 | + // An object describing the data source | |
| 3055 | + Data *Data `json:"data,omitempty"` | |
| 3056 | + // Description of this mark for commenting purpose. | |
| 3057 | + Description *string `json:"description,omitempty"` | |
| 3058 | + // The height of a visualization. | |
| 3059 | + // | |
| 3060 | + // __Default value:__ | |
| 3061 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 3062 | + // [continuous scale](scale.html#continuous), the height will be the value of | |
| 3063 | + // [`config.view.height`](spec.html#config). | |
| 3064 | + // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3065 | + // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 3066 | + // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 3067 | + // `rangeStep` is `null`, the height will be the value of | |
| 3068 | + // [`config.view.height`](spec.html#config). | |
| 3069 | + // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 3070 | + // | |
| 3071 | + // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3072 | + // represents the height of a single view. | |
| 3073 | + // | |
| 3074 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3075 | + Height *float64 `json:"height,omitempty"` | |
| 3076 | + // Layer or single view specifications to be layered. | |
| 3077 | + // | |
| 3078 | + // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 3079 | + // layering facet specifications is not allowed. | |
| 3080 | + Layer *[]LayerSpec `json:"layer,omitempty"` | |
| 3081 | + // Name of the visualization for later reference. | |
| 3082 | + Name *string `json:"name,omitempty"` | |
| 3083 | + // Scale, axis, and legend resolutions for layers. | |
| 3084 | + // | |
| 3085 | + // Scale, axis, and legend resolutions for facets. | |
| 3086 | + // | |
| 3087 | + // Scale and legend resolutions for repeated charts. | |
| 3088 | + // | |
| 3089 | + // Scale, axis, and legend resolutions for vertically concatenated charts. | |
| 3090 | + // | |
| 3091 | + // Scale, axis, and legend resolutions for horizontally concatenated charts. | |
| 3092 | + Resolve *Resolve `json:"resolve,omitempty"` | |
| 3093 | + // Title for the plot. | |
| 3094 | + Title *Title `json:"title"` | |
| 3095 | + // An array of data transformations such as filter and new field calculation. | |
| 3096 | + Transform *[]Transform `json:"transform,omitempty"` | |
| 3097 | + // The width of a visualization. | |
| 3098 | + // | |
| 3099 | + // __Default value:__ This will be determined by the following rules: | |
| 3100 | + // | |
| 3101 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 3102 | + // [continuous scale](scale.html#continuous), the width will be the value of | |
| 3103 | + // [`config.view.width`](spec.html#config). | |
| 3104 | + // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3105 | + // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 3106 | + // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 3107 | + // `rangeStep` is `null`, the width will be the value of | |
| 3108 | + // [`config.view.width`](spec.html#config). | |
| 3109 | + // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 3110 | + // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 3111 | + // the value of `rangeStep` for other marks. | |
| 3112 | + // | |
| 3113 | + // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3114 | + // represents the width of a single view. | |
| 3115 | + // | |
| 3116 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3117 | + Width *float64 `json:"width,omitempty"` | |
| 3118 | + // A key-value mapping between encoding channels and definition of fields. | |
| 3119 | + Encoding *Encoding `json:"encoding,omitempty"` | |
| 3120 | + // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 3121 | + // `"line"`, | |
| 3122 | + // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 3123 | + // object](mark.html#mark-def). | |
| 3124 | + Mark *AnyMark `json:"mark"` | |
| 3125 | + // An object defining properties of geographic projection. | |
| 3126 | + // | |
| 3127 | + // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 3128 | + // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 3129 | + Projection *Projection `json:"projection,omitempty"` | |
| 3130 | + // A key-value mapping between selection names and definitions. | |
| 3131 | + Selection *map[string]SelectionDef `json:"selection,omitempty"` | |
| 3132 | + // An object that describes mappings between `row` and `column` channels and their field | |
| 3133 | + // definitions. | |
| 3134 | + Facet *FacetMapping `json:"facet,omitempty"` | |
| 3135 | + // A specification of the view that gets faceted. | |
| 3136 | + Spec *Spec `json:"spec,omitempty"` | |
| 3137 | + // An object that describes what fields should be repeated into views that are laid out as a | |
| 3138 | + // `row` or `column`. | |
| 3139 | + Repeat *Repeat `json:"repeat,omitempty"` | |
| 3140 | + // A list of views that should be concatenated and put into a column. | |
| 3141 | + Vconcat *[]Spec `json:"vconcat,omitempty"` | |
| 3142 | + // A list of views that should be concatenated and put into a row. | |
| 3143 | + Hconcat *[]Spec `json:"hconcat,omitempty"` | |
| 3144 | 3144 | } |
| 3145 | 3145 | |
| 3146 | 3146 | // A key-value mapping between encoding channels and definition of fields. |
| @@ -3201,76 +3201,76 @@ type Encoding struct { | ||
| 3201 | 3201 | |
| 3202 | 3202 | // Unit spec that can have a composite mark. |
| 3203 | 3203 | type LayerSpec struct { |
| 3204 | - // An object describing the data source | |
| 3205 | - Data *Data `json:"data,omitempty"` | |
| 3206 | - // Description of this mark for commenting purpose. | |
| 3207 | - Description *string `json:"description,omitempty"` | |
| 3208 | - // The height of a visualization. | |
| 3209 | - // | |
| 3210 | - // __Default value:__ | |
| 3211 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 3212 | - // [continuous scale](scale.html#continuous), the height will be the value of | |
| 3213 | - // [`config.view.height`](spec.html#config). | |
| 3214 | - // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3215 | - // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 3216 | - // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 3217 | - // `rangeStep` is `null`, the height will be the value of | |
| 3218 | - // [`config.view.height`](spec.html#config). | |
| 3219 | - // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 3220 | - // | |
| 3221 | - // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3222 | - // represents the height of a single view. | |
| 3223 | - // | |
| 3224 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3225 | - Height *float64 `json:"height,omitempty"` | |
| 3226 | - // Layer or single view specifications to be layered. | |
| 3227 | - // | |
| 3228 | - // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 3229 | - // layering facet specifications is not allowed. | |
| 3230 | - Layer []LayerSpec `json:"layer,omitempty"` | |
| 3231 | - // Name of the visualization for later reference. | |
| 3232 | - Name *string `json:"name,omitempty"` | |
| 3233 | - // Scale, axis, and legend resolutions for layers. | |
| 3234 | - Resolve *Resolve `json:"resolve,omitempty"` | |
| 3235 | - // Title for the plot. | |
| 3236 | - Title *Title `json:"title"` | |
| 3237 | - // An array of data transformations such as filter and new field calculation. | |
| 3238 | - Transform []Transform `json:"transform,omitempty"` | |
| 3239 | - // The width of a visualization. | |
| 3240 | - // | |
| 3241 | - // __Default value:__ This will be determined by the following rules: | |
| 3242 | - // | |
| 3243 | - // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 3244 | - // [continuous scale](scale.html#continuous), the width will be the value of | |
| 3245 | - // [`config.view.width`](spec.html#config). | |
| 3246 | - // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3247 | - // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 3248 | - // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 3249 | - // `rangeStep` is `null`, the width will be the value of | |
| 3250 | - // [`config.view.width`](spec.html#config). | |
| 3251 | - // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 3252 | - // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 3253 | - // the value of `rangeStep` for other marks. | |
| 3254 | - // | |
| 3255 | - // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3256 | - // represents the width of a single view. | |
| 3257 | - // | |
| 3258 | - // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3259 | - Width *float64 `json:"width,omitempty"` | |
| 3260 | - // A key-value mapping between encoding channels and definition of fields. | |
| 3261 | - Encoding *Encoding `json:"encoding,omitempty"` | |
| 3262 | - // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 3263 | - // `"line"`, | |
| 3264 | - // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 3265 | - // object](mark.html#mark-def). | |
| 3266 | - Mark *AnyMark `json:"mark"` | |
| 3267 | - // An object defining properties of geographic projection. | |
| 3268 | - // | |
| 3269 | - // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 3270 | - // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 3271 | - Projection *Projection `json:"projection,omitempty"` | |
| 3272 | - // A key-value mapping between selection names and definitions. | |
| 3273 | - Selection map[string]SelectionDef `json:"selection,omitempty"` | |
| 3204 | + // An object describing the data source | |
| 3205 | + Data *Data `json:"data,omitempty"` | |
| 3206 | + // Description of this mark for commenting purpose. | |
| 3207 | + Description *string `json:"description,omitempty"` | |
| 3208 | + // The height of a visualization. | |
| 3209 | + // | |
| 3210 | + // __Default value:__ | |
| 3211 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its y-channel has a | |
| 3212 | + // [continuous scale](scale.html#continuous), the height will be the value of | |
| 3213 | + // [`config.view.height`](spec.html#config). | |
| 3214 | + // - For y-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3215 | + // value or unspecified, the height is [determined by the range step, paddings, and the | |
| 3216 | + // cardinality of the field mapped to y-channel](scale.html#band). Otherwise, if the | |
| 3217 | + // `rangeStep` is `null`, the height will be the value of | |
| 3218 | + // [`config.view.height`](spec.html#config). | |
| 3219 | + // - If no field is mapped to `y` channel, the `height` will be the value of `rangeStep`. | |
| 3220 | + // | |
| 3221 | + // __Note__: For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3222 | + // represents the height of a single view. | |
| 3223 | + // | |
| 3224 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3225 | + Height *float64 `json:"height,omitempty"` | |
| 3226 | + // Layer or single view specifications to be layered. | |
| 3227 | + // | |
| 3228 | + // __Note__: Specifications inside `layer` cannot use `row` and `column` channels as | |
| 3229 | + // layering facet specifications is not allowed. | |
| 3230 | + Layer *[]LayerSpec `json:"layer,omitempty"` | |
| 3231 | + // Name of the visualization for later reference. | |
| 3232 | + Name *string `json:"name,omitempty"` | |
| 3233 | + // Scale, axis, and legend resolutions for layers. | |
| 3234 | + Resolve *Resolve `json:"resolve,omitempty"` | |
| 3235 | + // Title for the plot. | |
| 3236 | + Title *Title `json:"title"` | |
| 3237 | + // An array of data transformations such as filter and new field calculation. | |
| 3238 | + Transform *[]Transform `json:"transform,omitempty"` | |
| 3239 | + // The width of a visualization. | |
| 3240 | + // | |
| 3241 | + // __Default value:__ This will be determined by the following rules: | |
| 3242 | + // | |
| 3243 | + // - If a view's [`autosize`](size.html#autosize) type is `"fit"` or its x-channel has a | |
| 3244 | + // [continuous scale](scale.html#continuous), the width will be the value of | |
| 3245 | + // [`config.view.width`](spec.html#config). | |
| 3246 | + // - For x-axis with a band or point scale: if [`rangeStep`](scale.html#band) is a numeric | |
| 3247 | + // value or unspecified, the width is [determined by the range step, paddings, and the | |
| 3248 | + // cardinality of the field mapped to x-channel](scale.html#band). Otherwise, if the | |
| 3249 | + // `rangeStep` is `null`, the width will be the value of | |
| 3250 | + // [`config.view.width`](spec.html#config). | |
| 3251 | + // - If no field is mapped to `x` channel, the `width` will be the value of | |
| 3252 | + // [`config.scale.textXRangeStep`](size.html#default-width-and-height) for `text` mark and | |
| 3253 | + // the value of `rangeStep` for other marks. | |
| 3254 | + // | |
| 3255 | + // __Note:__ For plots with [`row` and `column` channels](encoding.html#facet), this | |
| 3256 | + // represents the width of a single view. | |
| 3257 | + // | |
| 3258 | + // __See also:__ The documentation for [width and height](size.html) contains more examples. | |
| 3259 | + Width *float64 `json:"width,omitempty"` | |
| 3260 | + // A key-value mapping between encoding channels and definition of fields. | |
| 3261 | + Encoding *Encoding `json:"encoding,omitempty"` | |
| 3262 | + // A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, | |
| 3263 | + // `"line"`, | |
| 3264 | + // * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition | |
| 3265 | + // object](mark.html#mark-def). | |
| 3266 | + Mark *AnyMark `json:"mark"` | |
| 3267 | + // An object defining properties of geographic projection. | |
| 3268 | + // | |
| 3269 | + // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or | |
| 3270 | + // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. | |
| 3271 | + Projection *Projection `json:"projection,omitempty"` | |
| 3272 | + // A key-value mapping between selection names and definitions. | |
| 3273 | + Selection *map[string]SelectionDef `json:"selection,omitempty"` | |
| 3274 | 3274 | } |
| 3275 | 3275 | |
| 3276 | 3276 | type MarkDef struct { |
| @@ -3382,7 +3382,7 @@ type MarkDef struct { | ||
| 3382 | 3382 | // __Default value:__ (None) |
| 3383 | 3383 | Stroke *string `json:"stroke,omitempty"` |
| 3384 | 3384 | // An array of alternating stroke, space lengths for creating dashed or dotted lines. |
| 3385 | - StrokeDash []float64 `json:"strokeDash,omitempty"` | |
| 3385 | + StrokeDash *[]float64 `json:"strokeDash,omitempty"` | |
| 3386 | 3386 | // The offset (in pixels) into which to begin drawing with the stroke dash array. |
| 3387 | 3387 | StrokeDashOffset *float64 `json:"strokeDashOffset,omitempty"` |
| 3388 | 3388 | // The stroke opacity (value between [0,1]). |
| @@ -3423,49 +3423,49 @@ type MarkDef struct { | ||
| 3423 | 3423 | // Works with `"geoshape"` marks and `"point"` or `"line"` marks that have a channel (one or |
| 3424 | 3424 | // more of `"X"`, `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. |
| 3425 | 3425 | type Projection struct { |
| 3426 | - // Sets the projection’s center to the specified center, a two-element array of longitude | |
| 3427 | - // and latitude in degrees. | |
| 3428 | - // | |
| 3429 | - // __Default value:__ `[0, 0]` | |
| 3430 | - Center []float64 `json:"center,omitempty"` | |
| 3431 | - // Sets the projection’s clipping circle radius to the specified angle in degrees. If | |
| 3432 | - // `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather | |
| 3433 | - // than small-circle clipping. | |
| 3434 | - ClipAngle *float64 `json:"clipAngle,omitempty"` | |
| 3435 | - // Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent | |
| 3436 | - // bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of | |
| 3437 | - // the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no | |
| 3438 | - // viewport clipping is performed. | |
| 3439 | - ClipExtent [][]float64 `json:"clipExtent,omitempty"` | |
| 3440 | - Coefficient *float64 `json:"coefficient,omitempty"` | |
| 3441 | - Distance *float64 `json:"distance,omitempty"` | |
| 3442 | - Fraction *float64 `json:"fraction,omitempty"` | |
| 3443 | - Lobes *float64 `json:"lobes,omitempty"` | |
| 3444 | - Parallel *float64 `json:"parallel,omitempty"` | |
| 3445 | - // Sets the threshold for the projection’s [adaptive | |
| 3446 | - // resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This | |
| 3447 | - // value corresponds to the [Douglas–Peucker | |
| 3448 | - // distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). | |
| 3449 | - // If precision is not specified, returns the projection’s current resampling precision | |
| 3450 | - // which defaults to `√0.5 ≅ 0.70710…`. | |
| 3451 | - Precision map[string]*TitleFontWeight `json:"precision,omitempty"` | |
| 3452 | - Radius *float64 `json:"radius,omitempty"` | |
| 3453 | - Ratio *float64 `json:"ratio,omitempty"` | |
| 3454 | - // Sets the projection’s three-axis rotation to the specified angles, which must be a two- | |
| 3455 | - // or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation | |
| 3456 | - // angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.) | |
| 3457 | - // | |
| 3458 | - // __Default value:__ `[0, 0, 0]` | |
| 3459 | - Rotate []float64 `json:"rotate,omitempty"` | |
| 3460 | - Spacing *float64 `json:"spacing,omitempty"` | |
| 3461 | - Tilt *float64 `json:"tilt,omitempty"` | |
| 3462 | - // The cartographic projection to use. This value is case-insensitive, for example | |
| 3463 | - // `"albers"` and `"Albers"` indicate the same projection type. You can find all valid | |
| 3464 | - // projection types [in the | |
| 3465 | - // documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types). | |
| 3466 | - // | |
| 3467 | - // __Default value:__ `mercator` | |
| 3468 | - Type *VGProjectionType `json:"type,omitempty"` | |
| 3426 | + // Sets the projection’s center to the specified center, a two-element array of longitude | |
| 3427 | + // and latitude in degrees. | |
| 3428 | + // | |
| 3429 | + // __Default value:__ `[0, 0]` | |
| 3430 | + Center *[]float64 `json:"center,omitempty"` | |
| 3431 | + // Sets the projection’s clipping circle radius to the specified angle in degrees. If | |
| 3432 | + // `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather | |
| 3433 | + // than small-circle clipping. | |
| 3434 | + ClipAngle *float64 `json:"clipAngle,omitempty"` | |
| 3435 | + // Sets the projection’s viewport clip extent to the specified bounds in pixels. The extent | |
| 3436 | + // bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of | |
| 3437 | + // the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no | |
| 3438 | + // viewport clipping is performed. | |
| 3439 | + ClipExtent *[][]float64 `json:"clipExtent,omitempty"` | |
| 3440 | + Coefficient *float64 `json:"coefficient,omitempty"` | |
| 3441 | + Distance *float64 `json:"distance,omitempty"` | |
| 3442 | + Fraction *float64 `json:"fraction,omitempty"` | |
| 3443 | + Lobes *float64 `json:"lobes,omitempty"` | |
| 3444 | + Parallel *float64 `json:"parallel,omitempty"` | |
| 3445 | + // Sets the threshold for the projection’s [adaptive | |
| 3446 | + // resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This | |
| 3447 | + // value corresponds to the [Douglas–Peucker | |
| 3448 | + // distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). | |
| 3449 | + // If precision is not specified, returns the projection’s current resampling precision | |
| 3450 | + // which defaults to `√0.5 ≅ 0.70710…`. | |
| 3451 | + Precision *map[string]*TitleFontWeight `json:"precision,omitempty"` | |
| 3452 | + Radius *float64 `json:"radius,omitempty"` | |
| 3453 | + Ratio *float64 `json:"ratio,omitempty"` | |
| 3454 | + // Sets the projection’s three-axis rotation to the specified angles, which must be a two- | |
| 3455 | + // or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation | |
| 3456 | + // angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.) | |
| 3457 | + // | |
| 3458 | + // __Default value:__ `[0, 0, 0]` | |
| 3459 | + Rotate *[]float64 `json:"rotate,omitempty"` | |
| 3460 | + Spacing *float64 `json:"spacing,omitempty"` | |
| 3461 | + Tilt *float64 `json:"tilt,omitempty"` | |
| 3462 | + // The cartographic projection to use. This value is case-insensitive, for example | |
| 3463 | + // `"albers"` and `"Albers"` indicate the same projection type. You can find all valid | |
| 3464 | + // projection types [in the | |
| 3465 | + // documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types). | |
| 3466 | + // | |
| 3467 | + // __Default value:__ `mercator` | |
| 3468 | + Type *VGProjectionType `json:"type,omitempty"` | |
| 3469 | 3469 | } |
| 3470 | 3470 | |
| 3471 | 3471 | // Scale, axis, and legend resolutions for layers. |
| @@ -3524,10 +3524,10 @@ type SelectionDef struct { | ||
| 3524 | 3524 | Empty *Empty `json:"empty,omitempty"` |
| 3525 | 3525 | // An array of encoding channels. The corresponding data field values |
| 3526 | 3526 | // must match for a data tuple to fall within the selection. |
| 3527 | - Encodings []SingleDefChannel `json:"encodings,omitempty"` | |
| 3527 | + Encodings *[]SingleDefChannel `json:"encodings,omitempty"` | |
| 3528 | 3528 | // An array of field names whose values must match for a data tuple to |
| 3529 | 3529 | // fall within the selection. |
| 3530 | - Fields []string `json:"fields,omitempty"` | |
| 3530 | + Fields *[]string `json:"fields,omitempty"` | |
| 3531 | 3531 | // When true, an invisible voronoi diagram is computed to accelerate discrete |
| 3532 | 3532 | // selection. The data value _nearest_ the mouse cursor is added to the selection. |
| 3533 | 3533 | // |
| @@ -3642,10 +3642,10 @@ type Transform struct { | ||
| 3642 | 3642 | // The timeUnit. |
| 3643 | 3643 | TimeUnit *TimeUnit `json:"timeUnit,omitempty"` |
| 3644 | 3644 | // Array of objects that define fields to aggregate. |
| 3645 | - Aggregate []AggregatedFieldDef `json:"aggregate,omitempty"` | |
| 3645 | + Aggregate *[]AggregatedFieldDef `json:"aggregate,omitempty"` | |
| 3646 | 3646 | // The data fields to group by. If not specified, a single group containing all data objects |
| 3647 | 3647 | // will be used. |
| 3648 | - Groupby []string `json:"groupby,omitempty"` | |
| 3648 | + Groupby *[]string `json:"groupby,omitempty"` | |
| 3649 | 3649 | } |
| 3650 | 3650 | |
| 3651 | 3651 | type AggregatedFieldDef struct { |
| @@ -3662,22 +3662,22 @@ type AggregatedFieldDef struct { | ||
| 3662 | 3662 | |
| 3663 | 3663 | // Secondary data reference. |
| 3664 | 3664 | type LookupData struct { |
| 3665 | - // Secondary data source to lookup in. | |
| 3666 | - Data Data `json:"data"` | |
| 3667 | - // Fields in foreign data to lookup. | |
| 3668 | - // If not specified, the entire object is queried. | |
| 3669 | - Fields []string `json:"fields,omitempty"` | |
| 3670 | - // Key in data to lookup. | |
| 3671 | - Key string `json:"key"` | |
| 3665 | + // Secondary data source to lookup in. | |
| 3666 | + Data Data `json:"data"` | |
| 3667 | + // Fields in foreign data to lookup. | |
| 3668 | + // If not specified, the entire object is queried. | |
| 3669 | + Fields *[]string `json:"fields,omitempty"` | |
| 3670 | + // Key in data to lookup. | |
| 3671 | + Key string `json:"key"` | |
| 3672 | 3672 | } |
| 3673 | 3673 | |
| 3674 | 3674 | // An object that describes what fields should be repeated into views that are laid out as a |
| 3675 | 3675 | // `row` or `column`. |
| 3676 | 3676 | type Repeat struct { |
| 3677 | - // Horizontal repeated views. | |
| 3678 | - Column []string `json:"column,omitempty"` | |
| 3679 | - // Vertical repeated views. | |
| 3680 | - Row []string `json:"row,omitempty"` | |
| 3677 | + // Horizontal repeated views. | |
| 3678 | + Column *[]string `json:"column,omitempty"` | |
| 3679 | + // Vertical repeated views. | |
| 3680 | + Row *[]string `json:"row,omitempty"` | |
| 3681 | 3681 | } |
| 3682 | 3682 | |
| 3683 | 3683 | // Determines how size calculation should be performed, one of `"content"` or `"padding"`. |
No generated files match these filters.