mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-07 22:33:57 -05:00
feat(platform): setup and configure orval (#10209)
This pull request sets up and configures Orval for API client generation. It automates the process of creating TypeScript clients from the backend's OpenAPI specification, improving development efficiency and reducing manual code maintenance. ### Changes 🏗️ - Configures Orval with a new configuration file (`orval.config.ts`). - Adds scripts to `package.json` for fetching the OpenAPI spec and generating the API client. - Implements a custom mutator for handling authentication. - Adds API client generation as a step in the CI workflow. - Adds `.gitignore` entry for generated API client files. - Adds a security middleware to prevent caching of sensitive data. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified that the API client is generated correctly. - [x] Confirmed that the custom mutator is functioning as expected for authentication. - [x] Ensured that the new CI workflow step for API client generation is successful. - [x] Tested generated API calls #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**)
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -165,7 +165,7 @@ package-lock.json
|
||||
|
||||
# Allow for locally private items
|
||||
# private
|
||||
pri*
|
||||
pri*
|
||||
# ignore
|
||||
ig*
|
||||
.github_access_token
|
||||
@@ -177,3 +177,6 @@ autogpt_platform/backend/settings.py
|
||||
*.ign.*
|
||||
.test-contents
|
||||
.claude/settings.local.json
|
||||
|
||||
# Auto generated client
|
||||
autogpt_platform/frontend/src/api/__generated__
|
||||
|
||||
Reference in New Issue
Block a user