@vercube/schema 0.0.20 → 0.0.21

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.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { z, z as z$1 } from "zod";
1
+ import { z } from "zod";
2
2
  import { RouteConfig } from "@asteasolutions/zod-to-openapi";
3
3
  import { App, BasePlugin } from "@vercube/core";
4
4
 
@@ -54,10 +54,4 @@ declare class SchemaPlugin<T = unknown> extends BasePlugin<T> {
54
54
  use(app: App, options: T): void | Promise<void>;
55
55
  }
56
56
  //#endregion
57
- //#region src/Schemas/BaseHttpErrorSchema.d.ts
58
- declare const BaseHttpErrorSchema: z$1.ZodType;
59
- //#endregion
60
- //#region src/Schemas/ValidationErrorSchema.d.ts
61
- declare const ValidationErrorSchema: z$1.ZodType;
62
- //#endregion
63
- export { BaseHttpErrorSchema, Schema, SchemaPlugin, ValidationErrorSchema, z };
57
+ export { Schema, SchemaPlugin, z };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "node:module";
2
- import { z, z as z$1 } from "zod";
2
+ import { z } from "zod";
3
3
  import { OpenAPIRegistry, OpenApiGeneratorV3, extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
4
4
  import { BaseDecorator, Inject, createDecorator } from "@vercube/di";
5
5
  import defu from "defu";
@@ -111,7 +111,7 @@ var require_decorate = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runti
111
111
 
112
112
  //#endregion
113
113
  //#region src/Decorators/Schema.ts
114
- var import_decorate$1 = __toESM(require_decorate());
114
+ var import_decorate$1 = __toESM(require_decorate(), 1);
115
115
  /**
116
116
  * A decorator class for handling OpenAPI schema registration for routes.
117
117
  *
@@ -211,24 +211,9 @@ var SchemaPlugin = class extends BasePlugin {
211
211
  }
212
212
  };
213
213
 
214
- //#endregion
215
- //#region src/Schemas/BaseHttpErrorSchema.ts
216
- const BaseHttpErrorSchema = z$1.object({
217
- status: z$1.number().openapi({ description: "The HTTP status code of the error" }),
218
- name: z$1.string().optional().openapi({ description: "The name of the error" }),
219
- message: z$1.string().openapi({ description: "The message of the error" })
220
- }).openapi("HttpError");
221
-
222
- //#endregion
223
- //#region src/Schemas/ValidationErrorSchema.ts
224
- const ValidationErrorSchema = z$1.object({
225
- ...BaseHttpErrorSchema,
226
- errors: z$1.array(z$1.any()).optional().openapi({ description: "The errors of the validation" })
227
- }).openapi("ValidationError");
228
-
229
214
  //#endregion
230
215
  //#region src/index.ts
231
216
  extendZodWithOpenApi(z);
232
217
 
233
218
  //#endregion
234
- export { BaseHttpErrorSchema, Schema, SchemaPlugin, ValidationErrorSchema, z };
219
+ export { Schema, SchemaPlugin, z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercube/schema",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Schema (swagger) module for Vercube framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,8 +31,8 @@
31
31
  "@standard-schema/spec": "1.0.0",
32
32
  "defu": "6.1.4",
33
33
  "zod": "4.0.10",
34
- "@vercube/core": "0.0.20",
35
- "@vercube/di": "0.0.20"
34
+ "@vercube/core": "0.0.21",
35
+ "@vercube/di": "0.0.21"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"