Skip to content

JSON Schema type: ['integer','null'] not supported #292

@nikmartin

Description

@nikmartin

I have a JSON schema for a field:

  'age': { // age
      title: 'Your age',
      type: ['integer','null'],
      minimum: 1,
      maximum: 120
    }

And alpaca throws the error:
Uncaught Error: Alpaca caught an error with the default error handler: {"message":"Unable to find field class for type: undefined","reason":"FIELD_INSTANTIATION_ERROR"}

Is it possible to support multiple types for a field in Alpaca? I need to be able to support null in an integer field that is required. It's a required field, but null or an integer are valid values.

Metadata

Metadata

Assignees

No one assigned

    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