Skip to content

docs:Improve the contributing.md for testing purposes #992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fede-dash
Copy link

Fix test setup documentation - missing OpenAPI spec instructions

Problem

The current contributing documentation has a broken workflow that leaves developers stuck:

# Current docs say to run this, but openapi.yml doesn't exist:
npx prism mock path/to/your/openapi.yml

Issues:

  • ❌ References openapi.yml file that doesn't exist in the repo
  • ❌ Provides vague placeholder path path/to/your/openapi.yml
  • ❌ Missing critical setup steps to obtain the OpenAPI specification
  • ❌ Developers get "file not found" errors when following instructions

Solution

Add complete, executable instructions that actually work:

Before (broken):

# you will need npm installed
$ npx prism mock path/to/your/openapi.yml

After (fixed):

# 1. Download OpenAPI spec from .stats.yml (use latest valid openapi_spec_url)
curl -o openapi.yml [URL_FROM_STATS_YML]

# 2. Copy to main project directory
cp openapi.yml path/to/anthropic-sdk-python/

# 3. Start mock server
npx prism mock openapi.yml

# 4. Run tests
./scripts/test

Changes Made

  • Added missing download step for OpenAPI specification
  • Provided concrete commands instead of placeholder paths
  • Made workflow executable from start to finish
  • Added context explaining prerequisites and troubleshooting

Testing

  • Verified .stats.yml contains openapi_spec_url
  • Tested download and setup process
  • Confirmed mock server starts successfully
  • Validated tests run against mock server

Impact

  • New contributors can now follow the documentation without getting stuck
  • Reduces support burden from "documentation doesn't work" issues
  • Improves developer experience with clear, step-by-step guidance

Type: Documentation fix
Breaking: No
Fixes: Missing OpenAPI spec setup instructions

@fede-dash fede-dash requested a review from a team as a code owner July 4, 2025 14:57
docs:Improve the contributing.md for testing purposes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants