Skip to content

Commit 6673cdf

Browse files
committed
fix(api): ingress events path param
1 parent 3053c5b commit 6673cdf

File tree

3 files changed

+44
-42
lines changed

3 files changed

+44
-42
lines changed

Diff for: modules/api/pkg/handler/apihandler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ func CreateHTTPAPIHandler(iManager integration.Manager) (*restful.Container, err
775775
Writes(ingress.IngressDetail{}).
776776
Returns(http.StatusOK, "OK", ingress.IngressDetail{}))
777777
apiV1Ws.Route(
778-
apiV1Ws.GET("/ingress/{namespace}/{name}/event").To(apiHandler.handleGetIngressEvent).
778+
apiV1Ws.GET("/ingress/{namespace}/{ingress}/event").To(apiHandler.handleGetIngressEvent).
779779
// docs
780780
Doc("returns a list of Events for Ingress").
781781
Param(apiV1Ws.PathParameter("namespace", "namespace of the Ingress")).

Diff for: modules/api/schema/swagger.json

+34-34
Original file line numberDiff line numberDiff line change
@@ -3680,16 +3680,16 @@
36803680
}
36813681
}
36823682
},
3683-
"/api/v1/ingress/{namespace}/{name}": {
3683+
"/api/v1/ingress/{namespace}/{ingress}/event": {
36843684
"get": {
36853685
"consumes": [
36863686
"application/json"
36873687
],
36883688
"produces": [
36893689
"application/json"
36903690
],
3691-
"summary": "returns detailed information about Ingress",
3692-
"operationId": "handleGetIngressDetail",
3691+
"summary": "returns a list of Events for Ingress",
3692+
"operationId": "handleGetIngressEvent",
36933693
"parameters": [
36943694
{
36953695
"type": "string",
@@ -3737,7 +3737,7 @@
37373737
{
37383738
"type": "string",
37393739
"description": "name of the Ingress",
3740-
"name": "name",
3740+
"name": "ingress",
37413741
"in": "path",
37423742
"required": true
37433743
}
@@ -3746,22 +3746,22 @@
37463746
"200": {
37473747
"description": "OK",
37483748
"schema": {
3749-
"$ref": "#/definitions/ingress.IngressDetail"
3749+
"$ref": "#/definitions/common.EventList"
37503750
}
37513751
}
37523752
}
37533753
}
37543754
},
3755-
"/api/v1/ingress/{namespace}/{name}/event": {
3755+
"/api/v1/ingress/{namespace}/{name}": {
37563756
"get": {
37573757
"consumes": [
37583758
"application/json"
37593759
],
37603760
"produces": [
37613761
"application/json"
37623762
],
3763-
"summary": "returns a list of Events for Ingress",
3764-
"operationId": "handleGetIngressEvent",
3763+
"summary": "returns detailed information about Ingress",
3764+
"operationId": "handleGetIngressDetail",
37653765
"parameters": [
37663766
{
37673767
"type": "string",
@@ -3809,7 +3809,7 @@
38093809
{
38103810
"type": "string",
38113811
"description": "name of the Ingress",
3812-
"name": "ingress",
3812+
"name": "name",
38133813
"in": "path",
38143814
"required": true
38153815
}
@@ -3818,7 +3818,7 @@
38183818
"200": {
38193819
"description": "OK",
38203820
"schema": {
3821-
"$ref": "#/definitions/common.EventList"
3821+
"$ref": "#/definitions/ingress.IngressDetail"
38223822
}
38233823
}
38243824
}
@@ -9540,8 +9540,8 @@
95409540
},
95419541
"clusterrole.ClusterRoleDetail": {
95429542
"required": [
9543-
"objectMeta",
95449543
"typeMeta",
9544+
"objectMeta",
95459545
"rules",
95469546
"errors"
95479547
],
@@ -10040,13 +10040,13 @@
1004010040
},
1004110041
"cronjob.CronJobDetail": {
1004210042
"required": [
10043-
"objectMeta",
10044-
"typeMeta",
10045-
"schedule",
1004610043
"suspend",
1004710044
"active",
1004810045
"lastSchedule",
1004910046
"containerImages",
10047+
"objectMeta",
10048+
"typeMeta",
10049+
"schedule",
1005010050
"concurrencyPolicy",
1005110051
"startingDeadlineSeconds",
1005210052
"errors"
@@ -10396,11 +10396,11 @@
1039610396
},
1039710397
"deployment.DeploymentDetail": {
1039810398
"required": [
10399+
"pods",
1039910400
"containerImages",
1040010401
"initContainerImages",
1040110402
"objectMeta",
1040210403
"typeMeta",
10403-
"pods",
1040410404
"selector",
1040510405
"statusInfo",
1040610406
"conditions",
@@ -10715,13 +10715,13 @@
1071510715
},
1071610716
"horizontalpodautoscaler.HorizontalPodAutoscalerDetail": {
1071710717
"required": [
10718-
"targetCPUUtilizationPercentage",
1071910718
"objectMeta",
1072010719
"typeMeta",
1072110720
"scaleTargetRef",
1072210721
"minReplicas",
1072310722
"maxReplicas",
1072410723
"currentCPUUtilizationPercentage",
10724+
"targetCPUUtilizationPercentage",
1072510725
"currentReplicas",
1072610726
"desiredReplicas",
1072710727
"lastScaleTime"
@@ -10998,13 +10998,13 @@
1099810998
},
1099910999
"job.JobDetail": {
1100011000
"required": [
11001-
"initContainerImages",
1100211001
"parallelism",
1100311002
"jobStatus",
1100411003
"objectMeta",
1100511004
"typeMeta",
1100611005
"podInfo",
1100711006
"containerImages",
11007+
"initContainerImages",
1100811008
"completions",
1100911009
"errors"
1101011010
],
@@ -11254,9 +11254,9 @@
1125411254
},
1125511255
"namespace.NamespaceDetail": {
1125611256
"required": [
11257+
"objectMeta",
1125711258
"typeMeta",
1125811259
"phase",
11259-
"objectMeta",
1126011260
"resourceQuotaList",
1126111261
"resourceLimits",
1126211262
"errors"
@@ -11498,10 +11498,10 @@
1149811498
},
1149911499
"node.NodeDetail": {
1150011500
"required": [
11501-
"ready",
11502-
"allocatedResources",
1150311501
"objectMeta",
1150411502
"typeMeta",
11503+
"ready",
11504+
"allocatedResources",
1150511505
"phase",
1150611506
"podCIDR",
1150711507
"providerID",
@@ -11674,15 +11674,15 @@
1167411674
},
1167511675
"persistentvolume.PersistentVolumeDetail": {
1167611676
"required": [
11677-
"claim",
11678-
"objectMeta",
1167911677
"capacity",
11680-
"reclaimPolicy",
11681-
"storageClass",
11678+
"accessModes",
1168211679
"mountOptions",
1168311680
"status",
11681+
"objectMeta",
1168411682
"typeMeta",
11685-
"accessModes",
11683+
"reclaimPolicy",
11684+
"storageClass",
11685+
"claim",
1168611686
"reason",
1168711687
"message",
1168811688
"persistentVolumeSource"
@@ -11801,13 +11801,13 @@
1180111801
},
1180211802
"persistentvolumeclaim.PersistentVolumeClaimDetail": {
1180311803
"required": [
11804-
"storageClass",
11805-
"objectMeta",
11806-
"typeMeta",
1180711804
"status",
1180811805
"volume",
1180911806
"capacity",
11810-
"accessModes"
11807+
"accessModes",
11808+
"storageClass",
11809+
"objectMeta",
11810+
"typeMeta"
1181111811
],
1181211812
"properties": {
1181311813
"accessModes": {
@@ -12350,11 +12350,11 @@
1235012350
},
1235112351
"replicationcontroller.ReplicationControllerDetail": {
1235212352
"required": [
12353-
"containerImages",
1235412353
"initContainerImages",
1235512354
"objectMeta",
1235612355
"typeMeta",
1235712356
"podInfo",
12357+
"containerImages",
1235812358
"labelSelector",
1235912359
"errors"
1236012360
],
@@ -12623,8 +12623,8 @@
1262312623
},
1262412624
"rolebinding.RoleBindingDetail": {
1262512625
"required": [
12626-
"objectMeta",
1262712626
"typeMeta",
12627+
"objectMeta",
1262812628
"roleRef",
1262912629
"errors"
1263012630
],
@@ -12849,13 +12849,13 @@
1284912849
},
1285012850
"service.ServiceDetail": {
1285112851
"required": [
12852-
"type",
12853-
"clusterIP",
1285412852
"objectMeta",
1285512853
"typeMeta",
1285612854
"internalEndpoint",
1285712855
"externalEndpoints",
1285812856
"selector",
12857+
"type",
12858+
"clusterIP",
1285912859
"endpointList",
1286012860
"sessionAffinity",
1286112861
"errors"
@@ -13175,12 +13175,12 @@
1317513175
},
1317613176
"types.CustomResourceDefinitionDetail": {
1317713177
"required": [
13178-
"established",
1317913178
"objectMeta",
1318013179
"typeMeta",
1318113180
"group",
1318213181
"scope",
1318313182
"names",
13183+
"established",
1318413184
"conditions",
1318513185
"objects",
1318613186
"subresources",

Diff for: modules/web/schema/schema.graphql

+9-7
Original file line numberDiff line numberDiff line change
@@ -666,12 +666,12 @@ type Query {
666666
"""namespace of the Ingress"""
667667
namespace: String!
668668
): ingress_IngressList @httpOperation(subgraph: "api", path: "/api/v1/ingress", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}") @httpOperation(subgraph: "api", path: "/api/v1/ingress/{args.namespace}", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}")
669-
"""returns detailed information about Ingress"""
670-
handleGetIngressDetail(
669+
"""returns a list of Events for Ingress"""
670+
handleGetIngressEvent(
671671
"""namespace of the Ingress"""
672672
namespace: String!
673673
"""name of the Ingress"""
674-
name: String!
674+
ingress: String!
675675
"""
676676
Comma delimited string used to apply filtering: 'propertyName,filterValue'
677677
"""
@@ -686,11 +686,13 @@ type Query {
686686
metricNames: String
687687
"""Aggregations to be performed for each metric (default: sum)"""
688688
aggregations: String
689-
): ingress_IngressDetail @httpOperation(subgraph: "api", path: "/api/v1/ingress/{args.namespace}/{args.name}", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}")
690-
"""returns a list of Events for Ingress"""
691-
handleGetIngressEvent(
689+
): common_EventList @httpOperation(subgraph: "api", path: "/api/v1/ingress/{args.namespace}/{args.ingress}/event", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}")
690+
"""returns detailed information about Ingress"""
691+
handleGetIngressDetail(
692692
"""namespace of the Ingress"""
693693
namespace: String!
694+
"""name of the Ingress"""
695+
name: String!
694696
"""
695697
Comma delimited string used to apply filtering: 'propertyName,filterValue'
696698
"""
@@ -705,7 +707,7 @@ type Query {
705707
metricNames: String
706708
"""Aggregations to be performed for each metric (default: sum)"""
707709
aggregations: String
708-
): common_EventList @httpOperation(subgraph: "api", path: "/api/v1/ingress/{args.namespace}/{name}/event", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}")
710+
): ingress_IngressDetail @httpOperation(subgraph: "api", path: "/api/v1/ingress/{args.namespace}/{args.name}", operationSpecificHeaders: "{\"Content-Type\":\"application/json\",\"Accept\":\"application/json\"}", httpMethod: GET, queryParamArgMap: "{\"filterBy\":\"filterBy\",\"sortBy\":\"sortBy\",\"itemsPerPage\":\"itemsPerPage\",\"page\":\"page\",\"metricNames\":\"metricNames\",\"aggregations\":\"aggregations\"}")
709711
"""returns a list of IngressClasses"""
710712
handleGetIngressClassList(
711713
"""

0 commit comments

Comments
 (0)