APIView - Azure/azure-sdk-tools GitHub Wiki
Getting Started with APIView Development
This guide helps Microsoft-internal contributors get up and running with APIView development. It covers project structure, setup steps, and contribution workflows for the ASP.NET backend and Angular frontend.
β You do not need to provision Azure resources.
β οΈ This guide assumes access to the existing APIView environment and the Azure SDK organization.
π§ Project Overview
Project | Description |
---|---|
APIView |
Core functionality (used by backend and C# parser) |
APIViewWeb |
ASP.NET Core backend with all API endpoints and auth logic |
ClientSPA |
Angular-based Single Page Application UI (served from spa.apiview.dev ) |
π₯ͺ Testing
Test Project | Status | Notes |
---|---|---|
ApiViewUnitTests |
β Active | Covers API logic and backend functionality |
Angular Unit Tests | β Active | Run with ng test ; lives in .spec.ts files |
APIViewIntegrationTests |
β Obsolete | Required Cosmos & Storage emulators. Can likely be deleted. |
APIViewUITests |
β Obsolete | Selenium-based, now obsolete. Angular has its own test suite. |
π Prerequisites
You must be part of the Azure SDK GitHub organization and have the following tools installed:
- Visual Studio (for backend development)
- VS Code or terminal (for frontend)
- Node.js
- Angular CLI
π Permissions
Run the following script to grant the required RBAC roles (Storage, Cosmos DB, App Config):
APIViewWeb/get-permissions.ps1
You'll need:
- Your Microsoft email (
[email protected]
) - Your user principal (
az ad signed-in-user show
)
π Configure Secrets
- Right-click on
APIViewWeb
β Manage User Secrets - Insert the following JSON (replace placeholder values):
{
"AppConfigUrl": "https://<your-app-config>.azconfig.io",
"Github:ClientId": "<YOUR_CLIENT_ID>",
"Github:ClientSecret": "<YOUR_CLIENT_SECRET>",
"APIVIew-Host-Url": "http://localhost:5000",
"APIVIew-SPA-Host-Url": "https://localhost:4200"
}
Secrets and service connections will be loaded automatically via App Configuration and Key Vault.
π§ Create a GitHub OAuth App (for local login)
- Go to GitHub β Settings β Developer Settings β OAuth Apps
- Click βNew OAuth Appβ
- Fill in:
- App name:
APIViewLocal
- Homepage URL:
http://localhost:5000
- Authorization callback URL:
http://localhost:5000
- App name:
- After creation, copy the Client ID and Secret into your User Secrets (see above)
βΆοΈ Running Locally
1. Build Frontend Assets
cd src\dotnet\APIView\APIViewWeb\Client
npm install
npm run-script build
2. Start Backend
- Open
APIViewWeb
in Visual Studio - Press F5
3. Run Frontend Dev Server (optional for hot reload)
cd src\dotnet\APIView\ClientSPA
npm install
npm run-script build
ng serve --ssl
π Backend changes may require restarting the server
β Hot reload works automatically for Angular
π Authentication Model
- Uses cookie-based login
- Cookies are valid across both
localhost:5000
andlocalhost:4200
- Look for
[AllowAnonymous]
attributes to identify public endpoints
π₯ Verifying Your Setup
You can test your local environment using an existing API review:
- Launch the app and log in via GitHub OAuth
- You should see the review list from staging
- Upload any valid token file or language-specific package to test upload
π‘ Tips for Development
- Use Swagger UI to explore backend endpoints
- All Angular-visible APIs live in
LeanControllers
and useLeanModels
- Public API access is marked with
[AllowAnonymous]
- Secrets and connections are managed via AppConfig + Key Vault
β Making Contributions
Where Should I Make Changes?
Area | Modify If... |
---|---|
Backend (APIViewWeb) | You're changing API logic, endpoints, or auth |
Frontend (ClientSPA) | You're updating UI components or views |
APIView (core) | You're modifying backend functionality shared across components |
You do not need to modify or run language parsers (C#, Java, Python, etc.)
Testing Your Changes
- Backend: Start Visual Studio debugger and verify functionality
- Frontend: Use
ng serve
for live preview; runng test
for unit tests - Swagger: Use the built-in UI to test endpoints manually
Submitting a PR
- Create a branch from
main
- Make and test your changes
- Open a PR via GitHub
- The CLA bot will validate your contributor status (first-time only)
- Tag reviewers or your team lead as needed
π₯ Contacts
Name | Notes | |
---|---|---|
Travis Prescott | [email protected] | Current Dev |
Alitzel Medez | [email protected] | Current Dev |
Dozie Ononiwu | [email protected] | Prior Dev |
Praveen Kuttappan | [email protected] | Prior Dev |
For additional documentation, visit:
π Internal Wiki