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

Fix JSON keymap URLs generated by the API #22618

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/python/qmk/cli/generate/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from milc import cli

import qmk.path
from qmk.datetime import current_datetime
from qmk.info import info_json
from qmk.json_schema import json_load
Expand Down Expand Up @@ -126,9 +127,10 @@ def generate_api(cli):

# Populate the list of JSON keymaps
for keymap in list_keymaps(keyboard_name, c=False, fullpath=True):
keymap_rel = qmk.path.under_qmk_firmware(keymap)
kb_json['keymaps'][keymap.name] = {
# TODO: deprecate 'url' as consumer needs to know its potentially hjson
'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap}/keymap.json',
'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap_rel}/keymap.json',

# Instead consumer should grab from API and not repo directly
'path': (keymap / 'keymap.json').as_posix(),
Expand Down