Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Output mock as string

Tomas Valentafd7f63e904c8
diff --git a/api-service/playground/src/data/mockController.ts b/api-service/playground/src/data/mockController.ts
index 2aacc3315..b923b9dd5 100644
--- a/api-service/playground/src/data/mockController.ts
+++ b/api-service/playground/src/data/mockController.ts
@@ -12,7 +12,7 @@ interface File {
}
interface MockDataResponse {
- bodyData: string | Record<string | number, {}>
+ bodyData: string
}
@Route('mock')
@@ -25,12 +25,12 @@ export class MockController extends Controller {
const data = mock({
files: files.map(f => [f.name, f.content]),
- output: 'json',
+ output: 'string',
interfaces: [targetInterface],
})
return {
- bodyData: data,
+ bodyData: data as string,
}
}
}
diff --git a/api-service/playground/src/generated/routes.ts b/api-service/playground/src/generated/routes.ts
index b0027eecf..09258894c 100644
--- a/api-service/playground/src/generated/routes.ts
+++ b/api-service/playground/src/generated/routes.ts
@@ -15,15 +15,10 @@ import type { RequestHandler, Router } from 'express';
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
const models: TsoaRoute.Models = {
- "Record_string-or-number.___": {
- "dataType": "refAlias",
- "type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"validators":{}},
- },
- // WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
"MockDataResponse": {
"dataType": "refObject",
"properties": {
- "bodyData": {"dataType":"union","subSchemas":[{"dataType":"string"},{"ref":"Record_string-or-number.___"}],"required":true},
+ "bodyData": {"dataType":"string","required":true},
},
"additionalProperties": false,
},
diff --git a/api-service/playground/swagger.json b/api-service/playground/swagger.json
index 717f42eaa..a5cd40a21 100644
--- a/api-service/playground/swagger.json
+++ b/api-service/playground/swagger.json
@@ -6,22 +6,10 @@
"requestBodies": {},
"responses": {},
"schemas": {
- "Record_string-or-number.___": {
- "properties": {},
- "type": "object",
- "description": "Construct a type with a set of properties K of type T"
- },
"MockDataResponse": {
"properties": {
"bodyData": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "$ref": "#/components/schemas/Record_string-or-number.___"
- }
- ]
+ "type": "string"
}
},
"required": [