Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix: use correct path for prompt versions api (#5236)

Max Deichmannaec58b1149c0
diff --git a/fern/apis/server/definition/prompt-version.yml b/fern/apis/server/definition/prompt-version.yml
index 0557442da5..b8d9cfb081 100644
--- a/fern/apis/server/definition/prompt-version.yml
+++ b/fern/apis/server/definition/prompt-version.yml
@@ -9,7 +9,7 @@ service:
update:
docs: Update labels for a specific prompt version
method: PATCH
- path: /prompts/{name}/version/{version}
+ path: /prompts/{name}/versions/{version}
path-parameters:
name:
type: string
diff --git a/web/public/generated/api/openapi.yml b/web/public/generated/api/openapi.yml
index 4d77789d0a..95c2ea41d3 100644
--- a/web/public/generated/api/openapi.yml
+++ b/web/public/generated/api/openapi.yml
@@ -1426,14 +1426,14 @@ paths:
schema: {}
security:
- BasicAuth: []
- /api/public/v2/prompts/{promptName}/version/{version}:
+ /api/public/v2/prompts/{name}/versions/{version}:
patch:
description: Update labels for a specific prompt version
operationId: promptVersion_update
tags:
- PromptVersion
parameters:
- - name: promptName
+ - name: name
in: path
description: The name of the prompt
required: true
diff --git a/web/public/generated/postman/collection.json b/web/public/generated/postman/collection.json
index a922b295ed..949d2dbd1a 100644
--- a/web/public/generated/postman/collection.json
+++ b/web/public/generated/postman/collection.json
@@ -1068,7 +1068,7 @@
"request": {
"description": "Update labels for a specific prompt version",
"url": {
- "raw": "{{baseUrl}}/api/public/v2/prompts/:promptName/version/:version",
+ "raw": "{{baseUrl}}/api/public/v2/prompts/:name/versions/:version",
"host": [
"{{baseUrl}}"
],
@@ -1077,14 +1077,14 @@
"public",
"v2",
"prompts",
- ":promptName",
- "version",
+ ":name",
+ "versions",
":version"
],
"query": [],
"variable": [
{
- "key": "promptName",
+ "key": "name",
"value": "",
"description": "The name of the prompt"
},
diff --git a/web/src/__tests__/prompts.v2.servertest.ts b/web/src/__tests__/prompts.v2.servertest.ts
index a00192b34b..d518666d04 100644
--- a/web/src/__tests__/prompts.v2.servertest.ts
+++ b/web/src/__tests__/prompts.v2.servertest.ts
@@ -1116,7 +1116,7 @@ describe("/api/public/v2/prompts API Endpoint", () => {
});
});
-describe("PATCH api/public/v2/prompts/[promptName]/version/[version]", () => {
+describe("PATCH api/public/v2/prompts/[promptName]/versions/[version]", () => {
it("should update the labels of a prompt", async () => {
const { projectId: newProjectId, auth: newAuth } =
await createOrgProjectAndApiKey();
@@ -1134,7 +1134,7 @@ describe("PATCH api/public/v2/prompts/[promptName]/version/[version]", () => {
const response = await makeAPICall(
"PATCH",
- `${baseURI}/prompt-1/version/1`,
+ `${baseURI}/prompt-1/versions/1`,
{
newLabels: ["new-label"],
},
@@ -1184,7 +1184,7 @@ describe("PATCH api/public/v2/prompts/[promptName]/version/[version]", () => {
// Add "production" label to version 2
const response = await makeAPICall(
"PATCH",
- `${baseURI}/prompt-1/version/2`,
+ `${baseURI}/prompt-1/versions/2`,
{
newLabels: ["production"],
},
@@ -1234,7 +1234,7 @@ describe("PATCH api/public/v2/prompts/[promptName]/version/[version]", () => {
// Try to set "latest" label
const response = await makeAPICall(
"PATCH",
- `${baseURI}/prompt-1/version/1`,
+ `${baseURI}/prompt-1/versions/1`,
{
newLabels: ["latest"],
},
@@ -1250,7 +1250,7 @@ describe("PATCH api/public/v2/prompts/[promptName]/version/[version]", () => {
// Try to update non-existing prompt
const response = await makeAPICall(
"PATCH",
- `${baseURI}/non-existing-prompt/version/1`,
+ `${baseURI}/non-existing-prompt/versions/1`,
{
newLabels: ["production"],
},
diff --git a/web/src/pages/api/public/v2/prompts/[promptName]/version/[promptVersion].ts b/web/src/pages/api/public/v2/prompts/[promptName]/versions/[promptVersion].ts
similarity index 100%
rename from web/src/pages/api/public/v2/prompts/[promptName]/version/[promptVersion].ts
rename to web/src/pages/api/public/v2/prompts/[promptName]/versions/[promptVersion].ts