Skip to Content
Public RESTful API 🚧

Framework for public REST API

Coming soon.

OpenAPI

src/modules/user/UserController.ts
import { get, post, prefix } from 'vovk'; import { openapi } from 'vovk-openapi'; @prefix('users') export default class UserController { @openapi({ summary: 'Get user', description: 'Get user by id', }) @get() static getUser() { // ... } }

When handler is using any of the validation libraries, the schema for body, query, params and output is generated automatically. You can also use @openapi decorator to provide custom schema for the request and response.

src/modules/user/UserController.ts
import { get, post, prefix } from 'vovk'; import { openapi } from 'vovk-openapi'; import { z } from 'zod'; import { withZod } from 'vovk-zod'; @prefix('users') // TODO example with descriptions

At this case you’re going to get TODO

TODO openapi.error

Last updated on