@nestjs/platform-fastify 10.4.19 → 10.4.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FastifySchema } from 'fastify';
|
|
2
|
+
/**
|
|
3
|
+
* @publicApi
|
|
4
|
+
* Allows setting the schema for the route. Schema is an object that can contain the following properties:
|
|
5
|
+
* - body: JsonSchema
|
|
6
|
+
* - querystring or query: JsonSchema
|
|
7
|
+
* - params: JsonSchema
|
|
8
|
+
* - response: Record<HttpStatusCode, JsonSchema>
|
|
9
|
+
* @param schema See {@link https://fastify.dev/docs/latest/Reference/Routes/#routes-options}
|
|
10
|
+
*/
|
|
11
|
+
export declare const RouteSchema: (schema: FastifySchema) => import("@nestjs/common").CustomDecorator<string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RouteSchema = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
/**
|
|
7
|
+
* @publicApi
|
|
8
|
+
* Allows setting the schema for the route. Schema is an object that can contain the following properties:
|
|
9
|
+
* - body: JsonSchema
|
|
10
|
+
* - querystring or query: JsonSchema
|
|
11
|
+
* - params: JsonSchema
|
|
12
|
+
* - response: Record<HttpStatusCode, JsonSchema>
|
|
13
|
+
* @param schema See {@link https://fastify.dev/docs/latest/Reference/Routes/#routes-options}
|
|
14
|
+
*/
|
|
15
|
+
const RouteSchema = (schema) => (0, common_1.SetMetadata)(constants_1.FASTIFY_ROUTE_SCHEMA_METADATA, schema);
|
|
16
|
+
exports.RouteSchema = RouteSchema;
|