Something went wrong. Try again.
tiny REST API that resolves AT Protocol Lexicon schemas from NSIDs lex.desertthunder.dev
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091# Local dev API smoke test.# Run with: hurl --test scripts/smoke.dev.hurl
GET http://localhost:8787/api/resolve/app.bsky.feed.postHTTP 200[Asserts]header "content-type" contains "application/json"jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "app.bsky.feed.post"jsonpath "$.parsed.authority" == "app.bsky.feed"jsonpath "$.parsed.domain" == "feed.bsky.app"jsonpath "$.parsed.name" == "post"jsonpath "$.parsed.dnsName" == "_lexicon.feed.bsky.app"jsonpath "$.cache" isStringjsonpath "$.trace.dnsName" == "_lexicon.feed.bsky.app"jsonpath "$.trace.txtRecords" isCollectionjsonpath "$.trace.selectedDid" startsWith "did:"jsonpath "$.trace.final.success" == truejsonpath "$.trace.final.message" isStringjsonpath "$.lexicon.lexicon" == 1jsonpath "$.lexicon.id" == "app.bsky.feed.post"jsonpath "$._links.self.href" == "http://localhost:8787/api/resolve/app.bsky.feed.post"jsonpath "$._links.source.href" startsWith "at://did:"
GET http://localhost:8787/api/resolve/app.bsky.feed.postHTTP 200[Asserts]jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "app.bsky.feed.post"jsonpath "$.cache" == "hit"jsonpath "$.trace.final.success" == truejsonpath "$.trace.final.message" == "Resolved lexicon schema from cache"jsonpath "$.lexicon.id" == "app.bsky.feed.post"
GET http://localhost:8787/api/uri/at%3A%2F%2Fdid%3Aplc%3Aexample%2Fcom.atproto.lexicon.schema%2Fapp.bsky.feed.postHTTP 200[Asserts]jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "app.bsky.feed.post"jsonpath "$.parsed.dnsName" == "_lexicon.feed.bsky.app"jsonpath "$.trace.final.success" == truejsonpath "$.lexicon.id" == "app.bsky.feed.post"
GET http://localhost:8787/api/uri?uri=https%3A%2F%2Fbsky.social%2Fxrpc%2Fcom.atproto.repo.getRecord%3Fcollection%3Dcom.atproto.lexicon.schema%26rkey%3Dapp.bsky.feed.postHTTP 200[Asserts]jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "app.bsky.feed.post"jsonpath "$.parsed.dnsName" == "_lexicon.feed.bsky.app"jsonpath "$.trace.final.success" == truejsonpath "$.lexicon.id" == "app.bsky.feed.post"
GET http://localhost:8787/api/uri/https://shaggymane.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?repo=did%3Aplc%3Axg2vq45muivyy3xwatcehspu&collection=com.atproto.lexicon.schema&rkey=org.stormlightlabs.malfestio.cardHTTP 200[Asserts]jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "org.stormlightlabs.malfestio.card"jsonpath "$.trace.selectedDid" == "did:plc:xg2vq45muivyy3xwatcehspu"jsonpath "$.trace.final.success" == truejsonpath "$.lexicon.id" == "org.stormlightlabs.malfestio.card"
GET http://localhost:8787/api/uri?uri=https://shaggymane.us-west.host.bsky.network/xrpc/com.atproto.repo.getRecord?repo=did%3Aplc%3Axg2vq45muivyy3xwatcehspu&collection=com.atproto.lexicon.schema&rkey=org.stormlightlabs.malfestio.cardHTTP 200[Asserts]jsonpath "$.version" == "0.0.0"jsonpath "$.nsid" == "org.stormlightlabs.malfestio.card"jsonpath "$.trace.selectedDid" == "did:plc:xg2vq45muivyy3xwatcehspu"jsonpath "$.trace.final.success" == truejsonpath "$.lexicon.id" == "org.stormlightlabs.malfestio.card"
GET http://localhost:8787/api/resolve/not-a-valid-nsidHTTP 400[Asserts]header "content-type" contains "application/json"jsonpath "$.version" == "0.0.0"jsonpath "$.error.code" == "bad_request"jsonpath "$.error.message" == "Invalid NSID"jsonpath "$.trace.final.success" == falsejsonpath "$.trace.final.code" == "bad_request"jsonpath "$.trace.final.message" == "Invalid NSID"
GET http://localhost:8787/openapiHTTP 200[Asserts]header "content-type" contains "application/json"jsonpath "$.openapi" == "3.1.0"jsonpath "$.info.title" == "lexdns API"jsonpath "$.info.version" == "0.0.0"jsonpath "$.paths['/api/resolve/{nsid}'].get.responses['200'].content['application/json'].schema" existsjsonpath "$.paths['/api/uri/{aturi}'].get.responses['400'].content['application/json'].schema" exists