Skip to main content
Glama
openapi.test.ts978 B
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import express from 'express'; import request from 'supertest'; import { initApp, shutdownApp } from './app'; import { loadTestConfig } from './config/loader'; const app = express(); describe('OpenAPI', () => { beforeAll(async () => { const config = await loadTestConfig(); await initApp(app, config); }); afterAll(async () => { await shutdownApp(); }); test('Get /openapi.json', async () => { const res = await request(app).get('/openapi.json'); expect(res.status).toBe(200); expect(res.body.openapi).toBeDefined(); expect(res.body.info).toBeDefined(); const patient = res.body.components.schemas.Patient; expect(patient).toBeDefined(); expect(patient.properties.id).toBeDefined(); expect(patient.properties.language).toBeDefined(); expect(patient.properties._language).toBeUndefined(); }); });

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/medplum/medplum'

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