Draft: Add basic openapi-diff script
Context
In order to check if the RPCs documentation (./docs/api/
) is up-to-date, we need to be able to check differences between two documentations. It will then allow us to check the differences between the documentation stored in the commit and the generated one (generated with ./bin_openap/generate.sh
).
The aim is to make this check in the CI. If there is any difference then the documentation is out of date and needs to be updated in that commit. Thus, any change in RPCs would be clearly visible in the commit changes, allowing easier review.
This merge request creates a basic script openapi_diff
to check and display differences.
Manually testing the MR
-
dune exec ./src/bin_openapi_diff/openapi-diff.exe ./doc/api/rpc-openapi.json ./doc/api/rpc-openapi.json
should not display any change. - Copy ./doc/api/rpc-openapi.json in a new file and make some changes.
dune exec ./bin_openapi_diff/openapi_diff.exe
should now display the changes you made.
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.rst
for the protocol and the environment, theDevelopment Version
section ofCHANGES.md
for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Killian Delarue