import "@typespec/http"; using TypeSpec.Http; model User { id: string; name: string; birthday?: utcDateTime; address: Address; } model Address { street: string; city: string; state: string; zip: string; } @route("/users") interface Users { list(@query limit: int32, @query skip: int32): User[]; create(@body user: User): User; get(@path id: string): User; } openapi: 3.0.0 info: title: (title) versio
![TypeScript のような構文で OpenAPI のスキーマを定義する TypeSpec](https://cdn-ak-scissors.b.st-hatena.com/image/square/0a6bbb0748e866581c08f498de9f27a4b4315f21/height=288;version=1;width=512/https%3A%2F%2Fazukiazusa.dev%2Fblog%2Fogp%2Ftypescript-like-syntax-for-openapi-schemas.png)