Skip to content

test: support hermetic local API reference#819

Draft
apcha-oai wants to merge 1 commit into
mainfrom
apcha/hermetic-api-reference
Draft

test: support hermetic local API reference#819
apcha-oai wants to merge 1 commit into
mainfrom
apcha/hermetic-api-reference

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Allow the SDK mock server to use a locally available API reference when present, while preserving the existing network-based fallback.

Copilot AI review requested due to automatic review settings July 26, 2026 18:06

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.

Pull request overview

Updates the scripts/mock helper to support hermetic/local usage by preferring a locally checked-in/generated OpenAPI spec when available, while preserving the existing .stats.yml URL-based fallback.

Changes:

  • If no explicit spec path/URL arg is provided, prefer api_reference/openapi.transformed.yml when present.
  • Verify the local spec matches generation metadata by comparing its MD5 hash to openapi_transformed_spec_hash from .castiron.stats.yml.
  • Retain existing behavior of reading openapi_spec_url from .stats.yml when local inputs aren’t available.

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

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