Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

chore: audit for responses. remove unused mgmt apis #1714

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

tomkit
Copy link
Contributor

@tomkit tomkit commented Oct 10, 2023

  • Remove unused providers, destinations endpoints
  • Fix inconsistencies in response schema
  • Add shadow error logs for API response validation (this doesn't cause responses to error, but lets it through)
  • Further deprecate entity and schema related fields
  • Deprecate user_id on get connection

Test Plan

Example API validation error message:

supaglue-api-1          | [18:53:11.936] ERROR: API reference validation error
supaglue-api-1          |     context: {
supaglue-api-1          |       "applicationEnv": "development",
supaglue-api-1          |       "applicationName": "My Application",
supaglue-api-1          |       "applicationId": "5eec8ade-aefd-4b73-b0a2-f749cb72e81d",
supaglue-api-1          |       "orgId": "e7070cc8-36e7-43e2-81fc-ad57713cf2d3"
supaglue-api-1          |     }
supaglue-api-1          |     originalUrl: "/mgmt/v2/customers"
supaglue-api-1          |     error: {
supaglue-api-1          |       "name": "Internal Server Error",
supaglue-api-1          |       "status": 500,
supaglue-api-1          |       "path": "/mgmt/v2/customers",
supaglue-api-1          |       "errors": [
supaglue-api-1          |         {
supaglue-api-1          |           "path": "/response/0/application_id",
supaglue-api-1          |           "message": "must have required property 'application_id'",
supaglue-api-1          |           "errorCode": "required.openapi.validation"
supaglue-api-1          |         }
supaglue-api-1          |       ]
supaglue-api-1          |     }

[Describe test plan here]

Deployment instructions

[Add any special deployment instructions here]

@vercel
Copy link

vercel bot commented Oct 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
management-ui ⬜️ Ignored (Inspect) Visit Preview Oct 10, 2023 10:56pm
supaglue-docs ⬜️ Ignored (Inspect) Visit Preview Oct 10, 2023 10:56pm

apps/api/middleware/openapi.ts Outdated Show resolved Hide resolved
@tomkit tomkit requested a review from lucasmarshall October 10, 2023 22:53
@tomkit tomkit merged commit e914553 into main Oct 10, 2023
9 checks passed
@tomkit tomkit deleted the response_audit branch October 10, 2023 22:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants