-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
4,901 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ go.work | |
|
||
moonlogs | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import "@typespec/http"; | ||
|
||
using TypeSpec.Http; | ||
|
||
@service({ | ||
title: "Moonlogs", | ||
#suppress "deprecated" "Use global version atm" | ||
version: "v1.18.6" | ||
}) | ||
namespace Moonlogs; | ||
|
||
model Meta { | ||
page: integer; | ||
count: integer; | ||
pages: integer; | ||
} | ||
|
||
model Response<Data> { | ||
success: boolean; | ||
code: string; | ||
error: string; | ||
data: Data; | ||
meta: Meta; | ||
} | ||
|
||
model Schema { | ||
id: integer; | ||
title: string; | ||
description: string; | ||
name: string; | ||
fields: SchemaField[]; | ||
kinds: SchemaKind[]; | ||
tag_id: integer; | ||
renetention_days: integer; | ||
} | ||
|
||
model SchemaField { | ||
title: string; | ||
name: string; | ||
} | ||
|
||
model SchemaKind { | ||
title: string; | ||
name: string; | ||
} | ||
|
||
@route("/api/schemas") | ||
@tag("Schemas") | ||
interface Schemas { | ||
/** List all schemas */ | ||
@get list(): Response<Schema[]>; | ||
|
||
/** Get schema by id */ | ||
@get read(@path id: string): Response<Schema>; | ||
|
||
// /** Create a widget */ | ||
// @post create(@body body: Widget): Widget | Error; | ||
|
||
// /** Update a widget */ | ||
// @patch update(@path id: string, @body body: Widget): Widget | Error; | ||
|
||
// /** Delete a widget */ | ||
// @delete delete(@path id: string): void | Error; | ||
|
||
// /** Analyze a widget */ | ||
// @route("{id}/analyze") @post analyze(@path id: string): AnalyzeResult | Error; | ||
} |
Oops, something went wrong.