Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid generated Go code when parsing vega-lite json schema #44

Open
morangorin opened this issue Apr 14, 2018 · 5 comments
Open

Invalid generated Go code when parsing vega-lite json schema #44

morangorin opened this issue Apr 14, 2018 · 5 comments

Comments

@morangorin
Copy link

Generating go code from:
https://vega.github.io/schema/vega-lite/v2.0.json
generates go with an invalid syntax. There are at least the following issues:

  1. some descriptions include the character \n and html. Multi-line comments are being generated but are not protected with //
  2. some names in that JSON schema include special characters such as < and > which are invalid in structure name in Go
  3. some references are not found. Perhaps they could be replaced by interface{} such that the code always compiles
@a-h
Copy link
Owner

a-h commented Apr 14, 2018

Thanks, I can spot that some of the references not being found is basically the same issue as #43. The current generation tool doesn't support the anyOf behaviour.

So this is supported:

{
        "$schema": "http://json-schema.org/schema#",
        "title": "root",
        "properties": {
            "name": {
                "type": [ "integer", "string" ]
            }
        }
    }

But not this:

{
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "Example",
        "properties": {
			"name" : {
				"anyOf": [ "string", "number" ] 
			}
		}
    }

@a-h
Copy link
Owner

a-h commented Apr 14, 2018

So, to support number 3, would probably need to rework the Schema type to change the type of the Properties field away from map[string]*Schema and to something more similar to the AdditionalProperties type which has custom unmarshalling to support the existence of anyOf, allOf keys.

@a-h
Copy link
Owner

a-h commented Apr 14, 2018

The clean up of the descriptions and JSON schema names should be trivial to resolve though.

@a-h
Copy link
Owner

a-h commented Apr 14, 2018

I'm guessing you want to use the schema generation tool to make a Go API for Vega, which would be quite cool. Those two improvements reduce the work of fixing up the output a fair amount, I think having loads of interface{} on the API surface isn't what you want, but if you want to try it, you can just update generator.go from:

	return "undefined", fmt.Errorf("failed to get a primitive type for schemaType %s and subtype %s",
		schemaType, subType)

To:

	return "interface{}", fmt.Errorf("failed to get a primitive type for schemaType %s and subtype %s",
		schemaType, subType)

I gave it a go and cleaned up the output:

// Code generated by schema-generate. DO NOT EDIT.
package vega

// AggregateTransform
type AggregateTransform struct {
	Aggregate []*AggregatedFieldDef `json:"aggregate"`
	Groupby   []string              `json:"groupby,omitempty"`
}

// AggregatedFieldDef
type AggregatedFieldDef struct {
	As    string      `json:"as"`
	Field string      `json:"field"`
	Op    interface{} `json:"op"`
}

// AndFilter
type AndFilter struct {
	And interface{} `json:"and"`
}

// AutoSizeParams
type AutoSizeParams struct {
	Contains string      `json:"contains,omitempty"`
	Resize   bool        `json:"resize,omitempty"`
	Type     interface{} `json:"type,omitempty"`
}

// Axis
type Axis struct {
	Domain         bool        `json:"domain,omitempty"`
	Format         string      `json:"format,omitempty"`
	Grid           bool        `json:"grid,omitempty"`
	LabelAngle     float64     `json:"labelAngle,omitempty"`
	LabelBound     interface{} `json:"labelBound,omitempty"`
	LabelFlush     interface{} `json:"labelFlush,omitempty"`
	LabelOverlap   interface{} `json:"labelOverlap,omitempty"`
	LabelPadding   float64     `json:"labelPadding,omitempty"`
	Labels         bool        `json:"labels,omitempty"`
	MaxExtent      float64     `json:"maxExtent,omitempty"`
	MinExtent      float64     `json:"minExtent,omitempty"`
	Offset         float64     `json:"offset,omitempty"`
	Orient         interface{} `json:"orient,omitempty"`
	Position       float64     `json:"position,omitempty"`
	TickCount      float64     `json:"tickCount,omitempty"`
	TickSize       float64     `json:"tickSize,omitempty"`
	Ticks          bool        `json:"ticks,omitempty"`
	Title          interface{} `json:"title,omitempty"`
	TitleMaxLength float64     `json:"titleMaxLength,omitempty"`
	TitlePadding   float64     `json:"titlePadding,omitempty"`
	Values         interface{} `json:"values,omitempty"`
	Zindex         float64     `json:"zindex,omitempty"`
}

// AxisConfig
type AxisConfig struct {
	BandPosition    float64     `json:"bandPosition,omitempty"`
	Domain          bool        `json:"domain,omitempty"`
	DomainColor     string      `json:"domainColor,omitempty"`
	DomainWidth     float64     `json:"domainWidth,omitempty"`
	Grid            bool        `json:"grid,omitempty"`
	GridColor       string      `json:"gridColor,omitempty"`
	GridDash        []float64   `json:"gridDash,omitempty"`
	GridOpacity     float64     `json:"gridOpacity,omitempty"`
	GridWidth       float64     `json:"gridWidth,omitempty"`
	LabelAngle      float64     `json:"labelAngle,omitempty"`
	LabelBound      interface{} `json:"labelBound,omitempty"`
	LabelColor      string      `json:"labelColor,omitempty"`
	LabelFlush      interface{} `json:"labelFlush,omitempty"`
	LabelFont       string      `json:"labelFont,omitempty"`
	LabelFontSize   float64     `json:"labelFontSize,omitempty"`
	LabelLimit      float64     `json:"labelLimit,omitempty"`
	LabelOverlap    interface{} `json:"labelOverlap,omitempty"`
	LabelPadding    float64     `json:"labelPadding,omitempty"`
	Labels          bool        `json:"labels,omitempty"`
	MaxExtent       float64     `json:"maxExtent,omitempty"`
	MinExtent       float64     `json:"minExtent,omitempty"`
	ShortTimeLabels bool        `json:"shortTimeLabels,omitempty"`
	TickColor       string      `json:"tickColor,omitempty"`
	TickRound       bool        `json:"tickRound,omitempty"`
	TickSize        float64     `json:"tickSize,omitempty"`
	TickWidth       float64     `json:"tickWidth,omitempty"`
	Ticks           bool        `json:"ticks,omitempty"`
	TitleAlign      string      `json:"titleAlign,omitempty"`
	TitleAngle      float64     `json:"titleAngle,omitempty"`
	TitleBaseline   string      `json:"titleBaseline,omitempty"`
	TitleColor      string      `json:"titleColor,omitempty"`
	TitleFont       string      `json:"titleFont,omitempty"`
	TitleFontSize   float64     `json:"titleFontSize,omitempty"`
	TitleFontWeight interface{} `json:"titleFontWeight,omitempty"`
	TitleLimit      float64     `json:"titleLimit,omitempty"`
	TitleMaxLength  float64     `json:"titleMaxLength,omitempty"`
	TitlePadding    float64     `json:"titlePadding,omitempty"`
	TitleX          float64     `json:"titleX,omitempty"`
	TitleY          float64     `json:"titleY,omitempty"`
}

