---
csvDialect:
  title: CSV Dialect
  description: The CSV dialect descriptor.
  type: object
  required:
  - delimiter
  - doubleQuote
  properties:
    csvddfVersion:
      "$ref": "#/definitions/csvddfVersion"
    delimiter:
      "$ref": "#/definitions/delimiter"
    doubleQuote:
      "$ref": "#/definitions/doubleQuote"
    lineTerminator:
      "$ref": "#/definitions/lineTerminator"
    nullSequence:
      "$ref": "#/definitions/nullSequence"
    quoteChar:
      "$ref": "#/definitions/quoteChar"
    escapeChar:
      "$ref": "#/definitions/escapeChar"
    skipInitialSpace:
      "$ref": "#/definitions/skipInitialSpace"
    header:
      "$ref": "#/definitions/header"
    caseSensitiveHeader:
      "$ref": "#/definitions/caseSensitiveHeader"
  examples:
  - |
      {
        "dialect": {
          "delimiter": ";"
        }
      }
  - |
      {
        "dialect": {
          "delimiter": "\t",
          "quoteChar": "'"
        }
      }
csvddfVersion:
  title: CSV Dialect schema version
  description: A number to indicate the schema version of CSV Dialect. Version 1.0 was
    named CSV Dialect Description Format and used different field names.
  type: number
  default: 1.2
  examples::
  - |
      {
        "csvddfVersion": "1.2"
      }  
delimiter:
  title: Delimiter
  description: A character sequence to use as the field separator.
  type: string
  default: ","
  examples:
  - |
      {
        "delimiter": ","
      }
  - |
      {
        "delimiter": ";"
      }
doubleQuote:
  title: Double Quote
  description: Specifies the handling of quotes inside fields.
  context: If Double Quote is set to true, two consecutive quotes must be interpreted
    as one.
  type: boolean
  default: true
  examples:
  - |
      {
        "doubleQuote": true
      }
lineTerminator:
  title: Line Terminator
  description: Specifies the character sequence that must be used to terminate rows.
  type: string
  default: "\r\n"
  examples:
  - |
      {
        "lineTerminator": "\r\n"
      }
  - |
      {
        "lineTerminator": "\n"
      }
nullSequence:
  title: Null Sequence
  description: Specifies the null sequence, for example, `\N`.
  type: string
  examples:
  - |
      {
        "nullSequence": "\N"
      }
quoteChar:
  title: Quote Character
  description: Specifies a one-character string to use as the quoting character.
  type: string
  default: "\""
  examples:
  - |
      {
        "quoteChar": "'"
      }
escapeChar:
  title: Escape Character
  description: Specifies a one-character string to use as the escape character.
  type: string
  examples:
  - |
      {
        "escapeChar": "\\"
      }
skipInitialSpace:
  title: Skip Initial Space
  description: Specifies the interpretation of whitespace immediately following
    a delimiter. If false, whitespace immediately after a delimiter should be treated
    as part of the subsequent field.
  type: boolean
  default: true
  examples:
  - |
      {
        "skipInitialSpace": true
      }
header:
  title: Header
  description: Specifies if the file includes a header row, always as the first
    row in the file.
  type: boolean
  default: true
  examples:
  - |
      {
        "header": true
      }
caseSensitiveHeader:
  title: Case Sensitive Header
  description: Specifies if the case of headers is meaningful.
  context: Use of case in source CSV files is not always an intentional decision.
    For example, should "CAT" and "Cat" be considered to have the same meaning.
  type: boolean
  default: false
  examples:
  - |
      {
        "caseSensitiveHeader": true
      }
