Skip to content

Commit 8bfba8d

Browse files
tests: removed lightning- prefix from autogenerate example
1 parent a0803a4 commit 8bfba8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: tests/autogenerate-rpc-examples.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def update_examples_in_schema_files():
365365
for method, method_examples in EXAMPLES_JSON.items():
366366
try:
367367
global CWD
368-
file_path = os.path.join(CWD, 'doc', 'schemas', f'lightning-{method}.json') if method != 'sql' else os.path.join(CWD, 'doc', 'schemas', f'lightning-{method}-template.json')
368+
file_path = os.path.join(CWD, 'doc', 'schemas', f'{method}.json') if method != 'sql' else os.path.join(CWD, 'doc', 'schemas', f'{method}-template.json')
369369
logger.info(f'Updating examples for {method} in file {file_path}')
370370
with open(file_path, 'r+', encoding='utf-8') as file:
371371
data = json.load(file)
@@ -2075,7 +2075,7 @@ def list_missing_examples():
20752075
for file_name in os.listdir('doc/schemas'):
20762076
if not file_name.endswith('.json'):
20772077
continue
2078-
file_name_str = str(file_name).replace('lightning-', '').replace('.json', '')
2078+
file_name_str = str(file_name).replace('.json', '')
20792079
# Log an error if the method is not in the list
20802080
if file_name_str not in ALL_RPC_EXAMPLES and file_name_str not in IGNORE_RPCS_LIST:
20812081
missing_examples = missing_examples + f"'{file_name_str}', "

0 commit comments

Comments
 (0)