// AxisResolveMap
type AxisResolveMap struct {
	X interface{} `json:"x,omitempty"`
	Y interface{} `json:"y,omitempty"`
}

// BarConfig
type BarConfig struct {
	Align              interface{} `json:"align,omitempty"`
	Angle              float64     `json:"angle,omitempty"`
	Baseline           interface{} `json:"baseline,omitempty"`
	BinSpacing         float64     `json:"binSpacing,omitempty"`
	Color              string      `json:"color,omitempty"`
	ContinuousBandSize float64     `json:"continuousBandSize,omitempty"`
	DiscreteBandSize   float64     `json:"discreteBandSize,omitempty"`
	Dx                 float64     `json:"dx,omitempty"`
	Dy                 float64     `json:"dy,omitempty"`
	Fill               string      `json:"fill,omitempty"`
	FillOpacity        float64     `json:"fillOpacity,omitempty"`
	Filled             bool        `json:"filled,omitempty"`
	Font               string      `json:"font,omitempty"`
	FontSize           float64     `json:"fontSize,omitempty"`
	FontStyle          interface{} `json:"fontStyle,omitempty"`
	FontWeight         interface{} `json:"fontWeight,omitempty"`
	Interpolate        interface{} `json:"interpolate,omitempty"`
	Limit              float64     `json:"limit,omitempty"`
	Opacity            float64     `json:"opacity,omitempty"`
	Orient             interface{} `json:"orient,omitempty"`
	Radius             float64     `json:"radius,omitempty"`
	Shape              string      `json:"shape,omitempty"`
	Size               float64     `json:"size,omitempty"`
	Stroke             string      `json:"stroke,omitempty"`
	StrokeDash         []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset   float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity      float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth        float64     `json:"strokeWidth,omitempty"`
	Tension            float64     `json:"tension,omitempty"`
	Text               string      `json:"text,omitempty"`
	Theta              float64     `json:"theta,omitempty"`
}

// BinParams Binning properties or boolean flag for determining whether to bin data or not.
type BinParams struct {
	Base    float64   `json:"base,omitempty"`
	Divide  []float64 `json:"divide,omitempty"`
	Extent  []float64 `json:"extent,omitempty"`
	Maxbins float64   `json:"maxbins,omitempty"`
	Minstep float64   `json:"minstep,omitempty"`
	Nice    bool      `json:"nice,omitempty"`
	Step    float64   `json:"step,omitempty"`
	Steps   []float64 `json:"steps,omitempty"`
}

// BinTransform
type BinTransform struct {
	As    string      `json:"as"`
	Bin   interface{} `json:"bin"`
	Field string      `json:"field"`
}

// BrushConfig
type BrushConfig struct {
	Fill             string    `json:"fill,omitempty"`
	FillOpacity      float64   `json:"fillOpacity,omitempty"`
	Stroke           string    `json:"stroke,omitempty"`
	StrokeDash       []float64 `json:"strokeDash,omitempty"`
	StrokeDashOffset float64   `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64   `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64   `json:"strokeWidth,omitempty"`
}

// CalculateTransform
type CalculateTransform struct {
	As        string `json:"as"`
	Calculate string `json:"calculate"`
}

// CompositeUnitSpecAlias
type CompositeUnitSpecAlias struct {
	Data        interface{}            `json:"data,omitempty"`
	Description string                 `json:"description,omitempty"`
	Encoding    *Encoding              `json:"encoding"`
	Height      float64                `json:"height,omitempty"`
	Mark        interface{}            `json:"mark"`
	Name        string                 `json:"name,omitempty"`
	Selection   map[string]interface{} `json:"selection,omitempty"`
	Title       interface{}            `json:"title,omitempty"`
	Transform   []interface{}          `json:"transform,omitempty"`
	Width       float64                `json:"width,omitempty"`
}

// ConditionalMarkPropFieldDef
type ConditionalMarkPropFieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Legend    interface{} `json:"legend,omitempty"`
	Scale     *Scale      `json:"scale,omitempty"`
	Selection interface{} `json:"selection"`
	Sort      interface{} `json:"sort,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// ConditionalTextFieldDef
type ConditionalTextFieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Format    string      `json:"format,omitempty"`
	Selection interface{} `json:"selection"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// ConditionalValueDef
type ConditionalValueDef struct {
	Selection interface{} `json:"selection"`
	Value     interface{} `json:"value"`
}

