← Back to Pull requests

CNTRLPLANE-2449: feat: generate OpenAPI schemas from a running oauth-apiserver instance #211

Closed
unknown closed this pull request without merging on Jul 22, 2026 21:24 UTC
View on GitHub
unknown unknown commented on Jul 11, 2026 18:05 UTC
Author

Making the generated files look as close to https://github.com/kubernetes/kubernetes/tree/master/api as possible. The newly added update-openapi-spec.sh mirrors the same pattern from https://github.com/kubernetes/kubernetes/blob/master/hack/update-openapi-spec.sh. The same for verify-openapi-spec.sh.

Only etcd binary is required running. Otherwise oauth-apiserver errors with:

E0711 19:01:56.170934 run.go:72] "command failed" err="error building REST storage: context deadline exceeded"

Currently:

api
├── discovery
│   ├── aggregated_v2.json
│   ├── apis.json
│   ├── apis__oauth.openshift.io.json
│   ├── apis__oauth.openshift.io__v1.json
│   ├── apis__user.openshift.io.json
│   ├── apis__user.openshift.io__v1.json
│   └── v3-discovery.json
├── openapi-spec
│   ├── swagger.json
│   └── v3
│       ├── apis__oauth.openshift.io_openapi.json
│       ├── apis__oauth.openshift.io__v1_openapi.json
│       ├── apis_openapi.json
│       ├── apis__user.openshift.io_openapi.json
│       ├── apis__user.openshift.io__v1_openapi.json
│       └── version_openapi.json

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

Summary by CodeRabbit

New Features
Added regenerated OpenAPI v2/v3 specifications for OAuth and user APIs, including expanded schemas and REST path coverage.
Added Kubernetes/OpenShift API discovery artifacts (v2 and v3) listing API groups, resources, and supported operations.
Documentation
Added api/ README documenting generated schema/discovery contents and how to regenerate/verify them.
Chores
* Updated specification regeneration and verification workflows to include OpenAPI/discovery generation checks, failing when generated outputs are out of date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 234 lines (+175 / -59) across 2 files Reviewer: ingvagabund Review duration: 16039m
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.60) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 234 lines diff across 2 files
0.60
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
57%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.327
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #211"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 58.0% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 60.3% (MEDIUM) · Higher = larger blast radius
60.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 58.0% · Lower = rushed or shallow review
58.0%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 25.3% · Safe to merge
25.3%