-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create interfaces.json and payloads.json * Move AliasList * Move SnakHash * Move DocumentPatch * Remove unused lists * Move SitelinkMap and Snak * Reorganize payloads and interfaces * Remove unused SnakMapList * Move MediaWiki specific interfaces and payloads * Move PersistedStatement to payloads * Move PersistedReference to payloads * Move PersistedQualifiers to payloads * Reorganize HashedSnak anf list / map variants * Invert persisted and new statments, qualifiers, references * Fix new statement payload * Fix new reference payload format * Fix persisted reference and qualifiers responses * Reorder Sitelink * Add Snak to schema
- Loading branch information
Showing
6 changed files
with
303 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"Fingerprintable": { | ||
"type": "object", | ||
"properties": { | ||
"labels": { | ||
"$ref": "./schemas.json#/Labels" | ||
}, | ||
"descriptions": { | ||
"$ref": "./schemas.json#/Descriptions" | ||
}, | ||
"aliases": { | ||
"$ref": "./schemas.json#/Aliases" | ||
} | ||
}, | ||
"required": [ | ||
"labels", | ||
"descriptions", | ||
"aliases" | ||
] | ||
}, | ||
"HashBearing": { | ||
"type": "object", | ||
"properties": { "hash": { "$ref": "#/SnakHash"} } | ||
}, | ||
"HashedSnak": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/Snak" | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { "hash": { "$ref": "#/SnakHash" } } | ||
} | ||
] | ||
}, | ||
"HashedSnakList": { | ||
"type": "array", | ||
"items": { "$ref": "#/HashedSnak" } | ||
}, | ||
"HashedSnakMap": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/HashedSnakList" | ||
}, | ||
"example": { | ||
"P31": [], | ||
"P100": [] | ||
} | ||
}, | ||
"MediawikiEditComment": { "type": "string" }, | ||
"MediawikiDeletionReason": { "type": "string" }, | ||
"MediawikiEditTags": { | ||
"type": "array", | ||
"items": { "$ref": "#/MediawikiEditTag" } | ||
}, | ||
"MediawikiEditTag": { "type": "string" }, | ||
"SitelinkMap": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "./schemas.json#/Sitelink" | ||
}, | ||
"example": { | ||
"afwiki": { | ||
"site": "afwiki", | ||
"title": "Douglas Adams", | ||
"badges": [], | ||
"url": "https://af.wikipedia.org/wiki/Douglas_Adams" | ||
}, | ||
"arwiki": { | ||
"site": "arwiki", | ||
"title": "دوغلاس آدمز", | ||
"badges": [], | ||
"url": "https://ar.wikipedia.org/wiki/%D8%AF%D9%88%D8%BA%D9%84%D8%A7%D8%B3_%D8%A2%D8%AF%D9%85%D8%B2" | ||
} | ||
} | ||
}, | ||
"Snak": { | ||
"type": "object", | ||
"properties": { | ||
"snaktype": { | ||
"type": "string" | ||
}, | ||
"property": { | ||
"type": "string" | ||
}, | ||
"datatype": { | ||
"type": "string" | ||
}, | ||
"datavalue": { | ||
"type": "object", | ||
"additionalProperties": true, | ||
"example": { | ||
"type" : "string", | ||
"value" : "I am a goat" | ||
} | ||
} | ||
} | ||
}, | ||
"SnakHash": { | ||
"description": "Hash of a snak", | ||
"type": "string", | ||
"example": "455481eeac76e6a8af71a6b493c073d54788e7e9" | ||
}, | ||
"SnakList": { | ||
"type": "array", | ||
"items": { "$ref": "./interfaces.json#/Snak" } | ||
}, | ||
"SnakMap": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "./interfaces.json#/SnakList" | ||
}, | ||
"example": { | ||
"P31": [], | ||
"P100": [] | ||
} | ||
}, | ||
"StatementsBearing": { | ||
"type": "object", | ||
"properties": { | ||
"statements": { | ||
"type": "object" | ||
} | ||
}, | ||
"required": [ | ||
"statements" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"AliasList": { | ||
"type": "array", | ||
"items": { "$ref": "./schemas.json#/Term" } | ||
}, | ||
"DocumentPatch": { | ||
"description": "A JSONPatch object as defined by RFC 6902", | ||
"type": "object", | ||
"properties": { | ||
"op": { | ||
"description": "The operation to perform", | ||
"type": "string", | ||
"enum": [ "add", "remove", "replace" ] | ||
}, | ||
"path": { | ||
"description": "A JSON-Pointer for the property to manipulate", | ||
"type": "string" | ||
}, | ||
"value": { | ||
"description": "The value to be used within the operation" | ||
} | ||
}, | ||
"required": ["op", "path"] | ||
}, | ||
"DocumentPatchList" : { | ||
"description": "A list of JSONPatch objects as defined by RFC 6902", | ||
"type": "array", | ||
"items": { "$ref": "./payloads.json#/DocumentPatch" } | ||
}, | ||
"Error": { | ||
"type": "object", | ||
"properties": { | ||
"code": { "type": "string" }, | ||
"message": { "type": "string" } | ||
}, | ||
"required": [ "code", "message" ] | ||
}, | ||
"MediawikiEdit": { | ||
"type": "object", | ||
"properties": { | ||
"comment": { | ||
"$ref": "./interfaces.json#/MediawikiEditComment" | ||
}, | ||
"tags": { | ||
"$ref": "./interfaces.json#/MediawikiEditTags" | ||
} | ||
} | ||
}, | ||
"MediawikiDeletion": { | ||
"type": "object", | ||
"properties": { | ||
"reason": { | ||
"$ref": "./interfaces.json#/MediawikiDeletionReason" | ||
}, | ||
"tags": { | ||
"$ref": "./interfaces.json#/MediawikiEditTags" | ||
} | ||
} | ||
}, | ||
"NewQualifier": { | ||
"$ref": "./interfaces.json#/Snak" | ||
}, | ||
"NewReference": { | ||
"type": "object", | ||
"properties": { | ||
"snaks": { | ||
"$ref": "./interfaces.json#/SnakMap" | ||
} | ||
} | ||
}, | ||
"NewReferences": { | ||
"type": "array", | ||
"items": { "$ref": "#/NewReference" } | ||
}, | ||
"NewStatement": { | ||
"type": "object", | ||
"properties": { | ||
"mainsnak" : { | ||
"$ref": "./interfaces.json#/Snak" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"rank": { | ||
"type": "string" | ||
}, | ||
"qualifiers": { | ||
"$ref": "./interfaces.json#/SnakMap" | ||
}, | ||
"references": { | ||
"$ref": "#/NewReferences" | ||
} | ||
} | ||
}, | ||
"PersistedQualifiers": { | ||
"$ref": "./interfaces.json#/HashedSnakMap" | ||
}, | ||
"PersistedReferences": { | ||
"type": "array", | ||
"items": { "$ref": "./schemas.json#/Reference" } | ||
}, | ||
"PersistedStatementList": { | ||
"type": "array", | ||
"items": { "$ref": "./schemas.json#/Statement" } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.