// Config
type Config struct {
	Area          *MarkConfig      `json:"area,omitempty"`
	Autosize      interface{}      `json:"autosize,omitempty"`
	Axis          *AxisConfig      `json:"axis,omitempty"`
	AxisBand      *VgAxisConfig    `json:"axisBand,omitempty"`
	AxisBottom    *VgAxisConfig    `json:"axisBottom,omitempty"`
	AxisLeft      *VgAxisConfig    `json:"axisLeft,omitempty"`
	AxisRight     *VgAxisConfig    `json:"axisRight,omitempty"`
	AxisTop       *VgAxisConfig    `json:"axisTop,omitempty"`
	AxisX         *VgAxisConfig    `json:"axisX,omitempty"`
	AxisY         *VgAxisConfig    `json:"axisY,omitempty"`
	Background    string           `json:"background,omitempty"`
	Bar           *BarConfig       `json:"bar,omitempty"`
	Circle        *MarkConfig      `json:"circle,omitempty"`
	CountTitle    string           `json:"countTitle,omitempty"`
	FieldTitle    string           `json:"fieldTitle,omitempty"`
	InvalidValues interface{}      `json:"invalidValues,omitempty"`
	Legend        *LegendConfig    `json:"legend,omitempty"`
	Line          *MarkConfig      `json:"line,omitempty"`
	Mark          *MarkConfig      `json:"mark,omitempty"`
	NumberFormat  string           `json:"numberFormat,omitempty"`
	Padding       interface{}      `json:"padding,omitempty"`
	Point         *MarkConfig      `json:"point,omitempty"`
	Range         *RangeConfig     `json:"range,omitempty"`
	Rect          *MarkConfig      `json:"rect,omitempty"`
	Rule          *MarkConfig      `json:"rule,omitempty"`
	Scale         *ScaleConfig     `json:"scale,omitempty"`
	Selection     *SelectionConfig `json:"selection,omitempty"`
	Square        *MarkConfig      `json:"square,omitempty"`
	Stack         interface{}      `json:"stack,omitempty"`
	Style         interface{}      `json:"style,omitempty"`
	Text          *TextConfig      `json:"text,omitempty"`
	Tick          *TickConfig      `json:"tick,omitempty"`
	TimeFormat    string           `json:"timeFormat,omitempty"`
	Title         *VgTitleConfig   `json:"title,omitempty"`
	View          *ViewConfig      `json:"view,omitempty"`
}

// CsvDataFormat
type CsvDataFormat struct {
	Parse interface{} `json:"parse,omitempty"`
	Type  string      `json:"type,omitempty"`
}

// DateTime Object for defining datetime in Vega-Lite Filter.
// If both month and quarter are provided, month has higher precedence.
// `day` cannot be combined with other date.
// We accept string for month and day names.
type DateTime struct {
	Date         float64     `json:"date,omitempty"`
	Day          interface{} `json:"day,omitempty"`
	Hours        float64     `json:"hours,omitempty"`
	Milliseconds float64     `json:"milliseconds,omitempty"`
	Minutes      float64     `json:"minutes,omitempty"`
	Month        interface{} `json:"month,omitempty"`
	Quarter      float64     `json:"quarter,omitempty"`
	Seconds      float64     `json:"seconds,omitempty"`
	Utc          bool        `json:"utc,omitempty"`
	Year         float64     `json:"year,omitempty"`
}

// Encoding
type Encoding struct {
	Color   interface{} `json:"color,omitempty"`
	Detail  interface{} `json:"detail,omitempty"`
	Opacity interface{} `json:"opacity,omitempty"`
	Order   interface{} `json:"order,omitempty"`
	Shape   interface{} `json:"shape,omitempty"`
	Size    interface{} `json:"size,omitempty"`
	Text    interface{} `json:"text,omitempty"`
	Tooltip interface{} `json:"tooltip,omitempty"`
	X       interface{} `json:"x,omitempty"`
	X2      interface{} `json:"x2,omitempty"`
	Y       interface{} `json:"y,omitempty"`
	Y2      interface{} `json:"y2,omitempty"`
}

// EncodingWithFacet
type EncodingWithFacet struct {
	Color   interface{}    `json:"color,omitempty"`
	Column  *FacetFieldDef `json:"column,omitempty"`
	Detail  interface{}    `json:"detail,omitempty"`
	Opacity interface{}    `json:"opacity,omitempty"`
	Order   interface{}    `json:"order,omitempty"`
	Row     *FacetFieldDef `json:"row,omitempty"`
	Shape   interface{}    `json:"shape,omitempty"`
	Size    interface{}    `json:"size,omitempty"`
	Text    interface{}    `json:"text,omitempty"`
	Tooltip interface{}    `json:"tooltip,omitempty"`
	X       interface{}    `json:"x,omitempty"`
	X2      interface{}    `json:"x2,omitempty"`
	Y       interface{}    `json:"y,omitempty"`
	Y2      interface{}    `json:"y2,omitempty"`
}

// EqualFilter
type EqualFilter struct {
	Equal    interface{} `json:"equal"`
	Field    string      `json:"field"`
	TimeUnit interface{} `json:"timeUnit,omitempty"`
}

// FacetFieldDef
type FacetFieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Header    *Header     `json:"header,omitempty"`
	Sort      interface{} `json:"sort,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// FacetMapping
type FacetMapping struct {
	Column *FacetFieldDef `json:"column,omitempty"`
	Row    *FacetFieldDef `json:"row,omitempty"`
}

// FacetSpec
type FacetSpec struct {
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Facet       *FacetMapping `json:"facet"`
	Name        string        `json:"name,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Spec        interface{}   `json:"spec"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// FacetedCompositeUnitSpecAlias
type FacetedCompositeUnitSpecAlias struct {
	Data        interface{}            `json:"data,omitempty"`
	Description string                 `json:"description,omitempty"`
	Encoding    *EncodingWithFacet     `json:"encoding"`
	Height      float64                `json:"height,omitempty"`
	Mark        interface{}            `json:"mark"`
	Name        string                 `json:"name,omitempty"`
	Selection   map[string]interface{} `json:"selection,omitempty"`
	Title       interface{}            `json:"title,omitempty"`
	Transform   []interface{}          `json:"transform,omitempty"`
	Width       float64                `json:"width,omitempty"`
}

// FieldDef Definition object for a data field, its type and transformation of an encoding channel.
type FieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// FilterTransform
type FilterTransform struct {
	Filter interface{} `json:"filter"`
}

// HConcatSpec
type HConcatSpec struct {
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Hconcat     []interface{} `json:"hconcat"`
	Name        string        `json:"name,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// Header Headers of row / column channels for faceted plots.
type Header struct {
	Format     string      `json:"format,omitempty"`
	LabelAngle float64     `json:"labelAngle,omitempty"`
	Title      interface{} `json:"title,omitempty"`
}

// InlineData
type InlineData struct {
	Format interface{} `json:"format,omitempty"`
	Values interface{} `json:"values"`
}

// InterpolateParams
type InterpolateParams struct {
	Gamma float64 `json:"gamma,omitempty"`
	Type  string  `json:"type"`
}

// IntervalSelection
type IntervalSelection struct {
	Bind      string        `json:"bind,omitempty"`
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Mark      *BrushConfig  `json:"mark,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
	Translate interface{}   `json:"translate,omitempty"`
	Type      string        `json:"type"`
	Zoom      interface{}   `json:"zoom,omitempty"`
}

