Skip to content

Expose statement-component validation functions #4

Description

@ZackPierce

As raised in #2 , there may be utility in exposing validation capabilities for xAPI statment component objects (e.g. verbs, actors, etc) independent of an entire statement.

My present thinking is a two-parameter function returning a report object.

  • target param that's either a JSON-string or an object

  • optional version param that is a Semantic Version 1.0 compliant string, or an object formulated like

    {
     major:1, 
     minor:0, 
     patch:0, 
     preRelease:null
    }

    Defaulting to "1.0.0"

  • returns a report object that includes:

    • validated version string
    • input target param post-deserialization as instance
    • errors array. The trace property value conventions in errors may also merit revisiting to remove prefix-cruft.

Possible targets:

  • Verb
  • Actor
  • Agent
  • Group
  • Context
  • Object
  • Activity
  • Result

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions