| 74 | {} |
| 75 | |
| 76 | class TopLevelApi extends HttpApiGroup.make("topLevel", { topLevel: true }) |
| 77 | .add( |
| 78 | HttpApiEndpoint.get("csv", "/csv") |
| 79 | .addSuccess(HttpApiSchema.Text({ |
| 80 | contentType: "text/csv" |
| 81 | })) |
| 82 | .addError(HttpApiError.Conflict) |
| 83 | ) |
| 84 | .add( |
| 85 | HttpApiEndpoint.get("binary", "/binary") |
| 86 | .addSuccess(HttpApiSchema.Uint8Array()) |
| 87 | ) |
| 88 | .add( |
| 89 | HttpApiEndpoint.get("urlParams", "/url-params") |
| 90 | .addSuccess( |
| 91 | Schema.Struct({ |
| 92 | id: Schema.NumberFromString, |
| 93 | name: Schema.String |
| 94 | }).pipe( |
| 95 | HttpApiSchema.withEncoding({ |
| 96 | kind: "UrlParams" |
| 97 | }) |
| 98 | ) |
| 99 | ) |
| 100 | ) |
| 101 | .annotateContext(OpenApi.annotations({ |
| 102 | title: "Top Level API", |
| 103 | description: "API for top level endpoints" |
| 104 | })) |
| 105 | {} |
| 106 | |
| 107 | class PeopleApi extends HttpApiGroup.make("people") |
| 108 | .add( |
nothing calls this directly
no test coverage detected