mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 21:28:18 +00:00
Fix: Replaced merge with extend as proposed by Akhil
This commit is contained in:
@@ -171,11 +171,9 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
secrets: secretRawSchema
|
secrets: secretRawSchema
|
||||||
.merge(
|
.extend({
|
||||||
z.object({
|
secretPath: z.string().optional()
|
||||||
secretPath: z.string().optional()
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
.array(),
|
.array(),
|
||||||
imports: z
|
imports: z
|
||||||
.object({
|
.object({
|
||||||
@@ -620,20 +618,18 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
secrets: SecretsSchema.omit({ secretBlindIndex: true })
|
secrets: SecretsSchema.omit({ secretBlindIndex: true })
|
||||||
.merge(
|
.extend({
|
||||||
z.object({
|
_id: z.string(),
|
||||||
_id: z.string(),
|
workspace: z.string(),
|
||||||
workspace: z.string(),
|
environment: z.string(),
|
||||||
environment: z.string(),
|
secretPath: z.string().optional(),
|
||||||
secretPath: z.string().optional(),
|
tags: SecretTagsSchema.pick({
|
||||||
tags: SecretTagsSchema.pick({
|
id: true,
|
||||||
id: true,
|
slug: true,
|
||||||
slug: true,
|
name: true,
|
||||||
name: true,
|
color: true
|
||||||
color: true
|
}).array()
|
||||||
}).array()
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
.array(),
|
.array(),
|
||||||
imports: z
|
imports: z
|
||||||
.object({
|
.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user