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

RPC Documents Consolidation #6995

Merged

Commits on Mar 18, 2024

  1. JSON: don't return a raw result string for "stop" and "recover".

    In general, results should always be an object, so we can add new fields
    later (e.g. warnings!).  But we violated this for "stop", and when "recover"
    used the same infrastructure, it started doing the same thing.
    
    I'm assuming nobody cares, so we don't need to do a deprecation cycle.
    
    Changelog-Changed: JSON-RPC: `stop` and `recover` now return a JSON object (not a raw string!) like every other command does.
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    ebcf77a View commit details
    Browse the repository at this point in the history
  2. Add type sat.

    We actually use this in multiple places for requests.  The key
    difference between this and msat is what we do when presented with a
    raw number!  I prefer insisting on explicit suffixes, for this reason,
    but at least this will document the field correctly!
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    ca32cb8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7ee3629 View commit details
    Browse the repository at this point in the history
  4. doc: Adding missing *.request.json

    Some rpc commands did not have their corresponding *.request.json files to generate the consolidated json
    ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    9d6e987 View commit details
    Browse the repository at this point in the history
  5. doc: Adding missing *.schema.json

    Adding missing *.schema.json files for rpc commands to create consolidated json files.
    Updating and deleting other as per requirement.
    ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    bbd155d View commit details
    Browse the repository at this point in the history
  6. doc: Updated parameter descriptions for *.request.json

    Added descriptions for rpc command parameters
    
    This also performs the following fixes:
    1. delforward parameters are compulsory (required).
    2. disableinvoicerequest request added `added` field.
    3. invoice request order fixed (label then description, not vice-versa!).
    4. listpeers log levels are a proper enum
    5. description parameter documented for sendonion requests.
    6. deprecatred amount_msat removed from sendpay request.
    7. sendpay request partid type fixed to u64 (was u16!)
    8. sendpay request localinvreqid type tightened to hash (was hex)
    9. sendpay request payment_metadata and description fields documented.
    10. sendpsbt request reserve type fixed to u32 (was boolean)
    11. utxopsbt request satoshi type fixed to msat_or_all (was msat)
    12. withdraw request parameter satoshi is compulsory (required)
    13. fundchannel_start request amount is sat, not msat_or_all.
    14. openchannel_init request amount is sat, not msat
    15. openchannel_init close_to is a string, not hex.
    16: invoice labels can be strings OR numbers.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell authored and ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    f5de75e View commit details
    Browse the repository at this point in the history
  7. doc: Updated schemas *.schema.json

    - Makes emergency schema stricter
    - Fixes some formatting
    ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    3c37bae View commit details
    Browse the repository at this point in the history
  8. doc: Markdown cleanup

    This commit will remove parameter descriptions from RPC markdown but we will fix it in next commits by reading these descriptions directly from json.
    
    - Removing parameter description text
    - Adding/removing newlines for cleaner formatting
    - Adding ERRORS title wherever needed
    - Updating titles for consistency
    - Adding resources links
    ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    910184e View commit details
    Browse the repository at this point in the history
  9. doc: Merge request and schema jsons in a single file

    Merge information from `*.request.json` & `*.schema.json`. Also consolidate remaining details from `*.md` files and create a single file in schemas folder.
    ShahanaFarooqui committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    d9fb619 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9122f1f View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2024

  1. script: Update scripts

    - Update `make doc-all` script
    - `fromschema.py` script
        - Updated to generate whole doc/lightning-*.md via doc/schemas/lightning-*.json file
        - Updated to print request params
        - Added `oneOfMany` condition for request params
        - Added `pairedWith` condition for request params
        - Added `dependentUpon` condition for request params
        - Updated for pre and post_return_value for response
        - Hiding `hidden` fields
        - `descriptions` are array now
        - Unified gaps between titles
        - Added default key-value pair
    
    - script: msggen, sql-schema, listconfig and pyln-testing script updates
    
    This does not add created markdowns for cleaner review. We will add the markdown files in a separate commit.
    ShahanaFarooqui committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    9b79132 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a9b3157 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    42ee1d5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e092bbb View commit details
    Browse the repository at this point in the history
  5. docs: Updates script and fixed test to generate lightning-sql

    - Updated doc/Makefile for generating schemas/lightning-sql.json
        - Read the lightning-sql template from schemas/lightning-sql-template.json
        - Generate sql tables data and merge it with json object read from above template
        - Save final merged object in schemas/lightning-sql.json
    - Updated doc/Makefile to auto generate lightning-sql.7.md and lightning-sql.7
    - Deleted schemas/lightning-sql.json and adding it into .gitignore
    - Added lightning-sql specific titles in the fromschema.py script
    - Fixed test_sql by changing the sequence for listpeerchannels `reestablished` field
    - Ignoring lightning-sql.json for msggen schema.json because it is auto generated by sql plugin and lightning-sql-template.json.
    ShahanaFarooqui committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    1916f90 View commit details
    Browse the repository at this point in the history
  6. doc: Delete markdowns as they will be generated by scripts now

    This PR will generate doc/lightning-*.md file for rpc commands. It will get the information from consolidated doc/schemas/lightning-*.json file and use it to generate markdown file for RPC commands.
    
    Changelog-Changed: Documentation: great documentation rewrite, all reference pages now generated from the fully-tested JSON schemas and include examples.
    ShahanaFarooqui committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    85f7040 View commit details
    Browse the repository at this point in the history