UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

38 lines 1.11 kB
import { createResponseSchema, createResponseSchemas, schemaNamed, schemaTyped, } from './create-response-schema.js'; test('createResponseSchema', () => { expect(createResponseSchema('schemaName')).toMatchInlineSnapshot(` { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/schemaName", }, }, }, "description": "schemaName", } `); }); test('createResponseSchemaWithDifferentMedia', () => { expect(createResponseSchemas('my-schema', { 'application/json': schemaNamed('schemaName'), 'text/css': schemaTyped('string'), })).toMatchInlineSnapshot(` { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/schemaName", }, }, "text/css": { "schema": { "type": "string", }, }, }, "description": "my-schema", } `); }); //# sourceMappingURL=create-response-schema.test.js.map