MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.22k stars 11.2k forks source link

Fix, improve and embed API documentation in docs.sui.io #2665

Closed Clay-Mysten closed 2 years ago

Clay-Mysten commented 2 years ago

What are the existing URLs containing the issue, if any?

https://docs.sui.io/build

https://playground.open-rpc.org/?uiSchema%5BappBar%5D%5Bui:splitView%5D=false&schemaUrl=https://raw.githubusercontent.com/MystenLabs/sui/main/crates/sui-open-rpc/spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:input%5D=false

How would you describe the issue? (What needs changing?)

We have now:

  1. Duplicate entries, ex. sui_getObject, sui_getObject

    Screen Shot 2022-06-22 at 12 02 37 PM
  2. Virtually no context on https://playground.open-rpc.org/ as compared to the previous: https://app.swaggerhub.com/apis/MystenLabs/sui-api/0.1#/CallRequest

  3. To go to an external site rather than have the API docs embedded as in the Docusaurus-generated site: https://docs.solana.com/developing/clients/jsonrpc-api

Where should this information land if new? (Learn, Build, Explore, Contribute.)

We need to:

This requesr comes from @longbowlu , who has new API information coming. I've added all relevant parties.

Lu, please take it from here. Thanks!

Jibz1 commented 2 years ago

@Clay-Mysten API are MD files on https://github.com/solana-labs/solana/blob/master/docs/src/developing/clients/jsonrpc-api.md

patrickkuo commented 2 years ago

I will take a look, there are dups in openrpc.json file, maybe a bug in rpc api doc generation

patrickkuo commented 2 years ago

this PR removes the dups in openrpc.json file, https://github.com/MystenLabs/sui/pull/2668

depends on where the doc site is getting the data from, I might need to merge this into the devnet branch to fix it in the doc site.

Clay-Mysten commented 2 years ago

Thanks, @patrickkuo !

Clay-Mysten commented 2 years ago

Adding @bhenhsi as an FYI on this work.

Clay-Mysten commented 2 years ago

I believe this work is complete, thanks to @Jibz1. Enhancements are requested in: https://github.com/MystenLabs/sui/issues/3877