From 2be143a64e360fe1f3f54a6660257a8dfe1c541a Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Thu, 15 Jun 2023 09:14:17 +0200 Subject: [PATCH] docs: mark 'yes' and `no` as required, add more details to variants (#3984) This change adds a little more detail to the client metrics schema. The description for variants felt a little unclear. --------- Co-authored-by: Christopher Kolstad --- src/lib/openapi/spec/client-metrics-schema.ts | 2 +- src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/openapi/spec/client-metrics-schema.ts b/src/lib/openapi/spec/client-metrics-schema.ts index c6d12dcb97..b8ab297bd6 100644 --- a/src/lib/openapi/spec/client-metrics-schema.ts +++ b/src/lib/openapi/spec/client-metrics-schema.ts @@ -81,7 +81,7 @@ export const clientMetricsSchema = { }, variants: { description: - 'How many times each variant was returned', + 'An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. `{ [variantName]: number }`).', type: 'object', additionalProperties: { type: 'integer', diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index 6f6f2f231e..99f6de426b 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -1540,7 +1540,7 @@ The provider you choose for your addon dictates what properties the \`parameters "minimum": 0, "type": "integer", }, - "description": "How many times each variant was returned", + "description": "An object describing how many times each variant was returned. Variant names are used as properties, and the number of times they were exposed is the corresponding value (i.e. \`{ [variantName]: number }\`).", "example": { "variantA": 15, "variantB": 25,