// IntervalSelectionConfig
type IntervalSelectionConfig struct {
	Bind      string        `json:"bind,omitempty"`
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Mark      *BrushConfig  `json:"mark,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
	Translate interface{}   `json:"translate,omitempty"`
	Zoom      interface{}   `json:"zoom,omitempty"`
}

// JsonDataFormat
type JsonDataFormat struct {
	Parse    interface{} `json:"parse,omitempty"`
	Property string      `json:"property,omitempty"`
	Type     string      `json:"type,omitempty"`
}

// LayerSpec
type LayerSpec struct {
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Height      float64       `json:"height,omitempty"`
	Layer       []interface{} `json:"layer"`
	Name        string        `json:"name,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
	Width       float64       `json:"width,omitempty"`
}

// Legend Properties of a legend or boolean flag for determining whether to show it.
type Legend struct {
	EntryPadding float64     `json:"entryPadding,omitempty"`
	Format       string      `json:"format,omitempty"`
	Offset       float64     `json:"offset,omitempty"`
	Orient       interface{} `json:"orient,omitempty"`
	Padding      float64     `json:"padding,omitempty"`
	TickCount    float64     `json:"tickCount,omitempty"`
	Title        interface{} `json:"title,omitempty"`
	Type         string      `json:"type,omitempty"`
	Values       interface{} `json:"values,omitempty"`
	Zindex       float64     `json:"zindex,omitempty"`
}

// LegendConfig
type LegendConfig struct {
	CornerRadius          float64     `json:"cornerRadius,omitempty"`
	EntryPadding          float64     `json:"entryPadding,omitempty"`
	FillColor             string      `json:"fillColor,omitempty"`
	GradientHeight        float64     `json:"gradientHeight,omitempty"`
	GradientLabelBaseline string      `json:"gradientLabelBaseline,omitempty"`
	GradientLabelLimit    float64     `json:"gradientLabelLimit,omitempty"`
	GradientLabelOffset   float64     `json:"gradientLabelOffset,omitempty"`
	GradientStrokeColor   string      `json:"gradientStrokeColor,omitempty"`
	GradientStrokeWidth   float64     `json:"gradientStrokeWidth,omitempty"`
	GradientWidth         float64     `json:"gradientWidth,omitempty"`
	LabelAlign            string      `json:"labelAlign,omitempty"`
	LabelBaseline         string      `json:"labelBaseline,omitempty"`
	LabelColor            string      `json:"labelColor,omitempty"`
	LabelFont             string      `json:"labelFont,omitempty"`
	LabelFontSize         float64     `json:"labelFontSize,omitempty"`
	LabelLimit            float64     `json:"labelLimit,omitempty"`
	LabelOffset           float64     `json:"labelOffset,omitempty"`
	Offset                float64     `json:"offset,omitempty"`
	Orient                interface{} `json:"orient,omitempty"`
	Padding               float64     `json:"padding,omitempty"`
	ShortTimeLabels       bool        `json:"shortTimeLabels,omitempty"`
	StrokeColor           string      `json:"strokeColor,omitempty"`
	StrokeDash            []float64   `json:"strokeDash,omitempty"`
	StrokeWidth           float64     `json:"strokeWidth,omitempty"`
	SymbolColor           string      `json:"symbolColor,omitempty"`
	SymbolSize            float64     `json:"symbolSize,omitempty"`
	SymbolStrokeWidth     float64     `json:"symbolStrokeWidth,omitempty"`
	SymbolType            string      `json:"symbolType,omitempty"`
	TitleAlign            string      `json:"titleAlign,omitempty"`
	TitleBaseline         string      `json:"titleBaseline,omitempty"`
	TitleColor            string      `json:"titleColor,omitempty"`
	TitleFont             string      `json:"titleFont,omitempty"`
	TitleFontSize         float64     `json:"titleFontSize,omitempty"`
	TitleFontWeight       interface{} `json:"titleFontWeight,omitempty"`
	TitleLimit            float64     `json:"titleLimit,omitempty"`
	TitlePadding          float64     `json:"titlePadding,omitempty"`
}

// LegendResolveMap
type LegendResolveMap struct {
	Color   interface{} `json:"color,omitempty"`
	Opacity interface{} `json:"opacity,omitempty"`
	Shape   interface{} `json:"shape,omitempty"`
	Size    interface{} `json:"size,omitempty"`
}

// LookupData
type LookupData struct {
	Data   interface{} `json:"data"`
	Fields []string    `json:"fields,omitempty"`
	Key    string      `json:"key"`
}

// LookupTransform
type LookupTransform struct {
	As      interface{} `json:"as,omitempty"`
	Default string      `json:"default,omitempty"`
	From    *LookupData `json:"from"`
	Lookup  string      `json:"lookup"`
}

// MarkConfig
type MarkConfig struct {
	Align            interface{} `json:"align,omitempty"`
	Angle            float64     `json:"angle,omitempty"`
	Baseline         interface{} `json:"baseline,omitempty"`
	Color            string      `json:"color,omitempty"`
	Dx               float64     `json:"dx,omitempty"`
	Dy               float64     `json:"dy,omitempty"`
	Fill             string      `json:"fill,omitempty"`
	FillOpacity      float64     `json:"fillOpacity,omitempty"`
	Filled           bool        `json:"filled,omitempty"`
	Font             string      `json:"font,omitempty"`
	FontSize         float64     `json:"fontSize,omitempty"`
	FontStyle        interface{} `json:"fontStyle,omitempty"`
	FontWeight       interface{} `json:"fontWeight,omitempty"`
	Interpolate      interface{} `json:"interpolate,omitempty"`
	Limit            float64     `json:"limit,omitempty"`
	Opacity          float64     `json:"opacity,omitempty"`
	Orient           interface{} `json:"orient,omitempty"`
	Radius           float64     `json:"radius,omitempty"`
	Shape            string      `json:"shape,omitempty"`
	Size             float64     `json:"size,omitempty"`
	Stroke           string      `json:"stroke,omitempty"`
	StrokeDash       []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64     `json:"strokeWidth,omitempty"`
	Tension          float64     `json:"tension,omitempty"`
	Text             string      `json:"text,omitempty"`
	Theta            float64     `json:"theta,omitempty"`
}

