zonemaster / zonemaster-backend

The Zonemaster Backend - part of the Zonemaster project
Other
14 stars 23 forks source link

Update language in experimental RPC API paramaters #1155

Closed mattias-p closed 7 months ago

mattias-p commented 8 months ago

Purpose

This PR updates the terminology used in experimental RPC API methods.

Context

Fixes #1084.

Changes

In the RPC API the following input and output parameters are renamed.

RPC method Parameter type Old parameter name New parameter name
job_status input test_id job_id
job_params input test_id job_id
job_results input id job_id
job_results output hash_id job_id
domain_history input frontend_params params
domain_history output history[].id history[].job_id
batch_create input test_params job_params
batch_status output finished_test_ids finished_job_ids
batch_status output nb_finished finished_count
batch_status output nb_running running_count

How to test this PR

Make calls to each RPC method in the table above and make sure it accepts the new input parameters and that the new output parameters are present in the output.

marc-vanderwal commented 8 months ago

Yes, “nb” is a usual French shorthand for “nombre”. So variable names such as nb_running are technically what we call franglais. I agree that “nb” ought to be replaced with “num” or something to that effect.

hannaeko commented 8 months ago

May I suggest finished_count and running_count instead of num_finished and num_running, to get rid of the abbreviated num altogether?

mattias-p commented 8 months ago

Sure, I like it. I'll make an update.