mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 06:34:57 +00:00
feat(api-docs): add error responses to API documentation
This commit is contained in:
@@ -11,6 +11,8 @@ import { AuthMode } from "@app/services/auth/auth-type";
|
||||
import { IntegrationMetadataSchema } from "@app/services/integration/integration-schema";
|
||||
import { PostHogEventTypes, TIntegrationCreatedEvent } from "@app/services/telemetry/telemetry-types";
|
||||
|
||||
import { DefaultResponseErrorsSchema } from "../sanitizedSchemas";
|
||||
|
||||
export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
||||
server.route({
|
||||
method: "POST",
|
||||
@@ -49,6 +51,7 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
||||
metadata: IntegrationMetadataSchema.default({})
|
||||
}),
|
||||
response: {
|
||||
...DefaultResponseErrorsSchema,
|
||||
200: z.object({
|
||||
integration: IntegrationsSchema
|
||||
})
|
||||
@@ -135,6 +138,7 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
||||
metadata: IntegrationMetadataSchema.optional()
|
||||
}),
|
||||
response: {
|
||||
...DefaultResponseErrorsSchema,
|
||||
200: z.object({
|
||||
integration: IntegrationsSchema
|
||||
})
|
||||
@@ -219,6 +223,7 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
|
||||
.transform((val) => val === "true")
|
||||
}),
|
||||
response: {
|
||||
...DefaultResponseErrorsSchema,
|
||||
200: z.object({
|
||||
integration: IntegrationsSchema
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user