web3.storage
web3.storage copied to clipboard
feat: add w3name http api swagger doc page
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
Website preview 🔗✨
- 🙂 https://w3s.link/ipfs/bafybeicutp2nrybvupmd4vbehar4anox6h7kgme2f6udvhyfgf37xgsavm
- ⛅️ https://936e84f6.web3-storage-staging.pages.dev
build log
@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!
I wonder if we should add the WebSocket endpoints to the Swagger config?
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/
Hi @yusefnapora / @dchoi27 , can you have a quick look at this and confirm if we can merge this? Thanks!
If you're not getting a response from @yusefnapora but are blocked on his review then please just ping him on Slack!
re:WebSocket documentation: it doesn't look trivial to document the WebSocket endpoint in swagger, would make sense to document this separately somehow.