Skip to content

docs: hydra update oauth2-client updates only provided fields#2680

Open
alnr wants to merge 1 commit into
masterfrom
alnr/hydra-update-oauth2-client-patch
Open

docs: hydra update oauth2-client updates only provided fields#2680
alnr wants to merge 1 commit into
masterfrom
alnr/hydra-update-oauth2-client-patch

Conversation

@alnr

@alnr alnr commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

The hydra update oauth2-client (and, from Ory CLI v1.3.2, ory update oauth2-client) command now sends a partial update built from exactly the flags that were set, instead of replacing the entire client. Fields not passed as flags keep their current values; full replacement remains available via --file.

This PR updates the documentation accordingly:

  • docs/hydra/cli/hydra-update-oauth2-client.md, docs/cli/ory-update-oauth2-client.md: new synopsis matching the updated command help text. These pages are auto-generated; the wording here matches what regeneration will produce from the new cobra Long text.
  • docs/hydra/guides/oauth2-clients.mdx: the flag-based CLI example moves to the "Patch OAuth2 client" section (which is what flags now do), and the "Update OAuth2 client" section documents --file for full replacement.

Code change: ory-corp/cloud (hydra), PR linked from there.

Related Issue or Design Document

Documentation improvement, no issue reference required. Related upstream request: ory/hydra#2020.

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified OAuth 2.0 client update behavior when using individual command-line flags.
    • Documented that updates preserve unspecified fields when flags are used.
    • Clarified that providing a configuration file replaces the client and resets omitted fields to their defaults.

The hydra update oauth2-client and ory update oauth2-client commands now
send a partial update built from the flags that were set, instead of
replacing the entire client. Update the CLI reference synopses and the
OAuth2 clients guide accordingly: the flag-based examples move to the
patch section, and the update (replace) section documents --file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 15, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Hydra and Ory CLI documentation to reflect the new behavior of hydra update oauth2-client / ory update oauth2-client: flag-based updates now perform a partial update (patch) affecting only provided fields, while full replacement is done via --file.

Changes:

  • Updated both CLI reference pages’ synopsis text to describe partial updates via flags and full replacement via --file.
  • Adjusted the OAuth2 clients guide to show --file under “Update OAuth2 client” (full replacement) and moved the flag-based example to “Patch OAuth2 client”.
  • Added cross-reference from the “Update” CLI tab to the “Patch OAuth2 client” section.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/hydra/guides/oauth2-clients.mdx Repositions CLI examples to align with “update = full replace via --file” vs “patch = flags”.
docs/hydra/cli/hydra-update-oauth2-client.md Updates synopsis to document “flags patch; --file replaces”.
docs/cli/ory-update-oauth2-client.md Updates synopsis to document “flags patch; --file replaces”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d7882e2-f3b3-4ee0-8a36-392fb7ea94ab

📥 Commits

Reviewing files that changed from the base of the PR and between 235372f and 14b0d58.

⛔ Files ignored due to path filters (1)
  • docs/hydra/guides/oauth2-clients.mdx is excluded by !**/*.mdx
📒 Files selected for processing (2)
  • docs/cli/ory-update-oauth2-client.md
  • docs/hydra/cli/hydra-update-oauth2-client.md

📝 Walkthrough

Walkthrough

The OAuth2 client CLI documentation now distinguishes partial updates using flags from full replacement using --file, including how omitted fields are handled.

Changes

OAuth2 client update semantics

Layer / File(s) Summary
Document update semantics
docs/cli/ory-update-oauth2-client.md, docs/hydra/cli/hydra-update-oauth2-client.md
Both command references state that flags update only provided fields, while --file replaces the client and resets omitted fields to defaults.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: aeneasr, copilot, unatasha8, vinckr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the documentation update about oauth2-client updates applying only provided fields.
Description check ✅ Passed The description follows the template with a summary, related issue note, checklist, and extra context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alnr/hydra-update-oauth2-client-patch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unatasha8 unatasha8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants