4 "description": "OpenAPI for https://codesearch.debian.net/",
6 "title": "Debian Code Search",
8 "email": "stapelberg@debian.org"
12 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
15 "host": "codesearch.debian.net",
16 "basePath": "/api/v1",
23 "description": "Code Search"
30 "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",
37 "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.",
53 "summary": "Searches through source code",
54 "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).",
55 "operationId": "search",
61 "$ref": "#/parameters/queryParam"
64 "$ref": "#/parameters/matchModeParam"
69 "description": "All search results",
73 "$ref": "#/definitions/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."
88 "/searchperpackage": {
93 "summary": "Like /search, but aggregates per package",
94 "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",
95 "operationId": "searchperpackage",
101 "$ref": "#/parameters/queryParam"
104 "$ref": "#/parameters/matchModeParam"
109 "description": "All search results",
113 "$ref": "#/definitions/PackageSearchResult"
118 "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."
129 "securityDefinitions": {
132 "name": "x-dcs-apikey",
145 "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.",
149 "description": "The Debian source package containing this search result, including the full Debian version number.",
150 "example": "i3-wm_4.18-1"
154 "example": "i3bar/src/xcb.c",
155 "description": "Path to the file containing the this search result, starting with `package`."
161 "description": "Line number containing the search result."
168 "description": "Up to 2 full lines before the search result (see `context`).",
171 " cursor = xcb_generate_id(xcb_connection);"
176 "example": " i3Font cursor_font = load_font(\"cursor\", false);",
177 "description": "The full line containing the search result."
184 "description": "Up to 2 full lines after the search result (see `context`).",
186 " xcb_create_glyph_cursor(",
192 "PackageSearchResult": {
201 "example": "i3-wm_4.18-1",
202 "description": "The Debian source package for which up to 2 search results have been aggregated in `results`."
207 "$ref": "#/definitions/SearchResult"
214 "description": "Get a Debian Code Search API key",
215 "url": "https://codesearch.debian.net/apikeys/"