From a6f530afb56d942597ebba40f4a02b427f231bd4 Mon Sep 17 00:00:00 2001 From: Ansh Chaturvedi Date: Mon, 3 Jun 2024 15:58:05 -0400 Subject: [PATCH] test: fix `openapi.test.ts` to properly test `@example` tag behaviour --- packages/openapi-generator/test/openapi.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/openapi-generator/test/openapi.test.ts b/packages/openapi-generator/test/openapi.test.ts index 88d18eb8..61ac929c 100644 --- a/packages/openapi-generator/test/openapi.test.ts +++ b/packages/openapi-generator/test/openapi.test.ts @@ -2054,7 +2054,7 @@ export const route = h.httpRoute({ query: { /** * This is a bar param. - * @example { "foo": "bar" } + * @example "{ 'foo': 'bar' }" */ bar: t.record(t.string, t.string), }, @@ -2103,6 +2103,7 @@ testCase('route with descriptions, patterns, and examples', ROUTE_WITH_DESCRIPTI required: true, schema: { type: 'object', + example: "{ 'foo': 'bar' }", additionalProperties: { type: 'string' }