-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or requesthardChallenging implementationChallenging implementationhelp wantedExtra attention is neededExtra attention is needed
Description
Adding a new API preview currently requires manually creating a JSON file and knowing the correct format. A CLI tool would make this much more accessible for contributors.
Proposed solution
A Node.js CLI script (extending the existing scripts/generate-previews.cjs) that:
- Accepts an API name or slug as input
- Fetches a sample response from the API
- Auto-detects the best preview type
- Writes the preview JSON file
- Validates the output builds correctly
Usage example
node scripts/add-preview.cjs --api "cat-facts"Acceptance criteria
- Works for APIs in catalog.json
- Validates the generated preview renders without errors
- Handles auth-required APIs gracefully with a prompt for the key
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthardChallenging implementationChallenging implementationhelp wantedExtra attention is neededExtra attention is needed