Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>Mock API GeneratorNew to Visual Studio Code? Get it now.
Mock API Generator

Mock API Generator

TeginSoft

|
5 installs
| (0) | Free
| Sponsor
Instantly generate a local mock REST API from your real database schema — MS SQL Server & PostgreSQL supported. Perfect for frontend teams working without a live backend.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mock API Generator

Instantly spin up a local REST API from your real database schema — no backend needed.

Gerçek veritabanı şemanızdan anında yerel bir Mock REST API ayağa kaldırın — backend'e gerek yok.


Features / Özellikler

Database Connection / Veritabanı Bağlantısı

  • MS SQL Server, PostgreSQL, MySQL, SQLite — connect via the built-in config panel Dahili yapılandırma paneliyle bağlanın
  • Secure credentials — passwords stored in VS Code SecretStorage, never in settings files Güvenli kimlik bilgileri — şifreler settings dosyasına değil, VS Code SecretStorage'a kaydedilir
  • Test Connection — verify connectivity before saving Bağlantıyı Sına — kaydetmeden önce bağlantıyı doğrula
  • SQLite file picker — browse for .db / .sqlite files via native dialog SQLite dosya seçici — native dialog ile .db / .sqlite dosyasına gözat

Schema Explorer / Şema Gezgini

  • Activity Bar panel — dedicated sidebar with all tables and column details Activity Bar paneli — tüm tablolar ve kolon detaylarıyla özel kenar çubuğu
  • Deselected by default — choose exactly which tables to mock; right-click to include/exclude Varsayılan olarak seçilmez — hangi tabloları mock'layacağınızı seçin; dahil etmek/çıkarmak için sağ tıklayın
  • Column details — expand any table to see data type, nullable and primary key info Kolon detayları — veri tipi, nullable ve primary key bilgisini görmek için tabloyu genişletin
  • Refresh — reload schema from the database at any time Yenile — şemayı istediğiniz zaman veritabanından yeniden yükleyin

Mock Server / Mock Sunucu

  • One-click start — Ctrl+Shift+M launches the server instantly Tek tıkla başlat — Ctrl+Shift+M ile sunucuyu anında başlatın
  • Auto port fallback — if the default port is busy, the next free port is used automatically Otomatik port yedekleme — varsayılan port meşgulse, bir sonraki boş port otomatik kullanılır
  • Full CRUD endpoints — generated automatically for every selected table Tam CRUD endpoint'leri — seçilen her tablo için otomatik oluşturulur
  • Discovery endpoint — GET /api/_meta lists all active routes and schemas Keşif endpoint'i — GET /api/_meta tüm aktif rotaları ve şemaları listeler
  • Auto restart — server restarts automatically on crash (up to 3 attempts) Otomatik yeniden başlatma — çökmede sunucu otomatik yeniden başlar (en fazla 3 deneme)
  • localhost only — server never exposed beyond your machine Yalnızca localhost — sunucu makinenizin dışına asla açılmaz

Smart Faker Mapping / Akıllı Faker Eşlemesi

  • Column name patterns — email, phone, createdAt, price, username and 30+ more map to the right Faker method automatically Kolon adı desenleri — email, phone, createdAt, price, username ve 30+ fazlası otomatik olarak doğru Faker metoduna eşlenir
  • SQL type fallback — when no name pattern matches, the SQL/SQLite data type determines the output SQL tipi yedekleme — ad deseni eşleşmediğinde SQL/SQLite veri tipi çıktıyı belirler
  • Primary keys — always auto-incremented integers (1, 2, 3…) Birincil anahtarlar — her zaman artan integer (1, 2, 3…)
  • Nullable columns — return null ~20% of the time Nullable kolonlar — yaklaşık %20 oranında null döner
  • Multi-locale — EN / TR auto-detected from VS Code language; configurable Çok dilli — EN / TR VS Code dilinden otomatik algılanır; yapılandırılabilir