// MarkDef
type MarkDef struct {
	Align            interface{} `json:"align,omitempty"`
	Angle            float64     `json:"angle,omitempty"`
	Baseline         interface{} `json:"baseline,omitempty"`
	Clip             bool        `json:"clip,omitempty"`
	Color            string      `json:"color,omitempty"`
	Dx               float64     `json:"dx,omitempty"`
	Dy               float64     `json:"dy,omitempty"`
	Fill             string      `json:"fill,omitempty"`
	FillOpacity      float64     `json:"fillOpacity,omitempty"`
	Filled           bool        `json:"filled,omitempty"`
	Font             string      `json:"font,omitempty"`
	FontSize         float64     `json:"fontSize,omitempty"`
	FontStyle        interface{} `json:"fontStyle,omitempty"`
	FontWeight       interface{} `json:"fontWeight,omitempty"`
	Interpolate      interface{} `json:"interpolate,omitempty"`
	Limit            float64     `json:"limit,omitempty"`
	Opacity          float64     `json:"opacity,omitempty"`
	Orient           interface{} `json:"orient,omitempty"`
	Radius           float64     `json:"radius,omitempty"`
	Shape            string      `json:"shape,omitempty"`
	Size             float64     `json:"size,omitempty"`
	Stroke           string      `json:"stroke,omitempty"`
	StrokeDash       []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64     `json:"strokeWidth,omitempty"`
	Style            interface{} `json:"style,omitempty"`
	Tension          float64     `json:"tension,omitempty"`
	Text             string      `json:"text,omitempty"`
	Theta            float64     `json:"theta,omitempty"`
	Type             interface{} `json:"type"`
}

// MarkPropFieldDefWithCondition A FieldDef with Condition<ValueDef>
// {
//    condition: {value: ...},
//    field: ...,
//    ...
// }
type MarkPropFieldDefWithCondition struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Condition interface{} `json:"condition,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Legend    interface{} `json:"legend,omitempty"`
	Scale     *Scale      `json:"scale,omitempty"`
	Sort      interface{} `json:"sort,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// MarkPropValueDefWithCondition A ValueDef with Condition<ValueDef | FieldDef>
// {
//    condition: {field: ...} | {value: ...},
//    value: ...,
// }
type MarkPropValueDefWithCondition struct {
	Condition interface{} `json:"condition,omitempty"`
	Value     interface{} `json:"value,omitempty"`
}

// MultiSelection
type MultiSelection struct {
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Nearest   bool          `json:"nearest,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
	Toggle    interface{}   `json:"toggle,omitempty"`
	Type      string        `json:"type"`
}

// MultiSelectionConfig
type MultiSelectionConfig struct {
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Nearest   bool          `json:"nearest,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
	Toggle    interface{}   `json:"toggle,omitempty"`
}

// NamedData
type NamedData struct {
	Format interface{} `json:"format,omitempty"`
	Name   string      `json:"name"`
}

// NotFilter
type NotFilter struct {
	Not interface{} `json:"not"`
}

// OneOfFilter
type OneOfFilter struct {
	Field    string      `json:"field"`
	OneOf    interface{} `json:"oneOf"`
	TimeUnit interface{} `json:"timeUnit,omitempty"`
}

// OrFilter
type OrFilter struct {
	Or []interface{} `json:"or"`
}

// OrderFieldDef
type OrderFieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Sort      interface{} `json:"sort,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// PositionFieldDef
type PositionFieldDef struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Axis      interface{} `json:"axis,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Scale     *Scale      `json:"scale,omitempty"`
	Sort      interface{} `json:"sort,omitempty"`
	Stack     interface{} `json:"stack,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// RangeConfig
type RangeConfig struct {
	Category  interface{} `json:"category,omitempty"`
	Diverging interface{} `json:"diverging,omitempty"`
	Heatmap   interface{} `json:"heatmap,omitempty"`
	Ordinal   interface{} `json:"ordinal,omitempty"`
	Ramp      interface{} `json:"ramp,omitempty"`
	Symbol    []string    `json:"symbol,omitempty"`
}

// RangeFilter
type RangeFilter struct {
	Field    string        `json:"field"`
	Range    []interface{} `json:"range"`
	TimeUnit interface{}   `json:"timeUnit,omitempty"`
}

// Repeat
type Repeat struct {
	Column []string `json:"column,omitempty"`
	Row    []string `json:"row,omitempty"`
}

// RepeatRef Reference to a repeated value.
type RepeatRef struct {
	Repeat string `json:"repeat"`
}

// RepeatSpec
type RepeatSpec struct {
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Name        string        `json:"name,omitempty"`
	Repeat      *Repeat       `json:"repeat"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Spec        interface{}   `json:"spec"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// Resolve Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions.
type Resolve struct {
	Axis   *AxisResolveMap   `json:"axis,omitempty"`
	Legend *LegendResolveMap `json:"legend,omitempty"`
	Scale  *ScaleResolveMap  `json:"scale,omitempty"`
}

// Scale
type Scale struct {
	Base         float64     `json:"base,omitempty"`
	Clamp        bool        `json:"clamp,omitempty"`
	Domain       interface{} `json:"domain,omitempty"`
	Exponent     float64     `json:"exponent,omitempty"`
	Interpolate  interface{} `json:"interpolate,omitempty"`
	Nice         interface{} `json:"nice,omitempty"`
	Padding      float64     `json:"padding,omitempty"`
	PaddingInner float64     `json:"paddingInner,omitempty"`
	PaddingOuter float64     `json:"paddingOuter,omitempty"`
	Range        interface{} `json:"range,omitempty"`
	RangeStep    interface{} `json:"rangeStep,omitempty"`
	Round        bool        `json:"round,omitempty"`
	Scheme       interface{} `json:"scheme,omitempty"`
	Type         interface{} `json:"type,omitempty"`
	Zero         bool        `json:"zero,omitempty"`
}

// ScaleConfig
type ScaleConfig struct {
	BandPaddingInner      float64     `json:"bandPaddingInner,omitempty"`
	BandPaddingOuter      float64     `json:"bandPaddingOuter,omitempty"`
	Clamp                 bool        `json:"clamp,omitempty"`
	ContinuousPadding     float64     `json:"continuousPadding,omitempty"`
	MaxBandSize           float64     `json:"maxBandSize,omitempty"`
	MaxFontSize           float64     `json:"maxFontSize,omitempty"`
	MaxOpacity            float64     `json:"maxOpacity,omitempty"`
	MaxSize               float64     `json:"maxSize,omitempty"`
	MaxStrokeWidth        float64     `json:"maxStrokeWidth,omitempty"`
	MinBandSize           float64     `json:"minBandSize,omitempty"`
	MinFontSize           float64     `json:"minFontSize,omitempty"`
	MinOpacity            float64     `json:"minOpacity,omitempty"`
	MinSize               float64     `json:"minSize,omitempty"`
	MinStrokeWidth        float64     `json:"minStrokeWidth,omitempty"`
	PointPadding          float64     `json:"pointPadding,omitempty"`
	RangeStep             interface{} `json:"rangeStep,omitempty"`
	Round                 bool        `json:"round,omitempty"`
	TextXRangeStep        float64     `json:"textXRangeStep,omitempty"`
	UseUnaggregatedDomain bool        `json:"useUnaggregatedDomain,omitempty"`
}

// ScaleResolveMap
type ScaleResolveMap struct {
	Color   interface{} `json:"color,omitempty"`
	Opacity interface{} `json:"opacity,omitempty"`
	Shape   interface{} `json:"shape,omitempty"`
	Size    interface{} `json:"size,omitempty"`
	X       interface{} `json:"x,omitempty"`
	Y       interface{} `json:"y,omitempty"`
}

// SchemeParams
type SchemeParams struct {
	Extent []float64 `json:"extent,omitempty"`
	Name   string    `json:"name"`
}

// SelectionAnd
type SelectionAnd struct {
	And []interface{} `json:"and"`
}

// SelectionConfig
type SelectionConfig struct {
	Interval *IntervalSelectionConfig `json:"interval,omitempty"`
	Multi    *MultiSelectionConfig    `json:"multi,omitempty"`
	Single   *SingleSelectionConfig   `json:"single,omitempty"`
}

// SelectionFilter
type SelectionFilter struct {
	Selection interface{} `json:"selection"`
}

// SelectionNot
type SelectionNot struct {
	Not interface{} `json:"not"`
}

// SelectionOr
type SelectionOr struct {
	Or []interface{} `json:"or"`
}

// SingleSelection
type SingleSelection struct {
	Bind      interface{}   `json:"bind,omitempty"`
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Nearest   bool          `json:"nearest,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
	Type      string        `json:"type"`
}

