Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose statement-component validation functions #4

Open
ZackPierce opened this issue Jun 24, 2013 · 0 comments
Open

Expose statement-component validation functions #4

ZackPierce opened this issue Jun 24, 2013 · 0 comments

Comments

@ZackPierce
Copy link
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant