Skip to content

Commit

Permalink
feat: openapi generator generates reference grant (#6125)
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa authored Jul 10, 2024
1 parent 5be71f6 commit a2e0cc8
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions kubernetes-model-generator/openapi/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,20 @@ func main() {
reflect.TypeOf(apiextensionsV1Beta1.ValidationRule{}),
}, "apiextensions"),
NewPathSchema(map[reflect.Type]string{
reflect.TypeOf(gatewayApiV1.GatewayList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/gateways",
reflect.TypeOf(gatewayApiV1.Gateway{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/gateways/{name}",
reflect.TypeOf(gatewayApiV1.GatewayClassList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/gatewayclasses",
reflect.TypeOf(gatewayApiV1.GatewayClass{}): "/apis/" + gatewayApiV1.GroupName + "/v1/gatewayclasses/{name}",
reflect.TypeOf(gatewayApiV1.HTTPRouteList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/httproutes",
reflect.TypeOf(gatewayApiV1.HTTPRoute{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/httproutes/{name}",
reflect.TypeOf(gatewayApiV1Beta1.GatewayList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/gateways",
reflect.TypeOf(gatewayApiV1Beta1.Gateway{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/gateways/{name}",
reflect.TypeOf(gatewayApiV1Beta1.GatewayClassList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/gatewayclasses",
reflect.TypeOf(gatewayApiV1Beta1.GatewayClass{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/gatewayclasses/{name}",
reflect.TypeOf(gatewayApiV1Beta1.HTTPRouteList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/httproutes",
reflect.TypeOf(gatewayApiV1Beta1.HTTPRoute{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/httproutes/{name}",
reflect.TypeOf(gatewayApiV1.GatewayList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/gateways",
reflect.TypeOf(gatewayApiV1.Gateway{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/gateways/{name}",
reflect.TypeOf(gatewayApiV1.GatewayClassList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/gatewayclasses",
reflect.TypeOf(gatewayApiV1.GatewayClass{}): "/apis/" + gatewayApiV1.GroupName + "/v1/gatewayclasses/{name}",
reflect.TypeOf(gatewayApiV1.HTTPRouteList{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/httproutes",
reflect.TypeOf(gatewayApiV1.HTTPRoute{}): "/apis/" + gatewayApiV1.GroupName + "/v1/namespaces/{namespace}/httproutes/{name}",
reflect.TypeOf(gatewayApiV1Beta1.GatewayList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/gateways",
reflect.TypeOf(gatewayApiV1Beta1.Gateway{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/gateways/{name}",
reflect.TypeOf(gatewayApiV1Beta1.GatewayClassList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/gatewayclasses",
reflect.TypeOf(gatewayApiV1Beta1.GatewayClass{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/gatewayclasses/{name}",
reflect.TypeOf(gatewayApiV1Beta1.HTTPRouteList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/httproutes",
reflect.TypeOf(gatewayApiV1Beta1.HTTPRoute{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/httproutes/{name}",
reflect.TypeOf(gatewayApiV1Beta1.ReferenceGrantList{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/referencegrants",
reflect.TypeOf(gatewayApiV1Beta1.ReferenceGrant{}): "/apis/" + gatewayApiV1.GroupName + "/v1beta1/namespaces/{namespace}/referencegrants/{name}",
}, "gateway-api"),
}
generate(schemas, targetDirectory)
Expand Down

0 comments on commit a2e0cc8

Please sign in to comment.