Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

remove domains from sidebar

Kiran Ka015b013e56d
diff --git a/apps/docs/mint.json b/apps/docs/mint.json
index 2f3ef2ad01..d1c97e76d7 100644
--- a/apps/docs/mint.json
+++ b/apps/docs/mint.json
@@ -112,17 +112,6 @@
"api-reference/endpoint/retrieve-a-list-of-tags"
]
},
- {
- "group": "Domains",
- "pages": [
- "api-reference/endpoint/add-a-domain",
- "api-reference/endpoint/edit-a-domain",
- "api-reference/endpoint/delete-a-domain",
- "api-reference/endpoint/retrieve-a-list-of-domains",
- "api-reference/endpoint/set-a-primary-domain",
- "api-reference/endpoint/transfer-a-domain"
- ]
- },
{
"group": "Metatags",
"pages": ["api-reference/endpoint/retrieve-metatags"]
diff --git a/apps/web/lib/openapi/domains/add-domain.ts b/apps/web/lib/openapi/domains/add-domain.ts
index 3588496cb9..455dc47c54 100644
--- a/apps/web/lib/openapi/domains/add-domain.ts
+++ b/apps/web/lib/openapi/domains/add-domain.ts
@@ -19,7 +19,7 @@ export const addDomain: ZodOpenApiOperationObject = {
},
},
responses: {
- "200": {
+ "201": {
description: "The domain was added.",
content: {
"application/json": {
diff --git a/apps/web/lib/openapi/domains/edit-domain.ts b/apps/web/lib/openapi/domains/edit-domain.ts
index 2be2e43348..c15c242fc0 100644
--- a/apps/web/lib/openapi/domains/edit-domain.ts
+++ b/apps/web/lib/openapi/domains/edit-domain.ts
@@ -6,6 +6,7 @@ import { workspaceParamsSchema } from "../request";
export const editDomain: ZodOpenApiOperationObject = {
operationId: "editDomain",
"x-speakeasy-name-override": "update",
+ "x-speakeasy-max-method-params": 2,
summary: "Edit a domain",
description: "Edit a domain for the authenticated workspace.",
requestParams: {
diff --git a/apps/web/lib/openapi/domains/transfer-domain.ts b/apps/web/lib/openapi/domains/transfer-domain.ts
index 7976ba2004..a67d360ce8 100644
--- a/apps/web/lib/openapi/domains/transfer-domain.ts
+++ b/apps/web/lib/openapi/domains/transfer-domain.ts
@@ -6,6 +6,7 @@ import { workspaceParamsSchema } from "../request";
export const transferDomain: ZodOpenApiOperationObject = {
operationId: "transferDomain",
"x-speakeasy-name-override": "transfer",
+ "x-speakeasy-max-method-params": 2,
summary: "Transfer a domain",
description:
"Transfer a domain to another workspace within the authenticated account.",
diff --git a/apps/web/lib/zod/schemas/domains.ts b/apps/web/lib/zod/schemas/domains.ts
index 185a7e66d9..388539233e 100644
--- a/apps/web/lib/zod/schemas/domains.ts
+++ b/apps/web/lib/zod/schemas/domains.ts
@@ -50,35 +50,41 @@ export const addDomainBodySchema = z.object({
slug: z
.string({ required_error: "slug is required" })
.min(1, "slug cannot be empty.")
- .describe("Name of the domain."),
+ .describe("Name of the domain.")
+ .openapi({ example: "acme.com" }),
type: z
.enum(["redirect", "rewrite"])
.optional()
.default("redirect")
- .describe("The type of redirect to use for this domain."),
+ .describe("The type of redirect to use for this domain.")
+ .openapi({ example: "redirect" }),
target: parseUrlSchema
.nullish()
.describe(
"The page your users will get redirected to when they visit your domain.",
- ),
+ )
+ .openapi({ example: "https://acme.com/landing" }),
expiredUrl: parseUrlSchema
.nullish()
.describe(
"Redirect users to a specific URL when any link under this domain has expired.",
- ),
+ )
+ .openapi({ example: "https://acme.com/expired" }),
archived: z
.boolean()
.optional()
.default(false)
.describe(
"Whether to archive this domain. `false` will unarchive a previously archived domain.",
- ),
+ )
+ .openapi({ example: false }),
placeholder: parseUrlSchema
.nullish()
.default("https://dub.co/help/article/what-is-dub")
.describe(
"Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.",
- ),
+ )
+ .openapi({ example: "https://dub.co/help/article/what-is-dub" }),
});
export const updateDomainBodySchema = addDomainBodySchema.partial();