-
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.
Merge pull request #155 from GiganticMinecraft/addSessionEndpoints
docs: session に関するエンドポイントを定義
- Loading branch information
Showing
2 changed files
with
42 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import "@typespec/http"; | ||
import "@typespec/rest"; | ||
import "../models/errors.tsp"; | ||
import "../models/user.tsp"; | ||
|
||
using TypeSpec.Http; | ||
using TypeSpec.Rest; | ||
|
||
namespace SeichiPortalApiSchema; | ||
|
||
@tag("Sessions") | ||
@route("/session") | ||
namespace Session { | ||
@post | ||
@summary("セッションを開始する") | ||
op create(): { | ||
@statusCode statusCode: 200; | ||
|
||
/** | ||
* `SEICHI_PORTAL__SESSION_ID` という名前の Cookie に30分間有効なセッション ID を設定します。 | ||
*/ | ||
@header SetCookie: string; | ||
} | { | ||
@statusCode statusCode: 401 | 500; | ||
@body body: Error; | ||
}; | ||
|
||
@delete | ||
@summary("セッションを終了する") | ||
op delete(): { | ||
@statusCode statusCode: 200; | ||
|
||
/** | ||
* `SEICHI_PORTAL__SESSION_ID` という名前の Cookie に30分間有効なセッション ID を削除します。 | ||
*/ | ||
@header SetCookie: string; | ||
} | { | ||
@statusCode statusCode: 401 | 500; | ||
@body body: Error; | ||
}; | ||
} |
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