Skip to content

Commit be40598

Browse files
committed
PMM-15360: Regenerate the server/v1 swagger and JSON client for om_enabled
make gen does more than buf generate -- it also regenerates the swagger/OpenAPI JSON (api/server/v1/json/v1.json, the merged api/swagger/swagger*.json) and the generated JSON API client (api/server/v1/json/client/server_service/*.go) from the same proto. The earlier commit only ran buf generate directly and hand-curated its output against unrelated toolchain drift elsewhere in api/, which missed these -- they're make gen's job, not buf generate's. Also picks up the same protoc-gen-go import-grouping drift on server.pb.go/server.pb.validate.go that affects unrelated proto packages across the tree; taking make gen's own output here (rather my earlier hand-curated one) is what actually matches what CI's own gen step produces, so this and CI won't disagree again. The generated client's field names are OmEnabled/EnableOm here, matching this branch's own api/Makefile: --additional-initialism=om was added to the swagger client generator's flag list by PMM-15326-om-api, but that commit hasn't reached this branch's base (PMM-15299-open-manager) yet, so "om" isn't a registered initialism here and go-swagger capitalizes it as an ordinary word. Branches that already have that flag (PMM-15326-om-backend and its descendants) will correctly want OMEnabled/EnableOM instead -- each PR's generated code has to match its own base's Makefile, not a single "right" answer across the stack. Found because CI's "make gen; git diff --exit-code" check failed on this exact mismatch, on all three of this ticket's PRs. Signed-off-by: Pawel Lebioda <pawel.lebioda@percona.com>
1 parent e96b32d commit be40598

8 files changed

Lines changed: 158 additions & 58 deletions

File tree

api/server/v1/json/client/server_service/change_settings_responses.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/server/v1/json/client/server_service/get_read_only_settings_responses.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/server/v1/json/client/server_service/get_settings_responses.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/server/v1/json/v1.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@
311311
"description": "True if Query Analytics for PMM's internal PG database is enabled.",
312312
"type": "boolean",
313313
"x-order": 17
314+
},
315+
"om_enabled": {
316+
"description": "True if OpenManager is enabled.",
317+
"type": "boolean",
318+
"x-order": 18
314319
}
315320
},
316321
"x-order": 0
@@ -488,6 +493,12 @@
488493
"type": "boolean",
489494
"x-nullable": true,
490495
"x-order": 13
496+
},
497+
"enable_om": {
498+
"description": "Enable OpenManager.",
499+
"type": "boolean",
500+
"x-nullable": true,
501+
"x-order": 14
491502
}
492503
}
493504
}
@@ -629,6 +640,11 @@
629640
"description": "True if Query Analytics for PMM's internal PG database is enabled.",
630641
"type": "boolean",
631642
"x-order": 17
643+
},
644+
"om_enabled": {
645+
"description": "True if OpenManager is enabled.",
646+
"type": "boolean",
647+
"x-order": 18
632648
}
633649
},
634650
"x-order": 0
@@ -729,6 +745,11 @@
729745
"description": "True if Access Control is enabled.",
730746
"type": "boolean",
731747
"x-order": 7
748+
},
749+
"om_enabled": {
750+
"description": "True if OpenManager is enabled.",
751+
"type": "boolean",
752+
"x-order": 8
732753
}
733754
},
734755
"x-order": 0

api/server/v1/server.pb.go

Lines changed: 39 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)