MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ordersOpenApiSpec

Function ordersOpenApiSpec

e2e/scenarios/tool-descriptions.test.ts:42–165  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

40// ---------------------------------------------------------------------------
41
42const ordersOpenApiSpec = (baseUrl: string): string =>
43 JSON.stringify({
44 openapi: "3.0.3",
45 info: {
46 title: "Orders API",
47 version: "1.0.0",
48 description: "A fixture API exercising every OpenAPI description channel.",
49 },
50 servers: [{ url: baseUrl }],
51 paths: {
52 "/orders/{orderId}": {
53 get: {
54 operationId: "getOrder",
55 summary: "Fetch a single order",
56 description:
57 "Fetch one order by id, including line items and the current fulfillment status.",
58 parameters: [
59 {
60 name: "orderId",
61 in: "path",
62 required: true,
63 description: "Unique order identifier (ULID).",
64 schema: { type: "string" },
65 },
66 {
67 name: "include",
68 in: "query",
69 description: "Related records to embed in the response.",
70 schema: { type: "string", enum: ["items", "customer", "shipments"] },
71 },
72 ],
73 responses: {
74 "200": {
75 description: "The order, with any requested embeds.",
76 content: {
77 "application/json": {
78 schema: {
79 type: "object",
80 properties: {
81 id: { type: "string", description: "Unique order identifier (ULID)." },
82 status: {
83 type: "string",
84 description: "Current fulfillment status.",
85 enum: ["pending", "shipped", "delivered"],
86 },
87 total: {
88 type: "number",
89 description: "Order total in minor currency units (cents).",
90 },
91 },
92 },
93 },
94 },
95 },
96 },
97 },
98 },
99 "/orders/{orderId}/invoice": {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected