chore(milpacs): deprecate GetUserViaKeycloakId rpc + keycloak_id fields (#97)#104
Merged
Conversation
…ds (#97) Phase 1 of 2 — adds deprecation surface only, no behavior change. - `option deprecated = true;` on the RPC; `deprecated: true` in the openapiv2_operation so swagger UI flags the endpoint. - `[deprecated = true]` on `keycloak_id` in `KeycloakIdRequest`, `Profile`, `LiteProfile`. Propagates to .pb.go getters as `// Deprecated:` comments. - Enable protoc-gen-openapiv2 `enable_field_deprecation=true` so the `keycloakId` path parameter renders deprecated in swagger. - Pin the contract: descriptor-level deprecation test in proto/, swagger surface test in openapi/. Existing TestGetUserViaKeycloakId_* unchanged. Schema-property `deprecated` is OpenAPI 3.0 only — Swagger 2.0 has no slot for it, so the doc-side signal lives on the op + path param. Removal is tracked in #100.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #97. Phase 1/2. Deprecation only. No behavior change. Removal = #100.
Diff
option deprecated = true;onGetUserViaKeycloakIdrpc +deprecated: truein openapiv2_operation -> swagger UI struck-through.[deprecated = true]onkeycloak_idinKeycloakIdRequest,Profile,LiteProfile-> propagates to.pb.gogetters as// Deprecated:comments. Go consumers get IDE/lint warnings.enable_field_deprecation=trueinbuf.gen.yaml->keycloakIdpath param rendersdeprecated: truein swagger.Tests added
proto/deprecation_test.go— descriptor contract via protoreflect. Pins rpc + 3 field deprecation flags. Survives codegen churn.openapi/openapi_test.go— pins swagger op + path-param deprecated markers.TestGetUserViaKeycloakId_*unchanged + still pass.AC deviation
"deprecated": trueonProfile.keycloak_id/LiteProfile.keycloak_idschema props in swagger.json. Not possible under Swagger 2.0 —deprecatedon schema props is OpenAPI 3.0 only.protoc-gen-openapiv2'sopenapiSchemaObjectGo type has no field for it.// Deprecated:getter comments.keycloakIdfromGetProfileresponse. Narrow given cavbot2 cutover (fix(milpacs): route errors to NotFound vs Internal #83) already done + Add request analytics — endpoint volume, latency, error rates, top consumers #92 traffic-gating before Phase 2.CI gate local
make generatedeterministic (re-run = no diff)go mod tidycleango build ./...cleanmake lint(buf lint + buf breaking vs develop) cleango test ./...all pass🤖 Generated with Claude Code