Skip to content

Use camelCase instead of kebab_case in spec for consistency #102

Description

@miguelrk

Currently, the root properties of the spec use kebab_case for properties e.g. semantic_types and chart_spec while everywhere else the spec uses camelCase for properties e.g. chartType. This is inconsistent not only within the schema, but also with the usual convention for JavaScript/TypeScript which is to use camelCase (I understand kebab_case is the standard in e.g. python), but having both is definitively odd and confusing.

{
-  "semantic_types": {
+  "semanticTypes": {
     "count": "Quantity",
     "percentage": "Percentage",
     "region": "Category"
   },
-  "chart_spec": {
+  "chartSpec": {
     "chartType": "Scatter Plot",
     "encodings": {
       "x": "count",
       "y": "percentage",
       "color": "region"
     }
   },
   "data": {}
 }

Maybe I am missing something, there must be a valid reason? Additionally, we could maybe rename chartSpec to simply spec?

In any case, standardizing this to use camelCase for all properties would be more consistent and standard.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions