@haddowg/json-api-mcp 1.5.0 → 1.6.0
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/dist/cli.mjs +1 -1
- package/dist/{generate-CRFMFxP7.mjs → generate-BhdKZFqD.mjs} +4 -4
- package/dist/{generate-CRFMFxP7.mjs.map → generate-BhdKZFqD.mjs.map} +1 -1
- package/dist/generate.mjs +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -1463,9 +1463,9 @@ function buildEntry(op, parsed, inputCtx, outputCtx, descriptor) {
|
|
|
1463
1463
|
*/
|
|
1464
1464
|
function assertContract(doc) {
|
|
1465
1465
|
const contract = doc.info?.["x-generator"]?.contract;
|
|
1466
|
-
if (typeof contract !== "number") throw new Error(`The OpenAPI document declares no generator contract (info.x-generator.contract). @haddowg/json-api-mcp reads contracts 13 to
|
|
1467
|
-
if (contract < 13) throw new Error(`The OpenAPI document declares generator contract ${contract}, older than this package reads (13 to
|
|
1468
|
-
if (contract >
|
|
1466
|
+
if (typeof contract !== "number") throw new Error(`The OpenAPI document declares no generator contract (info.x-generator.contract). @haddowg/json-api-mcp reads contracts 13 to 21; regenerate the document from a newer haddowg/json-api server.`);
|
|
1467
|
+
if (contract < 13) throw new Error(`The OpenAPI document declares generator contract ${contract}, older than this package reads (13 to 21). Regenerate it from a newer haddowg/json-api server.`);
|
|
1468
|
+
if (contract > 21) throw new Error(`The OpenAPI document declares generator contract ${contract}, newer than this package reads (13 to 21). Upgrade @haddowg/json-api-mcp.`);
|
|
1469
1469
|
return contract;
|
|
1470
1470
|
}
|
|
1471
1471
|
//#endregion
|
|
@@ -1612,4 +1612,4 @@ async function writeMcpModel(options) {
|
|
|
1612
1612
|
//#endregion
|
|
1613
1613
|
export { buildMcpModel as i, serialiseMcpModel as n, writeMcpModel as r, generateMcpModel as t };
|
|
1614
1614
|
|
|
1615
|
-
//# sourceMappingURL=generate-
|
|
1615
|
+
//# sourceMappingURL=generate-BhdKZFqD.mjs.map
|