0.1.17 • Published 8 months ago
@winglibs/tsoa v0.1.17
tsoa
A Wing library for working with TSOA - An OpenAPI-compliant Web APIs using TypeScript.
Prerequisites
Installation
npm i @winglibs/tsoa
Usage
// main.w
bring tsoa;
let service = new tsoa.Service(
controllerPathGlobs: ["./src/*Controller.ts"],
outputDirectory: "../build",
routesDir: "../build"
);
It is also possible to use Wing resources from the TS code
let bucket = new cloud.Bucket();
service.lift(bucket, id: "bucket", allow: ["put"]);
// someController.ts ...
import { lifted } from "@winglibs/tsoa/clients.js";
@Get("{userId}")
public async getUser(
@Path() userId: number,
@Request() request: Req,
@Query() name?: string,
): Promise<User> {
let bucket = lifted("bucket");
await bucket.put(userId.toString(), name ?? "not-a-name");
return {
id :userId,
name: name ?? "not-a-name",
status: "Happy",
email:"email",
phoneNumbers: ["a"]
}
}
Roadmap
- Support
sim
platform - Add Console support for http client (depends on https://github.com/winglang/wing/issues/6131)
- Support
tf-aws
platform using Amazon Api Gateway - Support
gcp
platform using GCP Api Gateway
License
This library is licensed under the MIT License.
0.1.17
8 months ago
0.1.14
12 months ago
0.1.15
12 months ago
0.1.16
12 months ago
0.1.12
1 year ago
0.1.13
1 year ago
0.1.10
1 year ago
0.1.11
1 year ago
0.1.9
1 year ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.4
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago