Skip to content

Why doesn't the flagd provider reject JSON that doesn't satisfy the flagd schema? #1809

@man85

Description

@man85

There is the JSON

{
  "$schema": "https://flagd.dev/schema/v0/flags.json",
  "flags": {
    "allowedProvisioningVersions": {
      "state": "ENABLED",
      "defaultVariant": "default",
      "variants": {
        "default1": [
          "1",
          "2"
        ]
      }
    }
  }
}

It fails validation with com.networknt:json-schema-validator:2.0.1 because default1 is an array. However, flagd doesn't reject this configuration. Why is that, and is this expected behavior?

We added some validation before applying the flags to the K8s ConfigMap, and it turned out that some previously used flag configurations failed validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions