panic icon indicating copy to clipboard operation
panic copied to clipboard

Document Substrate-API using Swagger

Open dillu24 opened this issue 3 years ago • 0 comments

Technical Story

As a developer/user I want to easily understand what a Substrate-API endpoint does and how I can interact with it.

Description

The aim of this task is to use Swagger to document all of our Substrate-API endpoints

Requirements

Create input and return documentation for the following endpoints:

  • [ ] /api/custom/slash/getSlashedAmount
  • [ ] /api/custom/offline/isOffline
  • [ ] /api/derive/democracy/proposals
  • [ ] /api/derive/democracy/referendums
  • [ ] /api/derive/staking/validators
  • [ ] /api/query/grandpa/stalled
  • [ ] /api/query/democracy/depositOf
  • [ ] /api/query/democracy/publicPropCount
  • [ ] /api/query/democracy/publicProps
  • [ ] /api/query/democracy/referendumCount
  • [ ] /api/query/democracy/referendumInfoOf
  • [ ] /api/query/session/currentIndex
  • [ ] /api/query/session/validators
  • [ ] /api/query/session/disabledValidators
  • [ ] /api/query/imOnline/authoredBlocks
  • [ ] /api/query/imOnline/receivedHeartbeats
  • [ ] /api/query/staking/activeEra
  • [ ] /api/query/staking/erasStakers
  • [ ] /api/query/staking/erasRewardPoints
  • [ ] /api/query/staking/ledger
  • [ ] /api/query/staking/historyDepth
  • [ ] /api/query/staking/bonded
  • [ ] /api/query/system/events
  • [ ] /api/rpc/system/health
  • [ ] /api/rpc/system/properties
  • [ ] /api/rpc/system/syncState
  • [ ] /api/rpc/chain/getFinalizedHead
  • [ ] /api/rpc/chain/getHeader
  • [ ] /api/rpc/chain/getBlockHash

Note that there might have been changes in endpoints from the time when this ticket was created to when this ticket is tackled. Therefore make sure that this ticket is updated prior to tackling it.

Acceptance criteria

Given: Any endpoint mentioned in the requirements section Then: When I access the Swagger docs on https://<ip>:<port>/api-docs/ I can see input and return information for that endpoint

dillu24 avatar Jun 09 '22 09:06 dillu24