# sacpat23/playwright-api-automation-framework architecture

> Architecture diagram of the GitHub repository sacpat23/playwright-api-automation-framework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sacpat23/playwright-api-automation-framework
- Repository: https://github.com/sacpat23/playwright-api-automation-framework

## Overview

This repository is a Playwright/TypeScript REST API test framework for Restful Booker. Its documented end-to-end workflow creates a booking, extracts its ID, obtains an auth token, updates the booking, and validates the response; separate tests cover CRUD, dynamic data, authentication, and schemas. The tree and README identify these capabilities, but test source was not sampled, so internal calls and fixture usage are not inferred.

Main entry points: [`tests/booking_api_chaining.spec.ts`](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_api_chaining.spec.ts) (Booking chain), [`tests/booking_create.spec.ts`](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create.spec.ts) (Create booking), [`tests/booking_create_dynamic.spec.ts`](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create_dynamic.spec.ts) (Dynamic booking), [`tests/ booking_get_by_id.spec.ts`](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/%20booking_get_by_id.spec.ts) (Get by ID)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["API workflow"]
  node_chain["Booking chain"]
end

subgraph group_coverage["API coverage"]
  node_create["Create booking"]
  node_dynamic["Dynamic booking"]
  node_getid["Get by ID"]
  node_getname["Get by name"]
  node_update["Update booking"]
  node_delete["Delete booking"]
  node_auth["Authentication"]
  node_schema["Schema validation"]
  node_validation["Response validation"]
end

subgraph group_data["Test data"]
  node_bookingdata["Booking payloads"]
  node_updatedata["Update payload"]
  node_authdata["Auth payload<br/>[booking_auth.json]"]
  node_schemadata["Booking schema"]
end

node_runner(("Test runner"))
node_api{{"Restful Booker API"}}

node_runner -->|"runs tests"| node_chain
node_chain -->|"creates booking"| node_api
node_chain -->|"gets auth token"| node_api
node_chain -->|"updates booking"| node_api
node_runner -->|"runs tests"| node_create
node_runner -->|"runs tests"| node_dynamic
node_runner -->|"runs tests"| node_getid
node_runner -->|"runs tests"| node_getname
node_runner -->|"runs tests"| node_update
node_runner -->|"runs tests"| node_delete
node_runner -->|"runs tests"| node_auth
node_runner -->|"runs tests"| node_schema
node_runner -->|"runs tests"| node_validation

click node_chain "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_api_chaining.spec.ts"
click node_create "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create.spec.ts"
click node_dynamic "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create_dynamic.spec.ts"
click node_getid "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/%20booking_get_by_id.spec.ts"
click node_getname "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_get_by_name.spec.ts"
click node_delete "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/bookin_delete_api_chaining.spec.ts"
click node_auth "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/authentication.spec.ts"
click node_schema "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_schema_validation.spec.ts"
click node_validation "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/schemavalidaton.spec.ts"
click node_bookingdata "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/booking_create.json"
click node_updatedata "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/booking_update.json"
click node_authdata "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/%20booking_auth.json"
click node_schemadata "https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/%20booking_schema.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chain toneBlue
class node_create,node_dynamic,node_getid,node_getname,node_update,node_delete,node_auth,node_schema,node_validation toneAmber
class node_bookingdata,node_updatedata,node_authdata,node_schemadata,node_api toneMint
class node_runner toneIndigo
```

## Components

### API workflow

- [Booking chain](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_api_chaining.spec.ts): `tests/booking_api_chaining.spec.ts`

### API coverage

- [Create booking](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create.spec.ts): `tests/booking_create.spec.ts`
- [Dynamic booking](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_create_dynamic.spec.ts): `tests/booking_create_dynamic.spec.ts`
- [Get by ID](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/%20booking_get_by_id.spec.ts): `tests/ booking_get_by_id.spec.ts`
- [Get by name](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_get_by_name.spec.ts): `tests/booking_get_by_name.spec.ts`
- **Update booking**
- [Delete booking](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/bookin_delete_api_chaining.spec.ts): `tests/bookin_delete_api_chaining.spec.ts`
- [Authentication](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/authentication.spec.ts): `tests/authentication.spec.ts`
- [Schema validation](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/booking_schema_validation.spec.ts): `tests/booking_schema_validation.spec.ts`
- [Response validation](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/tests/schemavalidaton.spec.ts): `tests/schemavalidaton.spec.ts`

### Test data

- [Booking payloads](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/booking_create.json): `testData/booking_create.json`
- [Update payload](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/booking_update.json): `testData/booking_update.json`
- [Auth payload](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/%20booking_auth.json): `testData/ booking_auth.json`
- [Booking schema](https://github.com/sacpat23/playwright-api-automation-framework/blob/main/testData/%20booking_schema.json): `testData/ booking_schema.json`

### Other components

- **Test runner**
- **Restful Booker API**

## Connections

- Test runner → Booking chain: runs tests (evidence: `README.md`)
- Booking chain → Restful Booker API: creates booking (evidence: `README.md`)
- Booking chain → Restful Booker API: gets auth token (evidence: `README.md`)
- Booking chain → Restful Booker API: updates booking (evidence: `README.md`)
- Test runner → Create booking: runs tests (evidence: `README.md`)
- Test runner → Dynamic booking: runs tests (evidence: `README.md`)
- Test runner → Get by ID: runs tests (evidence: `README.md`)
- Test runner → Get by name: runs tests (evidence: `README.md`)
- Test runner → Update booking: runs tests (evidence: `README.md`)
- Test runner → Delete booking: runs tests (evidence: `README.md`)
- Test runner → Authentication: runs tests (evidence: `README.md`)
- Test runner → Schema validation: runs tests (evidence: `README.md`)
- Test runner → Response validation: runs tests (evidence: `README.md`)
