Skip to main content
Glama
id.test.js787 B
'use strict' const assert = require('node:assert/strict') const { test } = require('node:test') const { mergeSchemas } = require('../index') const { defaultResolver } = require('./utils') test('should skip $id keyword if they are equal', () => { const schema1 = { $id: 'foo', type: 'string' } const schema2 = { $id: 'foo', type: 'string' } const mergedSchema = mergeSchemas([schema1, schema2], { defaultResolver }) assert.deepStrictEqual(mergedSchema, { type: 'string' }) }) test('should skip $id keyword if they are different', () => { const schema1 = { $id: 'foo', type: 'string' } const schema2 = { $id: 'bar', type: 'string' } const mergedSchema = mergeSchemas([schema1, schema2], { defaultResolver }) assert.deepStrictEqual(mergedSchema, { type: 'string' }) })

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/krtw00/search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server