Skip to content

Commit 79bbc9b

Browse files
fix: remove TODO comment from Envelope struct
Signed-off-by: mohamed-ben-khemis <[email protected]>
1 parent 04e1242 commit 79bbc9b

File tree

4 files changed

+10
-54
lines changed

4 files changed

+10
-54
lines changed

workspaces/backend/api/helpers.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
// NOTE: error responses use the ErrorEnvelope type
2929
type Envelope[D any] struct {
3030
// TODO: make all declarations of Envelope use pointers for D
31+
3132
Data D `json:"data"`
3233
}
3334

workspaces/backend/openapi/docs.go

+3-21
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ const docTemplate = `{
571571
"type": "object",
572572
"properties": {
573573
"data": {
574-
"description": "TODO: make all declarations of Envelope use pointers for D",
575574
"type": "array",
576575
"items": {
577576
"$ref": "#/definitions/namespaces.Namespace"
@@ -597,46 +596,30 @@ const docTemplate = `{
597596
"type": "object",
598597
"properties": {
599598
"data": {
600-
"description": "TODO: make all declarations of Envelope use pointers for D",
601-
"allOf": [
602-
{
603-
"$ref": "#/definitions/workspaces.WorkspaceCreate"
604-
}
605-
]
599+
"$ref": "#/definitions/workspaces.WorkspaceCreate"
606600
}
607601
}
608602
},
609603
"api.WorkspaceEnvelope": {
610604
"type": "object",
611605
"properties": {
612606
"data": {
613-
"description": "TODO: make all declarations of Envelope use pointers for D",
614-
"allOf": [
615-
{
616-
"$ref": "#/definitions/workspaces.Workspace"
617-
}
618-
]
607+
"$ref": "#/definitions/workspaces.Workspace"
619608
}
620609
}
621610
},
622611
"api.WorkspaceKindEnvelope": {
623612
"type": "object",
624613
"properties": {
625614
"data": {
626-
"description": "TODO: make all declarations of Envelope use pointers for D",
627-
"allOf": [
628-
{
629-
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
630-
}
631-
]
615+
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
632616
}
633617
}
634618
},
635619
"api.WorkspaceKindListEnvelope": {
636620
"type": "object",
637621
"properties": {
638622
"data": {
639-
"description": "TODO: make all declarations of Envelope use pointers for D",
640623
"type": "array",
641624
"items": {
642625
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
@@ -648,7 +631,6 @@ const docTemplate = `{
648631
"type": "object",
649632
"properties": {
650633
"data": {
651-
"description": "TODO: make all declarations of Envelope use pointers for D",
652634
"type": "array",
653635
"items": {
654636
"$ref": "#/definitions/workspaces.Workspace"

workspaces/backend/openapi/swagger.json

+3-21
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@
569569
"type": "object",
570570
"properties": {
571571
"data": {
572-
"description": "TODO: make all declarations of Envelope use pointers for D",
573572
"type": "array",
574573
"items": {
575574
"$ref": "#/definitions/namespaces.Namespace"
@@ -595,46 +594,30 @@
595594
"type": "object",
596595
"properties": {
597596
"data": {
598-
"description": "TODO: make all declarations of Envelope use pointers for D",
599-
"allOf": [
600-
{
601-
"$ref": "#/definitions/workspaces.WorkspaceCreate"
602-
}
603-
]
597+
"$ref": "#/definitions/workspaces.WorkspaceCreate"
604598
}
605599
}
606600
},
607601
"api.WorkspaceEnvelope": {
608602
"type": "object",
609603
"properties": {
610604
"data": {
611-
"description": "TODO: make all declarations of Envelope use pointers for D",
612-
"allOf": [
613-
{
614-
"$ref": "#/definitions/workspaces.Workspace"
615-
}
616-
]
605+
"$ref": "#/definitions/workspaces.Workspace"
617606
}
618607
}
619608
},
620609
"api.WorkspaceKindEnvelope": {
621610
"type": "object",
622611
"properties": {
623612
"data": {
624-
"description": "TODO: make all declarations of Envelope use pointers for D",
625-
"allOf": [
626-
{
627-
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
628-
}
629-
]
613+
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
630614
}
631615
}
632616
},
633617
"api.WorkspaceKindListEnvelope": {
634618
"type": "object",
635619
"properties": {
636620
"data": {
637-
"description": "TODO: make all declarations of Envelope use pointers for D",
638621
"type": "array",
639622
"items": {
640623
"$ref": "#/definitions/workspacekinds.WorkspaceKind"
@@ -646,7 +629,6 @@
646629
"type": "object",
647630
"properties": {
648631
"data": {
649-
"description": "TODO: make all declarations of Envelope use pointers for D",
650632
"type": "array",
651633
"items": {
652634
"$ref": "#/definitions/workspaces.Workspace"

workspaces/backend/openapi/swagger.yaml

+3-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ definitions:
2424
api.NamespaceListEnvelope:
2525
properties:
2626
data:
27-
description: 'TODO: make all declarations of Envelope use pointers for D'
2827
items:
2928
$ref: '#/definitions/namespaces.Namespace'
3029
type: array
@@ -41,36 +40,28 @@ definitions:
4140
api.WorkspaceCreateEnvelope:
4241
properties:
4342
data:
44-
allOf:
45-
- $ref: '#/definitions/workspaces.WorkspaceCreate'
46-
description: 'TODO: make all declarations of Envelope use pointers for D'
43+
$ref: '#/definitions/workspaces.WorkspaceCreate'
4744
type: object
4845
api.WorkspaceEnvelope:
4946
properties:
5047
data:
51-
allOf:
52-
- $ref: '#/definitions/workspaces.Workspace'
53-
description: 'TODO: make all declarations of Envelope use pointers for D'
48+
$ref: '#/definitions/workspaces.Workspace'
5449
type: object
5550
api.WorkspaceKindEnvelope:
5651
properties:
5752
data:
58-
allOf:
59-
- $ref: '#/definitions/workspacekinds.WorkspaceKind'
60-
description: 'TODO: make all declarations of Envelope use pointers for D'
53+
$ref: '#/definitions/workspacekinds.WorkspaceKind'
6154
type: object
6255
api.WorkspaceKindListEnvelope:
6356
properties:
6457
data:
65-
description: 'TODO: make all declarations of Envelope use pointers for D'
6658
items:
6759
$ref: '#/definitions/workspacekinds.WorkspaceKind'
6860
type: array
6961
type: object
7062
api.WorkspaceListEnvelope:
7163
properties:
7264
data:
73-
description: 'TODO: make all declarations of Envelope use pointers for D'
7465
items:
7566
$ref: '#/definitions/workspaces.Workspace'
7667
type: array

0 commit comments

Comments
 (0)