docs: updated acs url for console - #2696
Conversation
📝 WalkthroughWalkthroughThe OpenAPI document updates SSO connection schemas, explicitly documents the SSO update response, adds rate-limit bucket metadata across API operations, updates examples, and changes the document version. ChangesAPI contract updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/polis/reference/api.json`:
- Around line 438-439: Add the x-ory-ratelimit-bucket extension to the SSO
setup-link operation definitions for POST, DELETE, and GET
/api/v1/sso/setuplinks and GET /api/v1/sso/setuplinks/product. Assign the
appropriate polis-public-medium or polis-public-high value consistent with the
documented rate-limit classification so all four operations appear in the
generated rate-limit table.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a8c91e77-74a1-417a-bdf0-3e8cd6c3d2a0
⛔ Files ignored due to path filters (1)
docs/kratos/organizations/organizations.mdxis excluded by!**/*.mdx
📒 Files selected for processing (1)
docs/polis/reference/api.json
| }, | ||
| "x-ory-ratelimit-bucket": "polis-public-high" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate api.json =="
fd -a 'api\.json$' . | sed 's#^\./##'
echo "== excerpts around docs/polis/reference/api.json lines 400-480 =="
sed -n '400,480p' docs/polis/reference/api.json | nl -ba -v400
echo "== search setuplinks =="
rg -n '/api/v1/sso/setuplinks|x-ory-ratelimit-bucket|rate-limit endpoint table|setuplinks' docs/polis/reference/api.json docs || true
echo "== relevant operations count/buckets =="
python3 - <<'PY'
import json
from pathlib import Path
p=Path('docs/polis/reference/api.json')
data=json.loads(p.read_text())
paths=data.get('paths',{})
for path,ops in paths.items():
if '/api/v1/sso/setuplinks' in path:
print(f'PATH {path}')
for method,e in ops.items():
print(f' {method} bucket={e.get("x-ory-ratelimit-bucket")!r}')
print('directory sync setuplinks:')
for path,ops in paths.items():
if '/api/v1/sso/dirsync' in path or 'dirsync' in path.lower() or 'setuplinks' in path:
pass
PYRepository: ory/docs
Length of output: 1405
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='docs/polis/reference/api.json'
echo "== lines 400-490 =="
sed -n '400,490p' "$file" | cat -n | sed 's#^\s*##'
echo "== setuplinks occurrences =="
grep -nE '/api/v1/sso/setuplinks|x-ory-ratelimit-bucket|rate-limit|rate limit|rate-limit endpoint' "$file" || true
echo "== summary of /api/v1/sso/setuplinks operations and buckets =="
python3 - <<'PY'
import json
from pathlib import Path
p=Path('docs/polis/reference/api.json')
data=json.loads(p.read_text())
for path in sorted(data.get('paths', {}).keys()):
if '/api/v1/sso/setuplinks' in path:
print('PATH', path)
for method, op in data['paths'][path].items():
bucket = op.get('x-ory-ratelimit-bucket')
print(f' {method} bucket={bucket!r}')
PYRepository: ory/docs
Length of output: 5462
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== policy/reference rate-limit bucket and table references =="
rg -n "x-ory-ratelimit-bucket|rate-limit.*endpoint|rate.*limit.*endpoint|generated.*rate|rate-limit" docs src .github workflows -g '!*.map' || true
echo "== local scripts containing generate/rate/convert terms =="
rg -n "generate|rate|limit|ratelimit|metadata|reference|api.json|doc" README* docs src .github workflows -g '!*.map' | head -n 200 || trueRepository: ory/docs
Length of output: 50365
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file='docs/polis/reference/api.json'
echo "== /api/v1/sso/setuplinks blocks =="
python3 - <<'PY'
import json, re
p='docs/polis/reference/api.json'
s=open(p, encoding='utf-8').read()
for m in re.finditer(r'([{/]\s*"\s*/api/v1/sso/(?:dirsync|setuplinks)[^"]*":\s*\{|"\s*/api/v1/sso/(?:dirsync|setuplinks)[^"]*":\s*\{)', s):
start=m.start()-200
if start<0: start=0
end=s.find('\n },', m.end())
block=s[m.start()+1:end].replace('\n', ' ')[:500]
print(block)
PY
echo "== JSON slice around setuplinks paths =="
sed -n '576,600p' "$file"
sed -n '902,915p' "$file"Repository: ory/docs
Length of output: 2322
Add x-ory-ratelimit-bucket to the SSO setup-link operations.
The /api/v1/sso/setuplinks POST/DELETE/GET operations and /api/v1/sso/setuplinks/product GET are classified under rate-limit endpoint documentation, but they currently have no bucket. Add the appropriate polis-public-medium/polis-public-high values so these routes show up in the generated rate-limit table.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/polis/reference/api.json` around lines 438 - 439, Add the
x-ory-ratelimit-bucket extension to the SSO setup-link operation definitions for
POST, DELETE, and GET /api/v1/sso/setuplinks and GET
/api/v1/sso/setuplinks/product. Assign the appropriate polis-public-medium or
polis-public-high value consistent with the documented rate-limit classification
so all four operations appear in the generated rate-limit table.
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Further comments
Summary by CodeRabbit
New Features
acsUrlIdfield when creating or updating SSO connections.acsUrlIdin exported SSO connection details and examples.Documentation