Fastify
Since Kita uses Fastify under the hood, the type of the instance can be accessed directly via FastifyInstance
.
WARNING
Direct interactions with this type are not recommended, as Kita may not be able to infer any type of interaction with the instance directly.
Use only in places where Kita does not provide native support.
ts
import type { FastifyInstance } from 'fastify';
export function get(instance: FastifyInstance) {
console.log(`Using Fastify version ${instance.version}!`);
return true;
}
1
json
{
"paths": {
"/": {
"get": {
"operationId": "getIndex",
"responses": {
"2XX": {
"description": "Default Response",
"content": {
"application/json": { "schema": { "type": "boolean" } }
}
}
}
}
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17