3 description: "OpenAPI for https://codesearch.debian.net/"
5 title: "Debian Code Search"
7 email: "stapelberg@debian.org"
10 url: "http://www.apache.org/licenses/LICENSE-2.0.html"
11 host: "codesearch.debian.net"
17 description: "Code Search"
22 description: "The search query, for example `who knows...` (literal) or `who knows\\.\\.\\.` (regular expression). See https://codesearch.debian.net/faq for more details about which keywords are supported. The regular expression flavor is RE2, see https://github.com/google/re2/blob/master/doc/syntax.txt"
28 description: "Whether the query is to be interpreted as a literal (`literal`) instead of as an RE2 regular expression (`regexp`). Literal searches are faster and do not require escaping special characters, regular expression searches are more powerful."
40 summary: "Searches through source code"
41 description: "Performs a search through the full Debian Code Search corpus, blocking until all results are available (might take a few seconds depending on the search query).\n\nSearch results are ordered by their ranking (best results come first)."
46 - $ref: "#/parameters/queryParam"
47 - $ref: "#/parameters/matchModeParam"
50 description: "All search results"
54 $ref: "#/definitions/SearchResult"
56 description: "The x-dcs-apikey header was either not set at all, or contained an invalid (no longer valid?) API key. Please see https://codesearch.debian.net/apikeys/ for obtaining a key."
63 summary: "Like /search, but aggregates per package"
64 description: "The search results are currently sorted arbitrarily, but we intend to sort them by ranking eventually: https://github.com/Debian/dcs/blob/51338e934eb7ee18d00c5c18531c0790a83cb698/cmd/dcs-web/querymanager.go#L719"
65 operationId: "searchperpackage"
69 - $ref: "#/parameters/queryParam"
70 - $ref: "#/parameters/matchModeParam"
73 description: "All search results"
77 $ref: "#/definitions/PackageSearchResult"
79 description: "The x-dcs-apikey header was either not set at all, or contained an invalid (no longer valid?) API key. Please see https://codesearch.debian.net/apikeys/ for obtaining a key."
95 description: "A search result matching the specified query. You can use sources.debian.org to view the file contents. See https://github.com/Debian/dcs/blob/master/cmd/dcs-web/show/show.go for how to construct a sources.debian.org URL from a search result."
99 description: "The Debian source package containing this search result, including the full Debian version number."
100 example: "i3-wm_4.18-1"
103 example: "i3bar/src/xcb.c"
104 description: "Path to the file containing the this search result, starting with `package`."
109 description: "Line number containing the search result."
114 description: "Up to 2 full lines before the search result (see `context`)."
117 - " cursor = xcb_generate_id(xcb_connection);"
120 example: " i3Font cursor_font = load_font(\"cursor\", false);"
121 description: "The full line containing the search result."
126 description: "Up to 2 full lines after the search result (see `context`)."
128 - " xcb_create_glyph_cursor("
138 example: "i3-wm_4.18-1"
139 description: "The Debian source package for which up to 2 search results have been aggregated in `results`."
143 $ref: "#/definitions/SearchResult"
145 description: "Get a Debian Code Search API key"
146 url: "https://codesearch.debian.net/apikeys/"