web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

feat: add w3name http api swagger doc page

Open joshJarr opened this issue 2 years ago • 1 comments

Adds a page to host the http swagger docs for w3name API, fetching the schema from the w3name API.

TODO:

  • [ ] Test CORS
  • [ ] Validate the correct copy is in the open API docs
  • [ ] Test the API via the interactive docs, ensure the schemas are documented accurately

joshJarr avatar Aug 11 '22 16:08 joshJarr

Website preview 🔗✨

  • 🙂 https://w3s.link/ipfs/bafybeicutp2nrybvupmd4vbehar4anox6h7kgme2f6udvhyfgf37xgsavm
  • ⛅️ https://936e84f6.web3-storage-staging.pages.dev

build log

github-actions[bot] avatar Aug 11 '22 16:08 github-actions[bot]

@yusefnapora Sorry, I've been a little slow getting this PR together as it was blocked by some of the openAPI work on W3Name. I tried to copy a similar format to web3.storage but am not the best with words, would love your feedback on the OpenAPI docs and swagger UI.

I moved the w3name API reference to it's own page and renamed the web3.storage api from HTTP API => web3.storage HTTP API so they won't be confused, do you think this is a good idea, or should we put the new w3name HTTP docs in a separate section since it's being treated as a separate product?

Thanks!

joshJarr avatar Aug 17 '22 17:08 joshJarr

I wonder if we should add the WebSocket endpoints to the Swagger config?

francois-potato avatar Aug 22 '22 15:08 francois-potato

Hey @yusefnapora, are you happy with the proposed changes? Here is the w3name HTTP API documentation in action: https://2e9ef0d8.web3-storage-staging.pages.dev/docs/reference/w3name-http-api/

francois-potato avatar Sep 02 '22 11:09 francois-potato

Hi @yusefnapora / @dchoi27 , can you have a quick look at this and confirm if we can merge this? Thanks!

mbommerez avatar Sep 08 '22 09:09 mbommerez

If you're not getting a response from @yusefnapora but are blocked on his review then please just ping him on Slack!

dchoi27 avatar Sep 08 '22 15:09 dchoi27

re:WebSocket documentation: it doesn't look trivial to document the WebSocket endpoint in swagger, would make sense to document this separately somehow.

joshJarr avatar Sep 09 '22 10:09 joshJarr