import { Component, signal } from '@angular/core'; import { CommonModule } from '@angular/common'; interface Endpoint { method: 'GET' | 'POST' | 'PATCH' | 'DELETE'; path: string; description: string; auth: boolean; body?: string; response?: string; } interface ApiGroup { id: string; title: string; tag: string; tagColor: string; baseUrl: string; endpoints: Endpoint[]; } @Component({ selector: 'app-api', standalone: true, imports: [CommonModule], template: `
Base URL: https://api.medicode.io/v1
All endpoints require JWT authentication via Bearer token unless stated otherwise.
Authorization: Bearer <your_token>
{{ g.baseUrl }}
{{ ep.path }}
{{ ep.description }}
@if (ep.auth) {
}
{{ ep.body }}
{{ ep.response }}