Skip to content

xAPI statements based on profile extension with inlineSchema property #64

@samuelsenj

Description

@samuelsenj

Hello,

I am currently developing an xAPI profile. As a means of profile validation I have been using DATASIM (CLI) to generate xAPI statements that conform to the profile.

I have tried adding an extension to the profile, using the "inlineSchema" property to specify data type and some additional restrictions with JSON schema, but mostly DATASIM does not seem to be able to reflect the additional restrictions in the xAPI statements generated.

For instance I tried adding a (slightly modified) example JSON schema from the xAPI profiles specification (GitHub) to the extension in the profile:
"inlineSchema": "{ \"type\": \"object\", \"properties\":{ \"rank\": {\"type\": \"number\"},\"medal\":{\"type\": \"string\"}}, \"required\": [\"rank\", \"medal\"]}".

When generating statements based on the profile with an extension having such an inlineSchema, the value of the xAPI statement extension is not as expected an object with properties rank (value of type number) and medal (value of type string), but rather the extension value varies between string (e.g. '1X6m9L94OQR'), number (e.g. 1.2574462890625), empty object ({}) and empty array ([]).

Another example is that when setting the profile extension data type to string, and specifying either a format (e.g. uri, date-time) or pattern (regular expression), I experienced that formats and patterns are not reflected in the generated xAPI statements.

In the future it would be great if the generated xAPI statements could reflect the full JSON schema for extensions (and document resources) that are specified in a profile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions