Skip to content

Commit

Permalink
feat: use namespaced schemas for flagd json schemas (#843)
Browse files Browse the repository at this point in the history
Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
  • Loading branch information
mehtasankets committed Jun 28, 2024
1 parent de8f3d9 commit 935cb60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions providers/flagd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@
<goal>exec</goal>
</goals>
<configuration>
<!-- run: cp schemas/json/flags.json src/main/resources/ -->
<!-- run: cp schemas/json/flags.json src/main/resources/flagd/schemas/ -->
<executable>cp</executable>
<arguments>
<argument>schemas/json/flags.json</argument>
<argument>src/main/resources/</argument>
<argument>src/main/resources/flagd/schemas/</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -249,11 +249,11 @@
<goal>exec</goal>
</goals>
<configuration>
<!-- run: cp schemas/json/targeting.json src/main/resources/ -->
<!-- run: cp schemas/json/targeting.json src/main/resources/flagd/schemas/ -->
<executable>cp</executable>
<arguments>
<argument>schemas/json/targeting.json</argument>
<argument>src/main/resources/</argument>
<argument>src/main/resources/flagd/schemas/</argument>
</arguments>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ private FlagParser() {
// load both schemas from resources (root (flags.json) and referenced (targeting.json)
// we don't want to resolve anything from the network
Map<String, String> mappings = new HashMap<>();
mappings.put("https://flagd.dev/schema/v0/targeting.json", "classpath:targeting.json");
mappings.put("https://flagd.dev/schema/v0/flags.json", "classpath:flags.json");
mappings.put("https://flagd.dev/schema/v0/targeting.json", "classpath:flagd/schemas/targeting.json");
mappings.put("https://flagd.dev/schema/v0/flags.json", "classpath:flagd/schemas/flags.json");

SCHEMA_VALIDATOR = JsonSchemaFactory
.getInstance(SpecVersion.VersionFlag.V7,
Expand Down
1 change: 0 additions & 1 deletion providers/flagd/src/main/resources/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json

0 comments on commit 935cb60

Please sign in to comment.