Query String Controls / Sorgu Parametreleri

  • ?count=N — override the number of rows returned (max 100) Dönen kayıt sayısını geçersiz kıl (en fazla 100)
  • ?seed=N — deterministic data: same seed always produces the same rows Deterministik veri: aynı seed her zaman aynı satırları üretir
  • ?delay=N — simulate network latency in milliseconds Milisaniye cinsinden ağ gecikmesi simüle et

Endpoints / Endpoint'ler

Every selected table gets these routes automatically: Seçilen her tablo için bu rotalar otomatik oluşturulur:

GET    /api/:table          → N fake records (default: 20)   / N sahte kayıt
GET    /api/:table/:id      → single fake record              / tek sahte kayıt
POST   /api/:table          → 201 { success, data, id }
PUT    /api/:table/:id      → 200 { success, data }
PATCH  /api/:table/:id      → 200 { success, data }
DELETE /api/:table/:id      → 204 No Content
GET    /api/_meta           → all active endpoints + schemas  / tüm aktif endpoint'ler + şemalar

Usage / Kullanım

1. Connect / Bağlan: Ctrl+Shift+P → Mock API: Connect to Database — fill in host, port, credentials and hit Save & Connect. Ana bilgisayar, port ve kimlik bilgilerini doldurup Kaydet & Bağlan'a tıklayın.

2. Select tables / Tabloları seçin: In the Mock API Generator Activity Bar panel, right-click any table → Include in Mock API. Activity Bar panelinde herhangi bir tabloya sağ tıklayın → Mock API'ye Ekle.

3. Start the server / Sunucuyu başlatın: Press Ctrl+Shift+M or click ▶ in the panel title bar. Ctrl+Shift+M tuşuna basın veya panel başlık çubuğundaki ▶ simgesine tıklayın.

4. Call your endpoints / Endpoint'lerinizi çağırın:

curl http://localhost:3456/api/users
curl "http://localhost:3456/api/users?count=5&seed=42"
curl http://localhost:3456/api/_meta

Supported Databases / Desteklenen Veritabanları

Database Status
MS SQL Server ✅
PostgreSQL ✅
MySQL ✅
SQLite ✅

Configuration / Yapılandırma

Setting Default Description / Açıklama
mockApiGen.defaultPort 3456 Server listen port / Sunucu portu
mockApiGen.defaultRowCount 20 Rows per GET request / GET başına kayıt sayısı
mockApiGen.fakerLocale tr Faker.js locale (tr, en, de…)
mockApiGen.autoStartOnConnect false Auto-start after connecting / Bağlantı sonrası otomatik başlat
mockApiGen.dbType mssql Database type / Veritabanı tipi
mockApiGen.host "" Database host / Veritabanı adresi
mockApiGen.port 1433 Database port
mockApiGen.database "" Database name / Veritabanı adı
mockApiGen.username "" Username / Kullanıcı adı
mockApiGen.sqliteFilePath "" SQLite file path / SQLite dosya yolu

Keyboard Shortcuts / Klavye Kısayolları

Key / Tuş Action / İşlev
Ctrl+Shift+M Start mock server / Mock sunucuyu başlat

Requirements / Gereksinimler

  • VS Code ^1.85.0
  • A running MS SQL Server, PostgreSQL or MySQL instance — or a local .db / .sqlite file Çalışan bir MS SQL Server, PostgreSQL veya MySQL sunucusu — ya da yerel bir .db / .sqlite dosyası

Planned Features / Planlanan Özellikler

  • [ ] Per-column Faker method override UI / Kolon bazında Faker metodu özelleştirme arayüzü
  • [ ] Export endpoint list as Postman / Insomnia collection / Endpoint listesini Postman / Insomnia koleksiyonu olarak dışa aktar
  • [ ] Oracle & SQLServer Windows Auth support / Oracle ve SQLServer Windows Auth desteği
  • [ ] Response schema validation mode / Yanıt şema doğrulama modu

Support / Destek

If Mock API Generator saves you time, consider buying me a coffee. ☕

Mock API Generator size zaman kazandırıyorsa, bir kahve ısmarlayabilirsiniz. ☕


License / Lisans

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft