4 "title": "Debian Code Search",
5 "description": "OpenAPI for https://codesearch.debian.net/",
7 "email": "stapelberg@debian.org"
11 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
16 "description": "Get a Debian Code Search API key",
17 "url": "https://codesearch.debian.net/apikeys/"
21 "url": "https://codesearch.debian.net/api/v1"
27 "description": "Code Search"
36 "summary": "Searches through source code",
37 "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).",
38 "operationId": "search",
43 "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",
52 "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.",
65 "description": "All search results",
71 "$ref": "#/components/schemas/SearchResult"
78 "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.",
89 "/searchperpackage": {
94 "summary": "Like /search, but aggregates per package",
95 "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",
96 "operationId": "searchperpackage",
101 "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",
108 "name": "match_mode",
110 "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.",
123 "description": "All search results",
125 "application/json": {
129 "$ref": "#/components/schemas/PackageSearchResult"
136 "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.",
161 "description": "The Debian source package containing this search result, including the full Debian version number.",
162 "example": "i3-wm_4.18-1"
166 "description": "Path to the file containing the this search result, starting with `package`.",
167 "example": "i3bar/src/xcb.c"
171 "description": "Line number containing the search result.",
177 "description": "Up to 2 full lines before the search result (see `context`).",
180 " cursor = xcb_generate_id(xcb_connection);"
188 "description": "The full line containing the search result.",
189 "example": " i3Font cursor_font = load_font(\"cursor\", false);"
193 "description": "Up to 2 full lines after the search result (see `context`).",
195 " xcb_create_glyph_cursor(",
203 "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."
205 "PackageSearchResult": {
214 "description": "The Debian source package for which up to 2 search results have been aggregated in `results`.",
215 "example": "i3-wm_4.18-1"
220 "$ref": "#/components/schemas/SearchResult"
230 "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",
237 "name": "match_mode",
239 "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.",
253 "name": "x-dcs-apikey",