Skip to content

feat: load a single spec file from local_paths - #20

Open
rroik wants to merge 1 commit into
developfrom
feat/PLATECO-13410-local-schema-file
Open

rroik wants to merge 1 commit into
developfrom
feat/PLATECO-13410-local-schema-file

Conversation

@rroik

@rroik rroik commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Why

local_paths accepts only directories and silently skips a file path. A project that keeps its contract in a single root openapi.yaml cannot point the validator at it without loading every YAML file of the project.

What Changed

  • LocalSchemaLoader loads a .yaml / .yml file given directly in local_paths
  • Tests for a single file and for a non-YAML file
  • README shows file and directory examples

A path in local_paths can now be a YAML file, not only a directory. This lets a service validate against its root openapi.yaml without loading every YAML file of the project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rroik
rroik requested a balanced review from Copilot October 15, 2026 19:35
@rroik
rroik marked this pull request as ready for review October 15, 2026 19:35
@rroik
rroik requested a review from zakhar-huzenko October 15, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change matches the requested behavior, includes regression tests, and has no identified blocking issues.

0 open findings

What changed in this PR

Adds single-file support to local_paths, allowing projects to load one OpenAPI specification without scanning a directory.

Changes:

  • Loads explicit .yaml and .yml files while preserving directory handling.
  • Adds tests for single-file loading and skipping non-YAML files.
  • Documents file and directory configuration examples.
File Description
tests/​Unit/​SchemaLoader/​LocalSchemaLoaderTest.php Tests single-file loading and non-YAML exclusion.
src/​SchemaLoader/​LocalSchemaLoader.php Adds direct YAML file loading.
README.md Documents both supported path types.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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