adorn-api 1.1.9 → 1.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adorn-api",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
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",
@@ -21,7 +21,7 @@ export async function createExpressApp(options: ExpressAdapterOptions): Promise<
21
21
  attachCors(app, options.cors === true ? {} : options.cors);
22
22
  }
23
23
  if (options.jsonBody ?? true) {
24
- app.use(express.json());
24
+ app.use(express.json({ limit: options.jsonLimit }));
25
25
  }
26
26
  const inputCoercion = options.inputCoercion ?? "safe";
27
27
  await attachControllers(app, options.controllers, inputCoercion, options.multipart, options.validation);
@@ -145,6 +145,8 @@ export interface ExpressAdapterOptions {
145
145
  controllers: Constructor[];
146
146
  /** Whether to enable JSON body parsing */
147
147
  jsonBody?: boolean;
148
+ /** Max JSON body size (e.g. "50mb"). Defaults to Express's "100kb". */
149
+ jsonLimit?: string;
148
150
  /** OpenAPI configuration */
149
151
  openApi?: OpenApiExpressOptions;
150
152
  /** Input coercion setting */