Skip to content

Commit 52fd4e7

Browse files
Rename elementId to id in AbstractSchema and JSON schema generation
1 parent d85adaf commit 52fd4e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

annot/src/main/java/com/predic8/membrane/annot/generator/JsonSchemaGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static AbstractSchema<?> tagElementId(AbstractSchema<?> schema, ElementI
134134
String id = elementInfo.getId();
135135
if (id == null || id.isBlank()) return schema;
136136

137-
((AbstractSchema) schema).elementId(id);
137+
((AbstractSchema) schema).id(id);
138138
return schema;
139139
}
140140

annot/src/main/java/com/predic8/membrane/annot/generator/kubernetes/model/AbstractSchema.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public abstract class AbstractSchema<T extends AbstractSchema<T>> implements ISc
2525

2626
protected String title;
2727
protected String name;
28-
protected String elementId;
28+
protected String id;
2929
protected String type;
3030
protected String description;
3131
protected List<String> typeList;
@@ -77,8 +77,8 @@ public T name(String name) {
7777
return self();
7878
}
7979

80-
public T elementId(String id) {
81-
this.elementId = id;
80+
public T id(String id) {
81+
this.id = id;
8282
return self();
8383
}
8484

@@ -110,8 +110,8 @@ public ObjectNode json(ObjectNode node) {
110110
node.put("type", type);
111111
}
112112

113-
if (elementId != null && !elementId.isBlank()) {
114-
node.put("x-element-id", elementId);
113+
if (id != null && !id.isBlank()) {
114+
node.put("id", id);
115115
}
116116

117117
return node;

0 commit comments

Comments
 (0)