Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-2199

Validate that field defaults have the correct type

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: ruby
    • Labels:
      None

      Description

      Currently, on the master branch, when a schema is parsed, it is possible to define a field with a type and a default of a totally different type. E.g. if the field has type "string", the default can be set to "null".

      I'd like to open a PR which will fix this by running the default through the SchemaValidator whenever a new Field is created. See https://github.com/salsify/avro-patches/pull/16

      cc: Tim Perkins

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                daniel.orner Daniel Orner
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: