Skip to content

Commit fcce37a

Browse files
committed
fixes
1 parent f5630fc commit fcce37a

File tree

14 files changed

+159
-838
lines changed

14 files changed

+159
-838
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
22
dist
33
node_modules
4-
docs
4+
docs
5+
node_modules

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const tadata = new TadataNodeSDK({
2727
logger: pino(), // Optional: use custom logger
2828
});
2929

30-
// Create an OpenAPI source from various formats
31-
const source = await OpenApiSource.fromFile('./acme-openapi.yaml');
30+
// Create an OpenAPI source from JSON file
31+
const source = await OpenApiSource.fromFile('./acme-openapi.json');
3232

3333
// Deploy the MCP server
3434
const deployment = await tadata.mcp.deploy({
@@ -45,27 +45,18 @@ console.log(`Deployed MCP server: ${deployment.url}`);
4545
The SDK supports multiple ways to provide your OpenAPI specification:
4646

4747
```typescript
48-
// From a file (YAML or JSON)
49-
const source = await OpenApiSource.fromFile('./openapi.yaml');
48+
// From a JSON file
49+
const source = await OpenApiSource.fromFile('./openapi.json');
5050

5151
// From a JSON string
5252
const source = OpenApiSource.fromJson(jsonString);
5353

54-
// From a YAML string
55-
const source = OpenApiSource.fromYaml(yamlString);
56-
5754
// From a JavaScript object
5855
const source = OpenApiSource.fromObject({
5956
openapi: '3.0.0',
6057
info: { title: 'Example API', version: '1.0.0' },
6158
paths: { /* ... */ }
6259
});
63-
64-
// From an Express application
65-
const source = OpenApiSource.fromExpress(app);
66-
67-
// From a Fastify instance
68-
const source = OpenApiSource.fromFastify(fastifyApp);
6960
```
7061

7162
## Error Handling

package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,16 @@
4747
"@apidevtools/swagger-parser": "^10.1.0",
4848
"@ts-rest/core": "^3.30.5",
4949
"axios": "^1.6.2",
50-
"swagger-jsdoc": "^6.2.8",
51-
"yaml": "^2.3.4",
5250
"zod": "^3.22.4"
5351
},
54-
"peerDependencies": {
55-
"express": "^4.18.2",
56-
"fastify": "^4.24.3"
57-
},
5852
"devDependencies": {
5953
"@types/jest": "^29.5.5",
6054
"@types/node": "^20.10.0",
61-
"@types/swagger-jsdoc": "^6.0.4",
6255
"@typescript-eslint/eslint-plugin": "^5.62.0",
6356
"@typescript-eslint/parser": "^5.62.0",
6457
"eslint": "^8.56.0",
6558
"eslint-config-prettier": "^10.1.5",
6659
"eslint-plugin-prettier": "^5.0.0",
67-
"express": "^4.18.2",
68-
"fastify": "^4.24.3",
6960
"jest": "^29.7.0",
7061
"nock": "^13.3.0",
7162
"prettier": "^3.1.0",

0 commit comments

Comments
 (0)