-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement] flagd json schema files should be namespaced under resources #843
Comments
@Kavindu-Dodan I can take a stab at this. Can we finalize on the new namespace locations to use? |
Nice. Regarding the schema, I think
|
Assigned the issue to you @mehtasankets . Let me know if you have further doubts |
Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
@Kavindu-Dodan for review: #850 |
@mehtasankets thanks for the PR. Will include this with the next release :) |
Background
flagd provider utilizes schema files to validate flags when working in in-process mode. Currently, these json schema files are copied when building the binary to
resources
and kept in the root level [1]. And they are namedflags.json
&targeting.json
.Problem
In an application that uses flagd Java provider for feature flagging, there can be conflicting JSON files with similar names to the above schema files in the classpath. This especially concerns the name
flags.json
as many flagd examples useflags.json
as a flag source file.Improvement
Given our underlying library (seems to) support namespaced locations [2], we should improve our schema locations with an appropriate namespace to avoid classpath conflicts.
AC
Provider works & validates flags correctly with the namespaced schemas in the classpath.
[1] - https://github.com/open-feature/java-sdk-contrib/blob/dev.openfeature.contrib.providers.flagd-v0.8.3/providers/flagd/pom.xml#L236-L258
[2] - https://github.com/networknt/json-schema-validator/blob/master/doc/schema-retrieval.md#configuring-mappings
The text was updated successfully, but these errors were encountered: