Skip to content

Commit

Permalink
Use underscore in auto-generated schema IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
javagl committed May 12, 2024
1 parent 14e6dbf commit 646f04b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion specs/tools/migration/TileFormatsMigrationSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe("TileFormatsMigration", function () {
//SpecHelpers.forceDeleteDirectory(outputDir);
});
beforeEach(function () {
StructuralMetadataMerger.setMergedSchemaIdSuffix("SPEC-SCHEMA-ID-SUFFIX");
StructuralMetadataMerger.setMergedSchemaIdSuffix("SPEC_SCHEMA_ID_SUFFIX");
});

//==========================================================================
Expand Down
3 changes: 2 additions & 1 deletion src/tools/gltfExtensionsUtils/StructuralMetadataMerger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ export class StructuralMetadataMerger {
if (schemaIdSuffix === undefined) {
schemaIdSuffix = crypto.randomUUID();
}
const newId = "SCHEMA-ID-" + schemaIdSuffix;
schemaIdSuffix = schemaIdSuffix.replace(/-/g, "_");
const newId = "SCHEMA_ID_" + schemaIdSuffix;
log("Target schema was modified - assigning ID " + newId);
targetSchema.setId(newId);
}
Expand Down

0 comments on commit 646f04b

Please sign in to comment.