create-http-scenario

Generates .http files for testing REST API endpoints with JWT login and CRUD request sections.

Updated Nov 19, 2020
One-click install
npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill create-http-scenario-kwojtasinski-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-http-scenario
Source: https://github.com/kwojtasinski-repo/ECommerceApp/tree/main/.github/skills/create-http-scenario
Command: npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill create-http-scenario-kwojtasinski-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually writing REST Client .http files for every API controller is repetitive and error-prone; this Skill scaffolds a complete, convention-compliant .http test file for any endpoint in the ECommerceApp API. ## Core Features & Use Cases - Two ready templates: Template A for standard resource CRUD endpoints and Template B for custom-route endpoint groups, both in VS/VS Code REST Client format. - Built-in auth flow: Every generated file starts with a Login request against /api/Login so you can copy the JWT into the @token variable. - Convention enforcement: Variables (@baseUrl, @token, @contentType, @routePrefix), ### separators, Bearer headers on protected endpoints, and commented-out sub-resource routes. - Use Case: After adding a new Orders controller, ask for an HTTP scenario and receive an orders.http file with login, paginated GET, GET by ID, POST, PUT, and DELETE requests matching the controller's DTOs. ## Quick Start Ask the assistant to create an HTTP scenario for a given controller or bounded context name, and it will read the controller and generate the .http file under ECommerceApp.API/HttpScenarios.

Frequently Asked Questions about create-http-scenario

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a .http file for testing a REST API endpoint?

Provide the controller or bounded context name, and the Skill reads the controller to discover routes, methods, and DTOs, then generates a .http file with login, GET, POST, PUT, and DELETE sections under ECommerceApp.API/HttpScenarios.

What format do VS Code REST Client .http files use?

They declare variables like @baseUrl and @token at the top, separate requests with ### lines, and group sections with # comment blocks. Each request specifies the method, URL, headers such as Authorization: Bearer {{token}}, and an optional JSON body.

Does the generated .http file include JWT authentication?

Yes, every generated file starts with a Login request to /api/Login using the admin credentials, and all protected endpoints include the Authorization: Bearer {{token}} header. Anonymous endpoints omit the header with a note in the file header comment.

Can I generate scenarios for custom routes instead of standard CRUD?

Yes, Template B handles custom-route endpoint groups such as sub-resource routes like /by-customer/{id}. Optional sub-resource endpoints are added as commented-out sections so they can be enabled when needed.

Where are the generated .http files saved?

Files are placed in ECommerceApp.API/HttpScenarios/ with a descriptive name such as catalog.http or orders.http, following any naming conventions already present in the repository.