File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ generate() {
142142 exit 1
143143 }
144144
145+ # Detect duplicate operationIds (ThingsBoard's spec generator appends _1, _2, etc.)
146+ local duplicates
147+ duplicates=$( grep -o ' "operationId" *: *"[^"]*"' " $spec_file " | sed ' s/.*: *"//;s/"//' | grep -E ' _[0-9]+$' || true)
148+ if [ -n " $duplicates " ]; then
149+ echo " Error: spec contains duplicate operationIds (suffixed by ThingsBoard):"
150+ echo " $duplicates " | sed ' s/^/ /'
151+ echo " Fix the @ApiOperation annotations in ThingsBoard source to use unique names."
152+ exit 1
153+ fi
154+
145155 # Run 1 — Java client (single class, no docs)
146156 echo " Generating client for edition: $edition from $spec_file "
147157 openapi-generator-cli generate \
You can’t perform that action at this time.
0 commit comments