# Local dev API smoke test. # Run with: hurl --test scripts/smoke.dev.hurl GET http://localhost:8787/api/resolve/app.bsky.feed.post HTTP 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" isString jsonpath "$.trace.dnsName" == "_lexicon.feed.bsky.app" jsonpath "$.trace.txtRecords" isCollection jsonpath "$.trace.selectedDid" startsWith "did:" jsonpath "$.trace.final.success" == true jsonpath "$.trace.final.message" isString jsonpath "$.lexicon.lexicon" == 1 jsonpath "$.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.post HTTP 200 [Asserts] jsonpath "$.version" == "0.0.0" jsonpath "$.nsid" == "app.bsky.feed.post" jsonpath "$.cache" == "hit" jsonpath "$.trace.final.success" == true jsonpath "$.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.post HTTP 200 [Asserts] jsonpath "$.version" == "0.0.0" jsonpath "$.nsid" == "app.bsky.feed.post" jsonpath "$.parsed.dnsName" == "_lexicon.feed.bsky.app" jsonpath "$.trace.final.success" == true jsonpath "$.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.post HTTP 200 [Asserts] jsonpath "$.version" == "0.0.0" jsonpath "$.nsid" == "app.bsky.feed.post" jsonpath "$.parsed.dnsName" == "_lexicon.feed.bsky.app" jsonpath "$.trace.final.success" == true jsonpath "$.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.card HTTP 200 [Asserts] jsonpath "$.version" == "0.0.0" jsonpath "$.nsid" == "org.stormlightlabs.malfestio.card" jsonpath "$.trace.selectedDid" == "did:plc:xg2vq45muivyy3xwatcehspu" jsonpath "$.trace.final.success" == true jsonpath "$.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.card HTTP 200 [Asserts] jsonpath "$.version" == "0.0.0" jsonpath "$.nsid" == "org.stormlightlabs.malfestio.card" jsonpath "$.trace.selectedDid" == "did:plc:xg2vq45muivyy3xwatcehspu" jsonpath "$.trace.final.success" == true jsonpath "$.lexicon.id" == "org.stormlightlabs.malfestio.card" GET http://localhost:8787/api/resolve/not-a-valid-nsid HTTP 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" == false jsonpath "$.trace.final.code" == "bad_request" jsonpath "$.trace.final.message" == "Invalid NSID" GET http://localhost:8787/openapi HTTP 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" exists jsonpath "$.paths['/api/uri/{aturi}'].get.responses['400'].content['application/json'].schema" exists