Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Auto-Generate JSON-RPC API docs #8835

Closed
Tbaut opened this issue Jun 7, 2018 · 26 comments
Closed

Auto-Generate JSON-RPC API docs #8835

Tbaut opened this issue Jun 7, 2018 · 26 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M3-docs 📑 Documentation. P5-sometimesoon 🌲 Issue is worth doing soon. Q3-medium A fair chunk of work, not necessarily very hard but not trivial either
Milestone

Comments

@Tbaut
Copy link
Contributor

Tbaut commented Jun 7, 2018

Originally from https://github.com/paritytech/wiki/issues/58 but transferred here for better visibility.

We have 2 tools

  1. Generate markdown docs from js files (should be run during the CI to make sure we document methods in JS format)
  2. Make sure that no rust RPC is missing in JS files (can be automated to make a PR to wiki for example.)

@tomusdrw can you add anything relevant for this issue to be picked up as a task or bounty?

@Tbaut Tbaut added P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M3-docs 📑 Documentation. Q3-medium A fair chunk of work, not necessarily very hard but not trivial either labels Jun 7, 2018
@Tbaut Tbaut added this to the 1.12 milestone Jun 7, 2018
@tomusdrw
Copy link
Collaborator

tomusdrw commented Jun 7, 2018

Have a look at this: https://github.com/parity-js/jsonrpc It pretty much has all we want

@Tbaut
Copy link
Contributor Author

Tbaut commented Jun 18, 2018

Thanks,
From npm run build:markdown

ERROR:	parity_allTransactions is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	parity_call is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	parity_nodeHealth is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	personal_ecRecover is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	personal_sign is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	personal_signTransaction is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	private_composeDeploymentTransaction is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	private_contractKey is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_decrypt is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_encrypt is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_generateDocumentKey is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_serversSetHash is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_shadowDecrypt is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	secretstore_signRawHash is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	trace_callMany is defined in Rust traits, but not in js/src/jsonrpc/interfaces
ERROR:	trace_replayBlockTransactions is defined in Rust traits, but not in js/src/jsonrpc/interfaces
INFO:	Skipping db_getHex: Not present in Rust code
INFO:	Skipping db_getString: Not present in Rust code
INFO:	Skipping db_putHex: Not present in Rust code
INFO:	Skipping db_putString: Not present in Rust code
INFO:	Skipping eth_fetchQueuedTransactions: Not present in Rust code
INFO:	Skipping eth_flush: Not present in Rust code
INFO:	eth_getBlockByNumber has a request example and only text description for response
INFO:	Skipping eth_getFilterChangesEx: Not present in Rust code
INFO:	eth_getFilterLogs has a request example and only text description for response
INFO:	Skipping eth_getFilterLogsEx: Not present in Rust code
INFO:	eth_getLogs has a request example and only text description for response
INFO:	Skipping eth_getLogsEx: Not present in Rust code
INFO:	eth_getTransactionByBlockHashAndIndex has a request example and only text description for response
INFO:	eth_getTransactionByBlockNumberAndIndex has a request example and only text description for response
INFO:	eth_getUncleByBlockHashAndIndex has a request example and only text description for response
INFO:	eth_getUncleByBlockNumberAndIndex has a request example and only text description for response
INFO:	Skipping eth_inspectTransaction: Not present in Rust code
INFO:	Skipping eth_newFilterEx: Not present in Rust code
INFO:	Skipping eth_notePassword: Not present in Rust code
INFO:	Skipping eth_pendingTransactions: Not present in Rust code
INFO:	Skipping eth_register: Not present in Rust code
INFO:	Skipping eth_unregister: Not present in Rust code
ERROR:	shh_addPrivateKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_addPrivateKey has no examples
ERROR:	shh_deleteKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_deleteKey has no examples
ERROR:	shh_deleteMessageFilter is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_deleteMessageFilter has no examples
ERROR:	shh_getFilterMessages is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_getFilterMessages has no examples
INFO:	Skipping shh_getFilterMesssages: Not present in Rust code
ERROR:	shh_getPrivateKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_getPrivateKey has no examples
ERROR:	shh_getPublicKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_getPublicKey has no examples
ERROR:	shh_getSymKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_getSymKey has no examples
ERROR:	shh_info is defined in js/src/jsonrpc/interfaces, but not in Rust traits
WARN:	shh_info has a request example but not a response example
ERROR:	shh_newKeyPair is defined in js/src/jsonrpc/interfaces, but not in Rust traits
WARN:	shh_newKeyPair has a request example but not a response example
ERROR:	shh_newMessageFilter is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_newMessageFilter has no examples
ERROR:	shh_newSymKey is defined in js/src/jsonrpc/interfaces, but not in Rust traits
WARN:	shh_newSymKey has a request example but not a response example
ERROR:	shh_post is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_post has no examples
ERROR:	shh_subscribe is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_subscribe has no examples
ERROR:	shh_unsubscribe is defined in js/src/jsonrpc/interfaces, but not in Rust traits
ERROR:	shh_unsubscribe has no examples
INFO:	Skipping signer_signerEnabled: Not present in Rust code

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 0.25 ETH (129.73 USD @ $518.93/ETH) attached to it.

