Skip to content

Commit e3c8012

Browse files
committed
fix(crystal): object_id is so central in Crystal that it should not be overridden by user code
See: https://crystal-lang.org/api/1.18.2/Reference.html#object_id%3AUInt64-instance-method
1 parent 51b7581 commit e3c8012

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public CrystalClientCodegen() {
135135

136136
// reserved word. Ref:
137137
// https://github.com/crystal-lang/crystal/wiki/Crystal-for-Rubyists#available-keywords
138+
// https://crystal-lang.org/api/1.18.2/Reference.html
138139
reservedWords = new HashSet<>(
139140
Arrays.asList(
140141
"abstract", "annotation", "do", "if", "nil?", "select", "union",
@@ -146,7 +147,7 @@ public CrystalClientCodegen() {
146147
"break", "extend", "macro", "require", "true", "with",
147148
"case", "false", "module", "rescue", "type", "yield",
148149
"class", "for", "next", "responds_to?", "typeof",
149-
"def", "fun", "nil", "return", "uninitialized"));
150+
"def", "fun", "nil", "return", "uninitialized", "object_id"));
150151

151152
languageSpecificPrimitives.clear();
152153
languageSpecificPrimitives.add("String");

0 commit comments

Comments
 (0)