@taber-miyauchi/validator-service
v0.5.0
Published
Express API service with validation middleware
Downloads
393
Maintainers
Readme
@taber-miyauchi/validator-service
Express API service with validation middleware. Part of the cross-repository SCIP navigation demo.
Installation
npm install
npm run build
npm startAPI Endpoints
POST /validate/email
Validates an email address.
{ "email": "[email protected]" }POST /validate/phone
Validates a phone number.
{ "phone": "+1-555-123-4567" }POST /validate/url
Validates a URL.
{ "url": "https://example.com" }POST /validate/all
Validates multiple fields at once.
{ "email": "[email protected]", "phone": "+1-555-123-4567", "url": "https://example.com" }Dependencies
@taber-miyauchi/validator-core— Core interfaces@taber-miyauchi/validator-schemas— Validator implementationsexpress— HTTP server
Testing Precise Code Navigation
After SCIP indexing, test these navigation features in Sourcegraph:
Go to Definition
- Click on
Validator<string>→ jumps tovalidator-core - Click on
EmailValidator→ jumps tovalidator-schemas - Click on
ValidationResult→ jumps tovalidator-core
Find References
From validator-core:
- Click on
Validator<T>→ see usages in all 3 repos - Click on
ValidationResult→ see usages in all 3 repos
From validator-schemas:
- Click on
EmailValidator→ see usages in this service
Find Implementations
From validator-core:
- Click "Find Implementations" on
Validator<T>→ showsEmailValidator,PhoneValidator,URLValidatorinvalidator-schemas
Development
npm install
npm run build
npm startLicense
MIT
