Add custom OpenAPI REST templates - #19383
Conversation
This reverts commit 1318982.
There was a problem hiding this comment.
Review completed against the latest diff
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
The scope of the custom templates seems conflicted. The minio location of the spec content is global, just like plugins. However, the scope of the feature in the builder is completely limited to a single workspace.
The unintended side-effect being that:
- In order to use the same API across 2 workspaces I would have to upload it twice?
- Upon deleting the workspace, the API spec is currently orphaned.
I believe the intention here was that specs would be imported at the platform level, just like plugins. Upload it once and maintain it globally.
The problem is that per the design, a custom rest template is coupled to the connection, which is at the workspace level. So in this case, to use the same API from a template across two workspaces it would need to be uploaded twice. Good catch on the deletion of the workspace, it would need to clean up the orphaned template. Do you think the design needs to be reconsidered to share custom rest templates between workspaces? |
Yep, we should have a chat. It makes no sense to hold multiple copies of the exact same file. |
There was a problem hiding this comment.
1 issue found across 23 files (changes from recent commits).
Confidence score: 4/5
- In
packages/builder/src/settings/routes.ts, APIEditor still redirects missing/deleted connection flows from/connections/apisto API Specs, which can send users to the wrong section after delete/open actions and create confusing navigation regression — update both redirects to/connections/api-connectionsto keep users in Connections.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/builder/src/settings/routes.ts">
<violation number="1" location="packages/builder/src/settings/routes.ts:313">
P2: Deleting a connection or opening one that no longer exists now returns users to API Specs rather than Connections. Update APIEditor’s two `/connections/apis` redirects to `/connections/api-connections` to preserve the new section flow.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Description
Adds workspace custom OpenAPI REST templates that can be uploaded from the Connections API list, stored privately in MinIO, and reused to create REST connections and endpoint queries. Custom templates are identified in the UI, refresh immediately after upload, and can be deleted with confirmation.
Addresses
Screenshots
deleting.mov
Deleting a custom rest template
Launchcontrol
Users can upload their own OpenAPI schema as a reusable REST API template, create connections from it, import its endpoints, and remove the template when it is no longer needed.