@gitcoinbot
Copy link

@dilatebrave Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@5chdn 5chdn added P5-sometimesoon 🌲 Issue is worth doing soon. and removed P2-asap 🌊 No need to stop dead in your tracks, however issue should be addressed as soon as possible. labels Jun 23, 2018
@dilatebrave
Copy link

i'm sill working on this issue

@gitcoinbot
Copy link

@dilatebrave Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@dilatebrave due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@Thoughtscript
Copy link

Hi @Tbaut - is this one still available? I'd love to work on this! Thanks!

@Tbaut
Copy link
Contributor Author

Tbaut commented Jul 9, 2018

@Thoughtscript, it looks like @dilatebrave is still working on it at the moment, so it's not available.

@vs77bb
Copy link

vs77bb commented Jul 10, 2018

@Tbaut As we haven't heard from @dilatebrave in a while here, we removed him as it may make more sense for this to go back out to the crowd.

@Thoughtscript: We'd love to have you 'Start Work' here and pick this one up if you're still interested!

@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@cpurta
Copy link
Contributor

cpurta commented Jul 23, 2018

Thinking about picking up this task. Just want to clarify if the ask of this issue to to add a stage in CI to generate the docs using https://github.com/parity-js/jsonrpc?

@Tbaut
Copy link
Contributor Author

Tbaut commented Jul 24, 2018

@cpurta yes, add a test in CI and automatically generate a PR in the https://github.com/paritytech/wiki repo

@gitcoinbot
Copy link

gitcoinbot commented Jul 24, 2018

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 7 months, 3 weeks ago.
Please review their action plans below:

1) cpurta has started work.

Hoping to have this done by end of next week.

Learn more on the Gitcoin Issue Details page.

@Tbaut
Copy link
Contributor Author

Tbaut commented Jul 25, 2018

@tomusdrw @5chdn Any other relevant info you want to add to help @cpurta to perform this task?

@gitcoinbot
Copy link

@cpurta Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • warning (3 days)
  • escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

@cpurta
Copy link
Contributor

cpurta commented Jul 27, 2018

PR is currently being reviewed.

@5chdn
Copy link
Contributor

5chdn commented Jul 30, 2018

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 0.45 ETH (189.88 USD @ $421.96/ETH) has been submitted by:

  1. @cpurta

@ceresstation please take a look at the submitted work:


@Thoughtscript
Copy link

Hi! Just checking to see if there's any work on this that still needs doing! Thanks!

@spm32
Copy link

spm32 commented Aug 5, 2018

@Thoughtscript Thanks for checking in! @5chdn looks like the PR is almost ready to merge?

@5chdn
Copy link
Contributor

5chdn commented Aug 21, 2018

commented on the PR, the script is failing, but looks good otherwise

@cpurta
Copy link
Contributor

cpurta commented Aug 24, 2018

CC @ceresstation this issue was just closed out.

@cpurta
Copy link
Contributor

cpurta commented Aug 30, 2018

@gitcoinbot this issue has been closed out with PR #9219

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.45 ETH (109.94 USD @ $244.31/ETH) attached to this issue has been approved & issued to @cpurta.

@spm32
Copy link

spm32 commented Sep 5, 2018

Just paid out, sorry for the delay @cpurta!

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 0.45 ETH (110.52 USD @ $245.59/ETH) attached to this issue has been approved & issued to @cpurta.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M3-docs 📑 Documentation. P5-sometimesoon 🌲 Issue is worth doing soon. Q3-medium A fair chunk of work, not necessarily very hard but not trivial either
Projects
None yet
Development

No branches or pull requests

9 participants