Skip to content

Add --openapi-retries and --openapi-retry-wait CLI options - #32

Merged
sinan-ozel merged 1 commit into
mainfrom
feat-retry-config
Apr 12, 2026
Merged

Add --openapi-retries and --openapi-retry-wait CLI options#32
sinan-ozel merged 1 commit into
mainfrom
feat-retry-config

Conversation

@sinan-ozel

Copy link
Copy Markdown
Owner

Summary

  • Adds --openapi-retries CLI option to configure the number of retry attempts when fetching /openapi.json (default: 3)
  • Adds --openapi-retry-wait CLI option to configure the wait time in seconds between retries (default: 1.0)
  • Both validate_openapi_spec and the spec-fetching loop in pytest_configure now respect these configurable values instead of the previous hardcoded 4 attempts / no wait

Test plan

  • Run with --openapi-retries=0 to verify no retries occur
  • Run with --openapi-retry-wait=2 to verify a 2-second pause between retries
  • Run against an unavailable server and confirm the error message reflects the configured attempt count

🤖 Generated with Claude Code

Both validate_openapi_spec and the plugin's own /openapi.json fetch now
wait retry_wait seconds between attempts instead of retrying immediately.
The number of retries and the wait duration are user-configurable:

  --openapi-retries N        retries after first failure (default: 3)
  --openapi-retry-wait SECS  seconds between retries (default: 1.0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sinan-ozel
sinan-ozel merged commit 27fe939 into main Apr 12, 2026
14 checks passed
@sinan-ozel
sinan-ozel deleted the feat-retry-config branch April 12, 2026 20:21
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.

1 participant