Skip to content

Commit 4923d34

Browse files
committed
fix(docs): update destination schemas to remove unnecessary comments and ensure required fields are accurate
1 parent be8cf04 commit 4923d34

File tree

1 file changed

+16
-34
lines changed

1 file changed

+16
-34
lines changed

docs/apis/openapi.yaml

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ components:
223223
type:
224224
type: string
225225
description: Type of the destination.
226-
enum: [webhook] # Specific type
226+
enum: [webhook]
227227
example: "webhook"
228228
topics:
229229
$ref: "#/components/schemas/Topics"
@@ -238,7 +238,6 @@ components:
238238
format: date-time
239239
description: ISO Date when the destination was created.
240240
example: "2024-01-01T00:00:00Z"
241-
# Type-specific properties
242241
config:
243242
$ref: "#/components/schemas/WebhookConfig"
244243
credentials:
@@ -279,7 +278,7 @@ components:
279278
type:
280279
type: string
281280
description: Type of the destination.
282-
enum: [aws_sqs] # Specific type
281+
enum: [aws_sqs]
283282
example: "aws_sqs"
284283
topics:
285284
$ref: "#/components/schemas/Topics"
@@ -294,7 +293,6 @@ components:
294293
format: date-time
295294
description: ISO Date when the destination was created.
296295
example: "2024-01-01T00:00:00Z"
297-
# Type-specific properties
298296
config:
299297
$ref: "#/components/schemas/AWSSQSConfig"
300298
credentials:
@@ -335,7 +333,7 @@ components:
335333
type:
336334
type: string
337335
description: Type of the destination.
338-
enum: [rabbitmq] # Specific type
336+
enum: [rabbitmq]
339337
example: "rabbitmq"
340338
topics:
341339
$ref: "#/components/schemas/Topics"
@@ -350,7 +348,6 @@ components:
350348
format: date-time
351349
description: ISO Date when the destination was created.
352350
example: "2024-01-01T00:00:00Z"
353-
# Type-specific properties
354351
config:
355352
$ref: "#/components/schemas/RabbitMQConfig"
356353
credentials:
@@ -392,7 +389,7 @@ components:
392389
type:
393390
type: string
394391
description: Type of the destination.
395-
enum: [hookdeck] # Specific type
392+
enum: [hookdeck]
396393
example: "hookdeck"
397394
topics:
398395
$ref: "#/components/schemas/Topics"
@@ -407,7 +404,6 @@ components:
407404
format: date-time
408405
description: ISO Date when the destination was created.
409406
example: "2024-01-01T00:00:00Z"
410-
# Type-specific properties
411407
config: {} # Empty config
412408
credentials:
413409
$ref: "#/components/schemas/HookdeckCredentials"
@@ -444,7 +440,7 @@ components:
444440
type:
445441
type: string
446442
description: Type of the destination.
447-
enum: [aws_kinesis] # Specific type
443+
enum: [aws_kinesis]
448444
example: "aws_kinesis"
449445
topics:
450446
$ref: "#/components/schemas/Topics"
@@ -459,7 +455,6 @@ components:
459455
format: date-time
460456
description: ISO Date when the destination was created.
461457
example: "2024-01-01T00:00:00Z"
462-
# Type-specific properties
463458
config:
464459
$ref: "#/components/schemas/AWSKinesisConfig"
465460
credentials:
@@ -508,8 +503,7 @@ components:
508503

