Skip to content

Commit

Permalink
Add "$id" property to generated JSON definitions. See usnistgov/metas…
Browse files Browse the repository at this point in the history
…chema#160. Resolves #151. (#175)
  • Loading branch information
david-waltermire authored Jun 26, 2023
1 parent 7f431de commit ed9350d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ default void generateDefinition(@NonNull JsonGenerationState state, @NonNull Obj
// create the definition property
ObjectNode definitionObj = ObjectUtils.notNull(
definitionsObject.putObject(getDefinitionName(state)));
// definitionObj.put("$id", state.getJsonDefinitionRefForDefinition(definition));

// Add identifier, see usnistgov/metaschema#160
definitionObj.put("$id", getDefinitionRef(state));

// generate the definition object contents
generateSchema(state, definitionObj);
Expand Down

0 comments on commit ed9350d

Please sign in to comment.