diff --git a/samples/sample01a.csvts.json b/samples/sample01a.csvts.json index 89135dd..32b2447 100644 --- a/samples/sample01a.csvts.json +++ b/samples/sample01a.csvts.json @@ -9,19 +9,19 @@ "language": "en", "columns": [ { - "code": "id", + "id": "id", "name": "Id", "description": "Unique id", "type": "string" }, { - "code": "title", + "id": "title", "name": "Title", "description": "Course title", "type": "string" }, { - "code": "startDate", + "id": "startDate", "name": "StartDate", "description": "Start date of the course", "type": "date-time", @@ -30,7 +30,7 @@ ] }, { - "code": "endDate", + "id": "endDate", "name": "EndDate", "description": "End date of the course", "type": "date-time", @@ -39,7 +39,7 @@ ] }, { - "code": "subjectId", + "id": "subjectId", "name": "SubjectId", "description": "Reference to subject (see sample02c.csv-schema.json)", "type": "string" diff --git a/samples/sample01b.csvts.json b/samples/sample01b.csvts.json index 89135dd..32b2447 100644 --- a/samples/sample01b.csvts.json +++ b/samples/sample01b.csvts.json @@ -9,19 +9,19 @@ "language": "en", "columns": [ { - "code": "id", + "id": "id", "name": "Id", "description": "Unique id", "type": "string" }, { - "code": "title", + "id": "title", "name": "Title", "description": "Course title", "type": "string" }, { - "code": "startDate", + "id": "startDate", "name": "StartDate", "description": "Start date of the course", "type": "date-time", @@ -30,7 +30,7 @@ ] }, { - "code": "endDate", + "id": "endDate", "name": "EndDate", "description": "End date of the course", "type": "date-time", @@ -39,7 +39,7 @@ ] }, { - "code": "subjectId", + "id": "subjectId", "name": "SubjectId", "description": "Reference to subject (see sample02c.csv-schema.json)", "type": "string" diff --git a/samples/sample01c.csvts.json b/samples/sample01c.csvts.json index 9687858..fc836b9 100644 --- a/samples/sample01c.csvts.json +++ b/samples/sample01c.csvts.json @@ -9,19 +9,19 @@ "language": "en", "columns": [ { - "code": "id", + "id": "id", "name": "Id", "description": "Unique id", "type": "string" }, { - "code": "shortName", + "id": "shortName", "name": "ShortName", "description": "Short name of subject", "type": "string" }, { - "code": "longName", + "id": "longName", "name": "LongName", "description": "Long name of subject", "type": "string" diff --git a/samples/sample02.csvts.json b/samples/sample02.csvts.json index 017fa3d..4b3facb 100644 --- a/samples/sample02.csvts.json +++ b/samples/sample02.csvts.json @@ -8,11 +8,13 @@ "language": "en", "keys": [ { + "id": "timeZone", "name": "TimeZone", "description": "Time Zone according to http://web.cs.ucla.edu/~eggert/tz/tz-link.htm", "type": "string" }, { + "id": "validFrom", "name": "ValidFrom", "description": "Start date of validity", "type": "date", @@ -21,6 +23,7 @@ ] }, { + "id": "validTo", "name": "ValidTo", "description": "End date of validity", "type": "date", diff --git a/samples/sample03.csvts.json b/samples/sample03.csvts.json index 21de487..a9f9af5 100644 --- a/samples/sample03.csvts.json +++ b/samples/sample03.csvts.json @@ -11,7 +11,7 @@ "description": "List of countries", "columns": [ { - "code": "country", + "id": "country", "description": "Discriminator for country row", "type": "discriminator", "values": [ @@ -21,12 +21,12 @@ ] }, { - "code": "name", + "id": "name", "description": "Name of the country", "type": "string" }, { - "code": "continent", + "id": "continent", "description": "Name of the continent", "type": "string" } @@ -36,7 +36,7 @@ "description": "List of continents", "columns": [ { - "code": "continent", + "id": "continent", "description": "Discriminator for continent row", "type": "discriminator", "values": [ @@ -46,7 +46,7 @@ ] }, { - "code": "name", + "id": "name", "description": "Name of the continent", "type": "string" } diff --git a/schemas/v0.1/schema.json b/schemas/v0.1/schema.json index 5bad016..e4c4f34 100644 --- a/schemas/v0.1/schema.json +++ b/schemas/v0.1/schema.json @@ -171,12 +171,12 @@ "minItems": 1, "items": { "type": "array", - "description": "An array of column codes as unique key definition", + "description": "An array of column IDs as unique key definition", "unqiueItems": true, "minItems": 1, "items": { "type": "string", - "description": "A column code." + "description": "A column ID." } } } @@ -436,12 +436,12 @@ "minItems": 1, "items": { "type": "array", - "description": "An array of column codes as unique key definition", + "description": "An array of column IDs as unique key definition", "unqiueItems": true, "minItems": 1, "items": { "type": "string", - "description": "A column code." + "description": "A column ID." } } } @@ -468,14 +468,14 @@ "discriminatorType": { "description": "This is an discriminator type column.", "required": [ - "code", + "id", "type", "values" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -520,13 +520,13 @@ "stringType": { "description": "This is a string type column or key.", "required": [ - "code", + "id", "type" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -589,14 +589,14 @@ "enumType": { "description": "This is an enumeration type column or key.", "required": [ - "code", + "id", "type", "members" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -667,14 +667,14 @@ "enumSetType": { "description": "This is an enumeration set type column or key. The set of values is formatted as csv string.", "required": [ - "code", + "id", "type", "members" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -759,13 +759,13 @@ "integerType": { "description": "This is a integer type column or key.", "required": [ - "code", + "id", "type" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -819,14 +819,14 @@ "numericType": { "description": "This is a numeric type column or key.", "required": [ - "code", + "id", "type", "formats" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -895,15 +895,15 @@ "booleanType": { "description": "This is a boolean type column or key.", "required": [ - "code", + "id", "type", "trueValues", "falseValues" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -963,14 +963,14 @@ "dateType": { "description": "This is a date only type column or key.", "required": [ - "code", + "id", "type", "formats" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -1031,14 +1031,14 @@ "timeType": { "description": "This is a time only type column or key.", "required": [ - "code", + "id", "type", "formats" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -1099,14 +1099,14 @@ "dateTimeType": { "description": "This is a date-time type column or key.", "required": [ - "code", + "id", "type", "formats" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -1167,14 +1167,14 @@ "jsonType": { "description": "This is a json formatted string type column or key.", "required": [ - "code", + "id", "type", "schema" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", @@ -1235,14 +1235,14 @@ "xmlType": { "description": "This is a xml formatted string type column or key.", "required": [ - "code", + "id", "type", "schema" ], "properties": { - "code": { + "id": { "type": "string", - "description": "The code of the CSV column or key." + "description": "The ID of the CSV column or key." }, "name": { "type": "string", diff --git a/website/docs/change-log.md b/website/docs/change-log.md index 30b62ef..11b5aeb 100644 --- a/website/docs/change-log.md +++ b/website/docs/change-log.md @@ -9,7 +9,7 @@ + Added `tableSet` next to `table` and `dictionary` + Added properties `$schema` and `notes` + Added properties `language`, `lineBreaks`, `skipFirstRows` and `skipEmptyRows` for tables and dictionaries -+ Added properties `code`, `alternativeNames` and `nullValues` for columns and keys ++ Added properties `id`, `alternativeNames` and `nullValues` for columns and keys + Added properties `exclusiveMinValue` and `exclusiveMaxValue` for numeric type + Removed property `format` from `string` + Renamed `int` to `integer` diff --git a/website/docs/specification.md b/website/docs/specification.md index c1d7a94..c367396 100644 --- a/website/docs/specification.md +++ b/website/docs/specification.md @@ -149,7 +149,7 @@ This object MAY be extended. The `columns` array describes all columns within a CSV table. A column is a JSON object with following properties: -+ `code` : The code of the column. **This property is REQUIRED**. ++ `id` : The ID of the column. **This property is REQUIRED**. + `name` : The human-readable name of the column. + `alternativeNames` : A list of alternative names of the column. + `description` : An human-readable description of the column. @@ -171,7 +171,7 @@ The `columns` array describes all columns within a CSV table. A column is a JSON #### Unique keys -The `uniqueKeys` array describes unique keys within a CSV table. A unique key is itself a JSON array with column codes representing an existing column. Each column code is a `string` value. +The `uniqueKeys` array describes unique keys within a CSV table. A unique key is itself a JSON array with column IDs representing an existing column. Each column ID is a `string` value. #### About optional columns @@ -204,7 +204,7 @@ This object MAY be extended. The `keys` array describes all keys within a CSV dictionary. A key is a JSON object with following properties: -+ `code` : The code of the key. **This property is REQUIRED**. ++ `id` : The ID of the key. **This property is REQUIRED**. + `name` : The human-readable name of the key. + `alternativeNames` : A list of alternative names of the column. + `description` : An human-readable description of the key. @@ -255,7 +255,7 @@ The `tables` array describes all tables within a CSV table set. A table is a JSO The `columns` array describes all columns within a table of a CSV table set. A column is a JSON object with following properties: -+ `code` : The code of the column. **This property is REQUIRED**. ++ `id` : The ID of the column. **This property is REQUIRED**. + `name` : The human-readable name of the column. + `description` : An human-readable description of the column. + `type` : The data type of the column. **This property is REQUIRED**. Possible values are: @@ -279,7 +279,7 @@ A column of type `discriminator` MUST occur exactly once. #### Unique keys -The `uniqueKeys` array describes unique keys within a CSV table set. A unique key is itself a JSON array with column codes representing an existing column. Each column code is a `string` value. +The `uniqueKeys` array describes unique keys within a CSV table set. A unique key is itself a JSON array with column IDs representing an existing column. Each column ID is a `string` value. ### Data types