spr migrated books, and tester
This commit is contained in:
37
artery/shunts/example/README.md
Normal file
37
artery/shunts/example/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Example Shunt
|
||||
|
||||
Template for creating fake service connectors for testing.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Run the shunt
|
||||
python main.py
|
||||
|
||||
# Or with uvicorn
|
||||
uvicorn main:app --port 8099 --reload
|
||||
```
|
||||
|
||||
## Creating a New Shunt
|
||||
|
||||
1. Copy this directory:
|
||||
```bash
|
||||
cp -r shunts/example shunts/mercadopago
|
||||
```
|
||||
|
||||
2. Edit `depot/responses.json` with fake responses
|
||||
|
||||
3. Update `main.py` to match the real vein's API endpoints
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `depot/responses.json` to configure fake responses:
|
||||
|
||||
```json
|
||||
{
|
||||
"GET /endpoint": {"response": "data"},
|
||||
"POST /endpoint": {"success": true}
|
||||
}
|
||||
```
|
||||
|
||||
The shunt UI at `/` shows current configuration.
|
||||
Reference in New Issue
Block a user