MetaMask / api-playground

https://metamask.github.io/api-playground/api-documentation
Apache License 2.0
6 stars 12 forks source link

Dynamically load api-specs #42

Closed danfinlay closed 2 years ago

danfinlay commented 2 years ago

get rid of this call for the openrpc doc and just fetch our /latest/ one off our new github pages deploy: https://github.com/MetaMask/api-playground/blob/main/src/pages/api-documentation.tsx#L79-L86

This will make it so we don't have to publish new versions of this for it to get updates from the latest api-specs.

The latest deploy is available at: https://raw.githubusercontent.com/MetaMask/api-specs/gh-pages/latest/metamask-openrpc.json

danfinlay commented 2 years ago

Started work on this branch but I don't understand what this line is all about, nor how to pass my resulting data into the child component, so I'm going to just ping @shanejonas now and ask what's that?

danfinlay commented 2 years ago

If you search that branch's file for "we have" you'll get the two instances where data is fetched. The difference between what I'm returning and the prior one is I'm returning the parsed JSON, before it was just a JSON string, so the component will need to stop parsing what it gets.

Screen Shot 2022-02-03 at 9 13 27 PM