mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 05:25:56 +00:00
Merge pull request #2180 from Infisical/list-ca-endpoint-descriptions
Add descriptions for parameters for LIST (GET) CAs / certificates endpoints
This commit is contained in:
@@ -425,6 +425,21 @@ export const PROJECTS = {
|
|||||||
},
|
},
|
||||||
LIST_INTEGRATION_AUTHORIZATION: {
|
LIST_INTEGRATION_AUTHORIZATION: {
|
||||||
workspaceId: "The ID of the project to list integration auths for."
|
workspaceId: "The ID of the project to list integration auths for."
|
||||||
|
},
|
||||||
|
LIST_CAS: {
|
||||||
|
slug: "The slug of the project to list CAs for.",
|
||||||
|
status: "The status of the CA to filter by.",
|
||||||
|
friendlyName: "The friendly name of the CA to filter by.",
|
||||||
|
commonName: "The common name of the CA to filter by.",
|
||||||
|
offset: "The offset to start from. If you enter 10, it will start from the 10th CA.",
|
||||||
|
limit: "The number of CAs to return."
|
||||||
|
},
|
||||||
|
LIST_CERTIFICATES: {
|
||||||
|
slug: "The slug of the project to list certificates for.",
|
||||||
|
friendlyName: "The friendly name of the certificate to filter by.",
|
||||||
|
commonName: "The common name of the certificate to filter by.",
|
||||||
|
offset: "The offset to start from. If you enter 10, it will start from the 10th certificate.",
|
||||||
|
limit: "The number of certificates to return."
|
||||||
}
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|||||||
@@ -317,14 +317,14 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
params: z.object({
|
params: z.object({
|
||||||
slug: slugSchema.describe("The slug of the project to list CAs.")
|
slug: slugSchema.describe(PROJECTS.LIST_CAS.slug)
|
||||||
}),
|
}),
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
status: z.enum([CaStatus.ACTIVE, CaStatus.PENDING_CERTIFICATE]).optional(),
|
status: z.enum([CaStatus.ACTIVE, CaStatus.PENDING_CERTIFICATE]).optional().describe(PROJECTS.LIST_CAS.status),
|
||||||
friendlyName: z.string().optional(),
|
friendlyName: z.string().optional().describe(PROJECTS.LIST_CAS.friendlyName),
|
||||||
commonName: z.string().optional(),
|
commonName: z.string().optional().describe(PROJECTS.LIST_CAS.commonName),
|
||||||
offset: z.coerce.number().min(0).max(100).default(0),
|
offset: z.coerce.number().min(0).max(100).default(0).describe(PROJECTS.LIST_CAS.offset),
|
||||||
limit: z.coerce.number().min(1).max(100).default(25)
|
limit: z.coerce.number().min(1).max(100).default(25).describe(PROJECTS.LIST_CAS.limit)
|
||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
@@ -358,13 +358,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
params: z.object({
|
params: z.object({
|
||||||
slug: slugSchema.describe("The slug of the project to list certificates.")
|
slug: slugSchema.describe(PROJECTS.LIST_CERTIFICATES.slug)
|
||||||
}),
|
}),
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
friendlyName: z.string().optional(),
|
friendlyName: z.string().optional().describe(PROJECTS.LIST_CERTIFICATES.friendlyName),
|
||||||
commonName: z.string().optional(),
|
commonName: z.string().optional().describe(PROJECTS.LIST_CERTIFICATES.commonName),
|
||||||
offset: z.coerce.number().min(0).max(100).default(0),
|
offset: z.coerce.number().min(0).max(100).default(0).describe(PROJECTS.LIST_CERTIFICATES.offset),
|
||||||
limit: z.coerce.number().min(1).max(100).default(25)
|
limit: z.coerce.number().min(1).max(100).default(25).describe(PROJECTS.LIST_CERTIFICATES.limit)
|
||||||
}),
|
}),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user