-
Notifications
You must be signed in to change notification settings - Fork 0
[PXCLD-11672] Scheme enhancing #21
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "data-api-docs", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "main": "index.js", | ||
| "directories": { | ||
| "doc": "docs" | ||
| }, | ||
| "scripts": { | ||
| "validate": "node scripts/validate.js" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/Pixellot/data-api-docs.git" | ||
| }, | ||
| "homepage": "https://github.com/Pixellot/data-api-docs#readme", | ||
| "dependencies": { | ||
| "ajv": "^8.17.1" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| "description": "Version of the schema following semantic versioning (X.Y.Z)", | ||
| "pattern": "^\\d+\\.\\d+\\.\\d+$", | ||
| "examples": ["2.0.0"] | ||
| }, | ||
| }, | ||
| "matchTeamStats": { | ||
| "type": "object", | ||
| "description": "Stats for the teams that participated in the game", | ||
|
|
@@ -318,9 +318,9 @@ | |
| "type": "object", | ||
| "description": "A point of interest in a game which was logged, plus enriched data about the tag resource and tag attributes", | ||
| "required": [ | ||
| "id", | ||
| "gameId", | ||
| "resource", | ||
| "id", | ||
| "gameId", | ||
| "resource", | ||
| "attrs", | ||
| "angles" | ||
| ], | ||
|
|
@@ -406,17 +406,17 @@ | |
| "oneOf": [ | ||
| { "type": "string" }, | ||
| { "type": "number" }, | ||
| { | ||
| { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| ], | ||
| "examples": [ | ||
| "offense", | ||
| "6579de1d7e14a67a0e1a91bf", | ||
| "67a38884b62bf88b1146a82a", | ||
| "offense", | ||
| "6579de1d7e14a67a0e1a91bf", | ||
| "67a38884b62bf88b1146a82a", | ||
| "50 John Cohen", | ||
| "{\"x\":517.2781982421875,\"y\":311.42251586914062,\"x2\":0,\"y2\":0,\"type\":\"point\",\"sector\":11,\"orientation\":\"left\"}" | ||
| ] | ||
|
|
@@ -534,6 +534,23 @@ | |
| } | ||
| } | ||
| }, | ||
| "fileAttributes": { | ||
| "type": "object", | ||
| "description": "Attributes describing the file", | ||
| "properties": { | ||
| "lastUpdatedAt": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "description": "Last updated at date and time of the file in ISO 8601 format", | ||
| "examples": ["2025-09-25T02:00:00.000Z"] | ||
| }, | ||
| "lastUpdateReason": { | ||
| "type": "string", | ||
| "description": "Reason for the last update", | ||
| "examples": ["breakdown_completed"] | ||
| } | ||
| } | ||
| }, | ||
| "eventAttributes": { | ||
| "type": "object", | ||
| "description": "Attributes describing the event/game", | ||
|
|
@@ -609,6 +626,34 @@ | |
| }, | ||
| "required": ["id", "name"] | ||
| }, | ||
| "league": { | ||
| "oneOf": [ | ||
| { | ||
| "type": "object", | ||
| "description": "League information", | ||
| "properties": { | ||
| "advantageId": { | ||
| "type": "string", | ||
| "description": "ID of the league in Advantage", | ||
| "examples": ["68af417a5b1a116e63804719"] | ||
| }, | ||
| "title": { | ||
| "type": "string", | ||
| "description": "Title of the league" | ||
| }, | ||
| "vidswapId": { | ||
| "type": "integer", | ||
| "description": "ID of the league in VidSwap", | ||
| "examples": [7627829] | ||
| } | ||
| }, | ||
| "required": ["advantageId", "title", "vidswapId"] | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "ids": { | ||
| "type": "object", | ||
| "description": "Various system IDs for the event", | ||
|
|
@@ -719,6 +764,11 @@ | |
| "priority": { | ||
| "type": "integer", | ||
| "description": "Priority of the breakdown (integer number). Optional field" | ||
| }, | ||
| "loggerNotes": { | ||
| "type": "string", | ||
| "description": "Notes from the logger", | ||
| "examples": ["This game was logged on VidSwap"] | ||
| } | ||
| } | ||
| }, | ||
|
|
@@ -747,13 +797,12 @@ | |
| "type": "string", | ||
| "description": "URL to the recorded video stream", | ||
| "format": "uri", | ||
| "examples": ["https://d2s0txx1aqnj4f.cloudfront.net/someTenantName/6736d0dc4c7136f9b31f0269/cloud_hls/0_hd_hls.m3u8"] | ||
| "examples": ["https://d2s0txx1aqnj4f.cloudfront.net/someTenantName/6736d0dc4c7136f9b31f0269/cloud_hls/0_hd_hls.m3u8"] | ||
| }, | ||
| "startUtc": { | ||
| "type": "string", | ||
| "format": "date-time", | ||
| "startUTC": { | ||
| "type": "integer", | ||
| "description": "Indicator of event start time in UTC format", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe worth adding that it is seconds - for clarity. |
||
| "examples": ["2025-05-01T12:00:00.000Z"] | ||
| "examples": [1739552865] | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is for internal use, I'm not sure it should be here, since I think the repo is public, maybe we should try keeping it more "formal". WDYT? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| 'use strict'; | ||
|
|
||
| const Ajv = require('ajv'); | ||
|
|
||
| const ajv = new Ajv(); | ||
|
|
||
| const scheme = require('../schema.json'); | ||
|
|
||
| const isValidSchema = ajv.validateSchema(scheme); | ||
|
|
||
| if (!isValidSchema) { | ||
| console.log('Schema is invalid'); | ||
| console.log(ajv.errors); | ||
| } else { | ||
| console.log('Schema is valid'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly it is possible to have multiple logger notes for a logging job, are they all combined to 1 string? Is there a delimiter? If so, worth noting here.