DAC: Replace `version_rpc_arg` with `dac v0_api_prefix`
Context
Part of #5437 (closed), follows !8678 (merged). It replaces dynamic version_rpc_arg with v0_api_prefix.
The motivation here is that if we register the endpoint with version_rpc_arg, we register it to all major API versions automatically. Unfortunately, this pattern does not allow us to filter invalid versions at the registration time. The only way to do this is to throw 404 or 500 from the corresponding handler of the endpoint. An antipattern that we would like to remove.
Closes #5635 (closed)
See !8762 (merged) for the follow-up, which introduces V1 API, with the single "GET v1/preimage" endpoint for the start.
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Martin Tomazic