Skip to content

Enhance get-feature-flag-request.v1.schema#178

Merged
kistll merged 4 commits into
masterfrom
feature/enhance-schema
Mar 3, 2026
Merged

Enhance get-feature-flag-request.v1.schema#178
kistll merged 4 commits into
masterfrom
feature/enhance-schema

Conversation

@kistll
Copy link
Copy Markdown
Contributor

@kistll kistll commented Mar 3, 2026

Additional changes:

  • Fix outlets-request-dynamic-context-response.v1.schema.ts schema
  • Add unit test to make sure that all schemas are valid
  • Enhance model OutletsRequestContextResponse and OutletsRequestDynamicContextResponse by defining property plugin(s) better
  • Update typescript version to avoid warnings during execution of unit tests

Additional changes:

  - Fix outlets-request-dynamic-context-response.v1.schema.ts schema

  - Add unit test to make sure that all schemas are valid

  - Enhance model OutletsRequestContextResponse and OutletsRequestDynamicContextResponse by defining property plugin(s) better

  - Update typescript version to avoid warnings during execution of unit tests
@kistll kistll requested a review from zaheral March 3, 2026 08:43
},
required: ['key', 'defaultValue'],
anyOf: [
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe using it here { $ref: '#/$defs/payload' }, instead of duplicating the definition?

Comment thread src/validation/schemas/schemas.spec.ts Outdated
console.log(JSON.stringify(validationFunction.errors, null, 2));
}

expect(isValid).toBeTrue();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to use expect(isValid, "Some message").toBeTrue(); to know exactly which test failed and for what schema. Otherwise we only see "Expected false to be true"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also maybe what properties don't respect the schema

  - Remove duplicate definition inside schema getFeatureFlagRequest_v1_schema

  - Add schema name to error if schema validation test fails
@kistll kistll merged commit 3f5d813 into master Mar 3, 2026
5 of 7 checks passed
@kistll kistll deleted the feature/enhance-schema branch March 3, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants