adorn-api 1.1.10 → 1.1.11

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.
@@ -43,7 +43,7 @@ async function createExpressApp(options) {
43
43
  (0, cors_1.attachCors)(app, options.cors === true ? {} : options.cors);
44
44
  }
45
45
  if (options.jsonBody ?? true) {
46
- app.use(express_1.default.json());
46
+ app.use(express_1.default.json({ limit: options.jsonLimit }));
47
47
  }
48
48
  const inputCoercion = options.inputCoercion ?? "safe";
49
49
  await (0, controllers_1.attachControllers)(app, options.controllers, inputCoercion, options.multipart, options.validation);
@@ -129,6 +129,8 @@ export interface ExpressAdapterOptions {
129
129
  controllers: Constructor[];
130
130
  /** Whether to enable JSON body parsing */
131
131
  jsonBody?: boolean;
132
+ /** Max JSON body size (e.g. "50mb"). Defaults to Express's "100kb". */
133
+ jsonLimit?: string;
132
134
  /** OpenAPI configuration */
133
135
  openApi?: OpenApiExpressOptions;
134
136
  /** Input coercion setting */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adorn-api",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Decorator-first web framework with OpenAPI 3.1 schema generation.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",