Skip to content

Incomplete API documentation #4845

@dcolley

Description

@dcolley

Following this discussion: #4516 which has been closed.

The 'docs' site only deals with basic cases. Can we have complete API docs please?

I tried typedoc output

// typedoc.json
{
    "entryPoints": [
        "./packages/api/src/index.ts",
        "./packages/api-base/src/index.ts",
        "./packages/api-derive/src/index.ts",
        "./packages/rpc-core/src/index.ts",
        "./packages/typegen/src/index.ts",
        "./packages/types-augment/src/index.ts",
        "./packages/types-create/src/index.ts",
        "./packages/types-support/src/index.ts",
        "./packages/api-augment/src/index.ts",
        "./packages/api-contract/src/index.ts",
        "./packages/rpc-augment/src/index.ts",
        "./packages/rpc-provider/src/index.ts",
        "./packages/types/src/index.ts",
        "./packages/types-codec/src/index.ts",
        "./packages/types-known/src/index.ts"
    ],
    "out": "typedocs"
}

Then use it like:

git clone https://github.com/polkadot-js/api
cd api
yarn install
# npm|yarn install -g serve
# npm|yarn install --save-dev typedoc
./node_modules/.bin/typedoc --options ./typedoc.json --tsconfig ./tsconfig.json
serve typedocs

Open http://localhost:3000

The result is only showing a portion of the docs and the sections don't [seem to] know about each other.

For example, api.query returns QueryableStorage<ApiType>, yet there is no link to that definition.

image

Something like https://swagger.io would be great!

Is there a better option? I'm happy to work on this if people find it useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationUpdates or additions to guides, API references, and comments to aid SDK understanding.P3 - LowNon-essential improvements or minor fixes. Can be scheduled flexibly as time permits.

    Type

    No type

    Projects

    Status

    P3 - Low

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions