Skip to content

feat: add JSON-based setup option to authorization server conformance…#228

Closed
Michito-Okai wants to merge 1 commit into
modelcontextprotocol:mainfrom
Hitachi:json-based-setup-option
Closed

feat: add JSON-based setup option to authorization server conformance…#228
Michito-Okai wants to merge 1 commit into
modelcontextprotocol:mainfrom
Hitachi:json-based-setup-option

Conversation

@Michito-Okai

Copy link
Copy Markdown
Contributor

Motivation and Context

Described in #225

How Has This Been Tested?

Breaking Changes

  • add file option for authorization server mode (--file )

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@pkg-pr-new

pkg-pr-new Bot commented Apr 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@modelcontextprotocol/conformance@228

commit: 04476c3

pcarleton added a commit that referenced this pull request Jun 24, 2026
…persedes #228) (#360)

* feat: add JSON-based setup option to authorization server conformance test

* refactor(auth): single-schema validation for --file; drop duplicate schema/merge

* chore: move authorization-server settings sample to examples/

* test(auth): cover --file merge precedence and validation

* fix(auth): validate --file standalone via .strict(); reject partial/typo'd files

The settings file must be a complete, valid AuthorizationServerOptions on
its own; CLI flags are optional overrides on top. .strict() rejects unknown
keys so a typo'd field surfaces as an error instead of being silently
ignored. ZodError from file parsing is reported with the file path.

* chore: drop placeholder --file merge test pending CLI test pattern

The test re-implemented the merge logic locally, which can drift from
src/index.ts. Proper coverage needs either programmatic commander.parse()
or an extracted loadAuthorizationServerOptions() helper; deferring that
decision to a follow-up rather than establishing the pattern here.

---------

Co-authored-by: Michito Okai <michito.okai.zn@hitachi.com>
@pcarleton

Copy link
Copy Markdown
Member

I needed to rebase, so i scooted this to #360

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.

2 participants