509504
DestinationCreateWebhook:
510505
type: object
511-
# Properties duplicated from DestinationCreateBase
512-
required: [type, topics] # Config and credentials not required for webhook create base
506+
required: [type, topics, config]
513507
properties:
514508
id:
515509
type: string
@@ -518,19 +512,17 @@ components:
518512
type:
519513
type: string
520514
description: Type of the destination. Must be 'webhook'.
521-
enum: [webhook] # Specific type
515+
enum: [webhook]
522516
topics:
523517
$ref: "#/components/schemas/Topics"
524-
# Type-specific properties
525518
config:
526519
$ref: "#/components/schemas/WebhookConfig"
527520
credentials:
528521
# Secret is optional on create for admin, forbidden for tenant
529522
$ref: "#/components/schemas/WebhookCredentials"
530523
DestinationCreateAWSSQS:
531524
type: object
532-
# Properties duplicated from DestinationCreateBase + specific required
533-
required: [type, topics, credentials] # Config is now optional
525+
required: [type, topics, config, credentials]
534526
properties:
535527
id:
536528
type: string
@@ -539,18 +531,16 @@ components:
539531
type:
540532
type: string
541533
description: Type of the destination. Must be 'aws_sqs'.
542-
enum: [aws_sqs] # Specific type
534+
enum: [aws_sqs]
543535
topics:
544536
$ref: "#/components/schemas/Topics"
545-
# Type-specific properties
546537
config:
547538
$ref: "#/components/schemas/AWSSQSConfig"
548539
credentials:
549540
$ref: "#/components/schemas/AWSSQSCredentials"
550541
DestinationCreateRabbitMQ:
551542
type: object
552-
# Properties duplicated from DestinationCreateBase + specific required
553-
required: [type, topics, credentials] # Config is now optional
543+
required: [type, topics, config, credentials]
554544
properties:
555545
id:
556546
type: string
@@ -559,17 +549,15 @@ components:
559549
type:
560550
type: string
561551
description: Type of the destination. Must be 'rabbitmq'.
562-
enum: [rabbitmq] # Specific type
552+
enum: [rabbitmq]
563553
topics:
564554
$ref: "#/components/schemas/Topics"
565-
# Type-specific properties
566555
config:
567556
$ref: "#/components/schemas/RabbitMQConfig"
568557
credentials:
569558
$ref: "#/components/schemas/RabbitMQCredentials"
570559
DestinationCreateHookdeck:
571560
type: object
572-
# Properties duplicated from DestinationCreateBase + specific required
573561
required: [type, topics, credentials] # No config
574562
properties:
575563
id:
@@ -579,16 +567,14 @@ components:
579567
type:
580568
type: string
581569
description: Type of the destination. Must be 'hookdeck'.
582-
enum: [hookdeck] # Specific type
570+
enum: [hookdeck]
583571
topics:
584572
$ref: "#/components/schemas/Topics"
585-
# Type-specific properties
586-
config: {} # Empty config
573+
config: {}
587574
credentials:
588575
$ref: "#/components/schemas/HookdeckCredentials"
589576
DestinationCreateAWSKinesis:
590577
type: object
591-
# Properties duplicated from DestinationCreateBase + specific required
592578
required: [type, topics, config, credentials]
593579
properties:
594580
id:
@@ -598,10 +584,9 @@ components:
598584
type:
599585
type: string
600586
description: Type of the destination. Must be 'aws_kinesis'.
601-
enum: [aws_kinesis] # Specific type
587+
enum: [aws_kinesis]
602588
topics:
603589
$ref: "#/components/schemas/Topics"
604-
# Type-specific properties
605590
config:
606591
$ref: "#/components/schemas/AWSKinesisConfig"
607592
credentials:
@@ -621,6 +606,8 @@ components:
621606
webhook: "#/components/schemas/DestinationCreateWebhook"
622607
aws_sqs: "#/components/schemas/DestinationCreateAWSSQS"
623608
rabbitmq: "#/components/schemas/DestinationCreateRabbitMQ"
609+
hookdeck: "#/components/schemas/DestinationCreateHookdeck"
610+
aws_kinesis: "#/components/schemas/DestinationCreateAWSKinesis"
624611

625612
# Type-Specific Destination Update Schemas (for Request Bodies)
626613
WebhookCredentialsUpdate:
@@ -645,7 +632,6 @@ components:
645632
properties:
646633
topics:
647634
$ref: "#/components/schemas/Topics"
648-
# Type-specific properties
649635
config:
650636
$ref: "#/components/schemas/WebhookConfig" # URL is required here, but PATCH means it's optional in the request
651637
credentials:
@@ -656,7 +642,6 @@ components:
656642
properties:
657643
topics:
658644
$ref: "#/components/schemas/Topics"
659-
# Type-specific properties
660645
config:
661646
$ref: "#/components/schemas/AWSSQSConfig" # queue_url is required here, but PATCH means it's optional
662647
credentials:
@@ -667,7 +652,6 @@ components:
667652
properties:
668653
topics:
669654
$ref: "#/components/schemas/Topics"
670-
# Type-specific properties
671655
config:
672656
$ref: "#/components/schemas/RabbitMQConfig" # server_url/exchange required here, but PATCH means optional
673657
credentials:
@@ -678,7 +662,6 @@ components:
678662
properties:
679663
topics:
680664
$ref: "#/components/schemas/Topics"
681-
# Type-specific properties
682665
config: {} # Empty config, cannot be updated
683666
credentials:
684667
$ref: "#/components/schemas/HookdeckCredentials" # token required here, but PATCH means optional
@@ -688,7 +671,6 @@ components:
688671
properties:
689672
topics:
690673
$ref: "#/components/schemas/Topics"
691-
# Type-specific properties
692674
config:
693675
$ref: "#/components/schemas/AWSKinesisConfig" # stream_name/region required here, but PATCH means optional
694676
credentials:

0 commit comments

Comments
 (0)