-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: remove deprecated field data from keyboard_info usage 🎺 #204
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2f05ade
chore: remove deprecated field data from keyboard_info usage
mcdurdin d4b2c74
chore: add new keyboard_info.schema.json
mcdurdin 4383935
Merge branch 'staging' into chore/keyboard_info-remove-dep
mcdurdin 4ea0efa
chore: fix test cases
mcdurdin 0db2890
chore: optimize build script
mcdurdin 74d01ad
chore: tweak test for running unit tests
mcdurdin be87e96
chore: update keyboard_info schema 2.0
mcdurdin 9877249
Merge branch 'staging' into chore/keyboard_info-remove-dep
mcdurdin b58adfe
chore: Update init-container.sh
mcdurdin a19771e
chore: Update build.sh
mcdurdin ef3204d
chore: Update init-container.sh
mcdurdin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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,105 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"$ref": "#/definitions/KeyboardInfo", | ||
|
||
"definitions": { | ||
"KeyboardInfo": { | ||
"type": "object", | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"name": { "type": "string" }, | ||
"authorName": { "type": "string" }, | ||
"authorEmail": { "type": "string", "format": "email" }, | ||
"description": { "type": "string" }, | ||
"license": { "type": "string", "enum": ["freeware", "shareware", "commercial", "mit", "other"] }, | ||
"languages": { "anyOf": [ | ||
{ "type": "array", "items": { "type": "string" }, "uniqueItems": true }, | ||
{ "$ref": "#/definitions/KeyboardLanguageInfo" } | ||
]}, | ||
"lastModifiedDate": { "type": "string", "format": "date-time" }, | ||
"packageFilename": { "type": "string", "pattern": "\\.km[xp]$" }, | ||
"packageFileSize": { "type": "number" }, | ||
"jsFilename": { "type": "string", "pattern": "\\.js$" }, | ||
"jsFileSize": { "type": "number" }, | ||
"isRTL": { "type": "boolean" }, | ||
"encodings": { "type": "array", "items": { "type": "string", "enum": ["ansi", "unicode"] } }, | ||
"packageIncludes": { "type": "array", "items": { "type": "string", "enum": ["welcome", "documentation", "fonts", "visualKeyboard"] } }, | ||
"version": { "type": "string" }, | ||
"minKeymanVersion": { "type": "string", "pattern": "^\\d+\\.\\d$" }, | ||
"helpLink": { "type": "string", "pattern": "^https://help\\.keyman\\.com/keyboard/" }, | ||
"platformSupport": { "$ref": "#/definitions/KeyboardPlatformInfo" }, | ||
"sourcePath": { "type": "string", "pattern": "^(release|legacy|experimental)/.+/.+$" }, | ||
"related": { "type": "object", "patternProperties": { | ||
".": { "$ref": "#/definitions/KeyboardRelatedInfo" } | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"deprecated": { "type": "boolean" } | ||
}, | ||
"required": [ "id", "name", "license", "languages", "lastModifiedDate", "platformSupport" ] | ||
}, | ||
|
||
"KeyboardLanguageInfo": { | ||
"type": "object", | ||
"patternProperties": { | ||
".": { "$ref": "#/definitions/KeyboardLanguageInfoItem" } | ||
}, | ||
"additionalProperties": false | ||
}, | ||
|
||
"KeyboardLanguageInfoItem": { | ||
"type": "object", | ||
"properties": { | ||
"font": { "$ref": "#/definitions/KeyboardFontInfo" }, | ||
"oskFont": { "$ref": "#/definitions/KeyboardFontInfo" }, | ||
"examples": { "type": "array", "items": { "$ref": "#/definitions/KeyboardExampleInfo" } }, | ||
"displayName": { "type": "string" }, | ||
"languageName": { "type": "string" }, | ||
"scriptName": { "type": "string" }, | ||
"regionName": { "type": "string" } | ||
}, | ||
"required": [], | ||
"additionalProperties": false | ||
}, | ||
|
||
"KeyboardFontInfo": { | ||
"type": "object", | ||
"properties": { | ||
"family": { "type": "string" }, | ||
"source": { "type": "array", "items": { "type": "string" } } | ||
}, | ||
"required": ["family", "source"], | ||
"additionalProperties": false | ||
}, | ||
|
||
"KeyboardExampleInfo": { | ||
"type": "object", | ||
"properties": { | ||
"keys": { "type": "string" }, | ||
"text": { "type": "string" }, | ||
"note": { "type": "string" } | ||
}, | ||
"required": ["keys", "text"], | ||
"additionalProperties": false | ||
}, | ||
|
||
"KeyboardPlatformInfo": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^(windows|macos|desktopWeb|ios|android|mobileWeb|linux)$": { "type": "string", "enum": ["dictionary", "full", "basic", "none"] } | ||
}, | ||
"required": [], | ||
"additionalProperties": false | ||
}, | ||
|
||
"KeyboardRelatedInfo": { | ||
"type": "object", | ||
"properties": { | ||
"deprecates": { "type": "boolean" }, | ||
"deprecatedBy": { "type": "boolean" } | ||
}, | ||
"required": [], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
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,60 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"$ref": "#/definitions/Search", | ||
|
||
"definitions": { | ||
"Search": { | ||
"type": "object", | ||
"properties": { | ||
"keyboards": { "type": "array", "items": { "$ref": "#/definitions/SearchKeyboard" } }, | ||
"context": { "$ref": "#/definitions/Context" } | ||
}, | ||
"required": ["keyboards","context"] | ||
}, | ||
|
||
"Context": { | ||
"type": "object", | ||
"properties": { | ||
"range": { "type": "string" }, | ||
"text": { "type": "string" }, | ||
"platform": { "type": "string", "enum": ["android", "ios", "linux", "macos", "web", "windows"] }, | ||
"pageSize": { "type": "number" }, | ||
"pageNumber": { "type": "number" }, | ||
"totalRows": { "type": "number" }, | ||
"totalPages": { "type": "number" } | ||
}, | ||
"required": ["range", "text", "pageSize", "pageNumber", "totalRows", "totalPages"], | ||
"additionalProperties": false | ||
}, | ||
|
||
"SearchKeyboard": { | ||
"allOf": [ | ||
{ "$ref": "/keyboard_info/2.0/keyboard_info.schema.json#/definitions/KeyboardInfo" }, | ||
{ | ||
"properties": { | ||
"match": { | ||
"type": "object", | ||
"properties": { | ||
"name": { "oneOf": [ { "type": "string" }, { "type": "null"} ] }, | ||
"type": { "type": "string", "enum": [ | ||
"keyboard", "keyboard_id", "description", "legacy_keyboard_id", | ||
"language", "language_bcp47_tag", | ||
"country", "country_iso3166_code", | ||
"script", "script_iso15924_code" | ||
] }, | ||
"tag": { "type": "string" }, | ||
"weight": { "type": "number" }, | ||
"downloads": { "type": "number" }, | ||
"totalDownloads": { "type": "number" }, | ||
"finalWeight": { "type": "number" } | ||
}, | ||
"required": ["name","type","weight","downloads","finalWeight"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"required": ["match"] | ||
} | ||
] | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"$ref": "#/definitions/windows-update", | ||
|
||
"definitions": { | ||
"windows-update": { | ||
"type": "object", | ||
"required": ["msi", "setup", "bundle", "keyboards"], | ||
"additionalProperties": true, | ||
"properties": { | ||
"msi": { | ||
"$ref": "#/definitions/optional-file" | ||
}, | ||
"setup": { | ||
"$ref": "#/definitions/optional-file" | ||
}, | ||
"bundle": { | ||
"$ref": "#/definitions/optional-file" | ||
}, | ||
"keyboards": { | ||
"$ref": "#/definitions/keyboards" | ||
} | ||
} | ||
}, | ||
|
||
"optional-file": { | ||
"anyOf": [{ "$ref": "#/definitions/file" }, { "type": "boolean" }] | ||
}, | ||
|
||
"file": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"version", | ||
"date", | ||
"platform", | ||
"stability", | ||
"file", | ||
"md5", | ||
"type", | ||
"build", | ||
"size", | ||
"url" | ||
], | ||
"additionalProperties": true, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"version": { | ||
"type": "string" | ||
}, | ||
"date": { | ||
"type": "string" | ||
}, | ||
"platform": { | ||
"type": "string" | ||
}, | ||
"stability": { | ||
"type": "string" | ||
}, | ||
"file": { | ||
"type": "string" | ||
}, | ||
"md5": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
}, | ||
"build": { | ||
"type": "string" | ||
}, | ||
"size": { | ||
"type": "integer" | ||
}, | ||
"url": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"keyboards": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
".+": { | ||
"$ref": "#/definitions/keyboard" | ||
} | ||
} | ||
}, | ||
"keyboard": { | ||
"allOf": [ | ||
{ | ||
"$ref": "/keyboard_info/2.0/keyboard_info.schema.json#/definitions/KeyboardInfo" | ||
}, | ||
{ | ||
"properties": { | ||
"url": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this get removed in a
Search30Test.php
?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.
Sorry, I don't understand the question?
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.
Search20Test.php uses /search/2.0/search.json
https://github.com/keymanapp/api.keyman.com/blob/be87e96ec10df73534eb758403e1fdcd88f8d55c/tests/Search20Test.php#L14C37-L14C61
Do we need a Search30Test.php that uses /search/3.0/search.json for tests?
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.
No, because this is a test of the search 2.0 api, and we haven't got a search 3.0 api.
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.
Oh wait
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.
We've got a search 3.0 schema but not a search 3.0 api. Confuse much? Basically search 3.0 less data than search 2.0.