// SingleSelectionConfig
type SingleSelectionConfig struct {
	Bind      interface{}   `json:"bind,omitempty"`
	Empty     string        `json:"empty,omitempty"`
	Encodings []interface{} `json:"encodings,omitempty"`
	Fields    []string      `json:"fields,omitempty"`
	Nearest   bool          `json:"nearest,omitempty"`
	On        interface{}   `json:"on,omitempty"`
	Resolve   interface{}   `json:"resolve,omitempty"`
}

// SortField
type SortField struct {
	Field interface{} `json:"field,omitempty"`
	Op    interface{} `json:"op"`
	Order interface{} `json:"order,omitempty"`
}

// TextConfig
type TextConfig struct {
	Align            interface{} `json:"align,omitempty"`
	Angle            float64     `json:"angle,omitempty"`
	Baseline         interface{} `json:"baseline,omitempty"`
	Color            string      `json:"color,omitempty"`
	Dx               float64     `json:"dx,omitempty"`
	Dy               float64     `json:"dy,omitempty"`
	Fill             string      `json:"fill,omitempty"`
	FillOpacity      float64     `json:"fillOpacity,omitempty"`
	Filled           bool        `json:"filled,omitempty"`
	Font             string      `json:"font,omitempty"`
	FontSize         float64     `json:"fontSize,omitempty"`
	FontStyle        interface{} `json:"fontStyle,omitempty"`
	FontWeight       interface{} `json:"fontWeight,omitempty"`
	Interpolate      interface{} `json:"interpolate,omitempty"`
	Limit            float64     `json:"limit,omitempty"`
	Opacity          float64     `json:"opacity,omitempty"`
	Orient           interface{} `json:"orient,omitempty"`
	Radius           float64     `json:"radius,omitempty"`
	Shape            string      `json:"shape,omitempty"`
	ShortTimeLabels  bool        `json:"shortTimeLabels,omitempty"`
	Size             float64     `json:"size,omitempty"`
	Stroke           string      `json:"stroke,omitempty"`
	StrokeDash       []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64     `json:"strokeWidth,omitempty"`
	Tension          float64     `json:"tension,omitempty"`
	Text             string      `json:"text,omitempty"`
	Theta            float64     `json:"theta,omitempty"`
}

// TextFieldDefWithCondition A FieldDef with Condition<ValueDef>
// {
//    condition: {value: ...},
//    field: ...,
//    ...
// }
type TextFieldDefWithCondition struct {
	Aggregate interface{} `json:"aggregate,omitempty"`
	Bin       interface{} `json:"bin,omitempty"`
	Condition interface{} `json:"condition,omitempty"`
	Field     interface{} `json:"field,omitempty"`
	Format    string      `json:"format,omitempty"`
	TimeUnit  interface{} `json:"timeUnit,omitempty"`
	Type      interface{} `json:"type"`
}

// TextValueDefWithCondition A ValueDef with Condition<ValueDef | FieldDef>
// {
//    condition: {field: ...} | {value: ...},
//    value: ...,
// }
type TextValueDefWithCondition struct {
	Condition interface{} `json:"condition,omitempty"`
	Value     interface{} `json:"value,omitempty"`
}

// TickConfig
type TickConfig struct {
	Align            interface{} `json:"align,omitempty"`
	Angle            float64     `json:"angle,omitempty"`
	BandSize         float64     `json:"bandSize,omitempty"`
	Baseline         interface{} `json:"baseline,omitempty"`
	Color            string      `json:"color,omitempty"`
	Dx               float64     `json:"dx,omitempty"`
	Dy               float64     `json:"dy,omitempty"`
	Fill             string      `json:"fill,omitempty"`
	FillOpacity      float64     `json:"fillOpacity,omitempty"`
	Filled           bool        `json:"filled,omitempty"`
	Font             string      `json:"font,omitempty"`
	FontSize         float64     `json:"fontSize,omitempty"`
	FontStyle        interface{} `json:"fontStyle,omitempty"`
	FontWeight       interface{} `json:"fontWeight,omitempty"`
	Interpolate      interface{} `json:"interpolate,omitempty"`
	Limit            float64     `json:"limit,omitempty"`
	Opacity          float64     `json:"opacity,omitempty"`
	Orient           interface{} `json:"orient,omitempty"`
	Radius           float64     `json:"radius,omitempty"`
	Shape            string      `json:"shape,omitempty"`
	Size             float64     `json:"size,omitempty"`
	Stroke           string      `json:"stroke,omitempty"`
	StrokeDash       []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64     `json:"strokeWidth,omitempty"`
	Tension          float64     `json:"tension,omitempty"`
	Text             string      `json:"text,omitempty"`
	Theta            float64     `json:"theta,omitempty"`
	Thickness        float64     `json:"thickness,omitempty"`
}

// TimeUnitTransform
type TimeUnitTransform struct {
	As       string      `json:"as"`
	Field    string      `json:"field"`
	TimeUnit interface{} `json:"timeUnit"`
}

// TitleParams
type TitleParams struct {
	Anchor interface{} `json:"anchor,omitempty"`
	Offset float64     `json:"offset,omitempty"`
	Orient interface{} `json:"orient,omitempty"`
	Style  interface{} `json:"style,omitempty"`
	Text   string      `json:"text"`
}

// TopLevelFacetSpec
type TopLevelFacetSpec struct {
	Autosize    interface{}   `json:"autosize,omitempty"`
	Background  string        `json:"background,omitempty"`
	Config      *Config       `json:"config,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Facet       *FacetMapping `json:"facet"`
	Name        string        `json:"name,omitempty"`
	Padding     interface{}   `json:"padding,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Schema      string        `json:"$schema,omitempty"`
	Spec        interface{}   `json:"spec"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// TopLevelFacetedUnitSpec
type TopLevelFacetedUnitSpec struct {
	Autosize    interface{}            `json:"autosize,omitempty"`
	Background  string                 `json:"background,omitempty"`
	Config      *Config                `json:"config,omitempty"`
	Data        interface{}            `json:"data,omitempty"`
	Description string                 `json:"description,omitempty"`
	Encoding    *EncodingWithFacet     `json:"encoding"`
	Height      float64                `json:"height,omitempty"`
	Mark        interface{}            `json:"mark"`
	Name        string                 `json:"name,omitempty"`
	Padding     interface{}            `json:"padding,omitempty"`
	Schema      string                 `json:"$schema,omitempty"`
	Selection   map[string]interface{} `json:"selection,omitempty"`
	Title       interface{}            `json:"title,omitempty"`
	Transform   []interface{}          `json:"transform,omitempty"`
	Width       float64                `json:"width,omitempty"`
}

// TopLevelHConcatSpec
type TopLevelHConcatSpec struct {
	Autosize    interface{}   `json:"autosize,omitempty"`
	Background  string        `json:"background,omitempty"`
	Config      *Config       `json:"config,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Hconcat     []interface{} `json:"hconcat"`
	Name        string        `json:"name,omitempty"`
	Padding     interface{}   `json:"padding,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Schema      string        `json:"$schema,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// TopLevelLayerSpec
type TopLevelLayerSpec struct {
	Autosize    interface{}   `json:"autosize,omitempty"`
	Background  string        `json:"background,omitempty"`
	Config      *Config       `json:"config,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Height      float64       `json:"height,omitempty"`
	Layer       []interface{} `json:"layer"`
	Name        string        `json:"name,omitempty"`
	Padding     interface{}   `json:"padding,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Schema      string        `json:"$schema,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
	Width       float64       `json:"width,omitempty"`
}

// TopLevelRepeatSpec
type TopLevelRepeatSpec struct {
	Autosize    interface{}   `json:"autosize,omitempty"`
	Background  string        `json:"background,omitempty"`
	Config      *Config       `json:"config,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Name        string        `json:"name,omitempty"`
	Padding     interface{}   `json:"padding,omitempty"`
	Repeat      *Repeat       `json:"repeat"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Schema      string        `json:"$schema,omitempty"`
	Spec        interface{}   `json:"spec"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
}

// TopLevelVConcatSpec
type TopLevelVConcatSpec struct {
	Autosize    interface{}   `json:"autosize,omitempty"`
	Background  string        `json:"background,omitempty"`
	Config      *Config       `json:"config,omitempty"`
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Name        string        `json:"name,omitempty"`
	Padding     interface{}   `json:"padding,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Schema      string        `json:"$schema,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
	Vconcat     []interface{} `json:"vconcat"`
}

// TopoDataFormat
type TopoDataFormat struct {
	Feature string      `json:"feature,omitempty"`
	Mesh    string      `json:"mesh,omitempty"`
	Parse   interface{} `json:"parse,omitempty"`
	Type    string      `json:"type,omitempty"`
}

// UrlData
type UrlData struct {
	Format interface{} `json:"format,omitempty"`
	Url    string      `json:"url"`
}

// VConcatSpec
type VConcatSpec struct {
	Data        interface{}   `json:"data,omitempty"`
	Description string        `json:"description,omitempty"`
	Name        string        `json:"name,omitempty"`
	Resolve     *Resolve      `json:"resolve,omitempty"`
	Title       interface{}   `json:"title,omitempty"`
	Transform   []interface{} `json:"transform,omitempty"`
	Vconcat     []interface{} `json:"vconcat"`
}

// ValueDef Definition object for a constant value of an encoding channel.
type ValueDef struct {
	Value interface{} `json:"value"`
}

// VgAxisConfig
type VgAxisConfig struct {
	BandPosition    float64     `json:"bandPosition,omitempty"`
	Domain          bool        `json:"domain,omitempty"`
	DomainColor     string      `json:"domainColor,omitempty"`
	DomainWidth     float64     `json:"domainWidth,omitempty"`
	Grid            bool        `json:"grid,omitempty"`
	GridColor       string      `json:"gridColor,omitempty"`
	GridDash        []float64   `json:"gridDash,omitempty"`
	GridOpacity     float64     `json:"gridOpacity,omitempty"`
	GridWidth       float64     `json:"gridWidth,omitempty"`
	LabelAngle      float64     `json:"labelAngle,omitempty"`
	LabelBound      interface{} `json:"labelBound,omitempty"`
	LabelColor      string      `json:"labelColor,omitempty"`
	LabelFlush      interface{} `json:"labelFlush,omitempty"`
	LabelFont       string      `json:"labelFont,omitempty"`
	LabelFontSize   float64     `json:"labelFontSize,omitempty"`
	LabelLimit      float64     `json:"labelLimit,omitempty"`
	LabelOverlap    interface{} `json:"labelOverlap,omitempty"`
	LabelPadding    float64     `json:"labelPadding,omitempty"`
	Labels          bool        `json:"labels,omitempty"`
	MaxExtent       float64     `json:"maxExtent,omitempty"`
	MinExtent       float64     `json:"minExtent,omitempty"`
	TickColor       string      `json:"tickColor,omitempty"`
	TickRound       bool        `json:"tickRound,omitempty"`
	TickSize        float64     `json:"tickSize,omitempty"`
	TickWidth       float64     `json:"tickWidth,omitempty"`
	Ticks           bool        `json:"ticks,omitempty"`
	TitleAlign      string      `json:"titleAlign,omitempty"`
	TitleAngle      float64     `json:"titleAngle,omitempty"`
	TitleBaseline   string      `json:"titleBaseline,omitempty"`
	TitleColor      string      `json:"titleColor,omitempty"`
	TitleFont       string      `json:"titleFont,omitempty"`
	TitleFontSize   float64     `json:"titleFontSize,omitempty"`
	TitleFontWeight interface{} `json:"titleFontWeight,omitempty"`
	TitleLimit      float64     `json:"titleLimit,omitempty"`
	TitleMaxLength  float64     `json:"titleMaxLength,omitempty"`
	TitlePadding    float64     `json:"titlePadding,omitempty"`
	TitleX          float64     `json:"titleX,omitempty"`
	TitleY          float64     `json:"titleY,omitempty"`
}

// VgCheckboxBinding
type VgCheckboxBinding struct {
	Element string `json:"element,omitempty"`
	Input   string `json:"input"`
}

// VgGenericBinding
type VgGenericBinding struct {
	Element string `json:"element,omitempty"`
	Input   string `json:"input"`
}

// VgMarkConfig
type VgMarkConfig struct {
	Align            interface{} `json:"align,omitempty"`
	Angle            float64     `json:"angle,omitempty"`
	Baseline         interface{} `json:"baseline,omitempty"`
	Dx               float64     `json:"dx,omitempty"`
	Dy               float64     `json:"dy,omitempty"`
	Fill             string      `json:"fill,omitempty"`
	FillOpacity      float64     `json:"fillOpacity,omitempty"`
	Font             string      `json:"font,omitempty"`
	FontSize         float64     `json:"fontSize,omitempty"`
	FontStyle        interface{} `json:"fontStyle,omitempty"`
	FontWeight       interface{} `json:"fontWeight,omitempty"`
	Interpolate      interface{} `json:"interpolate,omitempty"`
	Limit            float64     `json:"limit,omitempty"`
	Opacity          float64     `json:"opacity,omitempty"`
	Orient           interface{} `json:"orient,omitempty"`
	Radius           float64     `json:"radius,omitempty"`
	Shape            string      `json:"shape,omitempty"`
	Size             float64     `json:"size,omitempty"`
	Stroke           string      `json:"stroke,omitempty"`
	StrokeDash       []float64   `json:"strokeDash,omitempty"`
	StrokeDashOffset float64     `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64     `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64     `json:"strokeWidth,omitempty"`
	Tension          float64     `json:"tension,omitempty"`
	Text             string      `json:"text,omitempty"`
	Theta            float64     `json:"theta,omitempty"`
}

// VgRadioBinding
type VgRadioBinding struct {
	Element string   `json:"element,omitempty"`
	Input   string   `json:"input"`
	Options []string `json:"options"`
}

// VgRangeBinding
type VgRangeBinding struct {
	Element string  `json:"element,omitempty"`
	Input   string  `json:"input"`
	Max     float64 `json:"max,omitempty"`
	Min     float64 `json:"min,omitempty"`
	Step    float64 `json:"step,omitempty"`
}

// VgScheme
type VgScheme struct {
	Count  float64   `json:"count,omitempty"`
	Extent []float64 `json:"extent,omitempty"`
	Scheme string    `json:"scheme"`
}

// VgSelectBinding
type VgSelectBinding struct {
	Element string   `json:"element,omitempty"`
	Input   string   `json:"input"`
	Options []string `json:"options"`
}

// VgTitleConfig
type VgTitleConfig struct {
	Anchor     interface{} `json:"anchor,omitempty"`
	Angle      float64     `json:"angle,omitempty"`
	Baseline   interface{} `json:"baseline,omitempty"`
	Color      string      `json:"color,omitempty"`
	Font       string      `json:"font,omitempty"`
	FontSize   float64     `json:"fontSize,omitempty"`
	FontWeight interface{} `json:"fontWeight,omitempty"`
	Limit      float64     `json:"limit,omitempty"`
	Offset     float64     `json:"offset,omitempty"`
	Orient     interface{} `json:"orient,omitempty"`
}

// ViewConfig
type ViewConfig struct {
	Clip             bool      `json:"clip,omitempty"`
	Fill             string    `json:"fill,omitempty"`
	FillOpacity      float64   `json:"fillOpacity,omitempty"`
	Height           float64   `json:"height,omitempty"`
	Stroke           string    `json:"stroke,omitempty"`
	StrokeDash       []float64 `json:"strokeDash,omitempty"`
	StrokeDashOffset float64   `json:"strokeDashOffset,omitempty"`
	StrokeOpacity    float64   `json:"strokeOpacity,omitempty"`
	StrokeWidth      float64   `json:"strokeWidth,omitempty"`
	Width            float64   `json:"width,omitempty"`
}

@morangorin
Copy link
Author

That is great. This is definitely good enough to start experimenting. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants