Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion api/v1alpha1/l7api_types.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2025 Broadcom Inc. and its subsidiaries. All Rights Reserved.
// Copyright (c) 2026 Broadcom Inc. and its subsidiaries. All Rights Reserved.
// AI assistance has been used to generate some or all contents of this file. That includes, but is not limited to, new code, modifying existing code, stylistic edits.

package v1alpha1

Expand Down Expand Up @@ -74,13 +75,27 @@ type PortalMeta struct {
CreateTs int `json:"createTs,omitempty"`
ModifyTs int `json:"modifyTs,omitempty"`
SsgServiceType string `json:"ssgServiceType,omitempty"`
HttpMethods []HttpMethod `json:"httpMethods,omitempty"`
Comment thread
jb683638 marked this conversation as resolved.
PolicyTemplates []PolicyTemplate `json:"policyEntities,omitempty"`
CustomFields []CustomField `json:"customFieldValues,omitempty"`
SecurePasswords []SecurePassword `json:"securePasswords,omitempty"`
SecurePasswordIdsForUndeployment []string `json:"securePasswordIdsForUndeployment,omitempty"`
Checksum string `json:"checksum,omitempty"`
}

type HttpMethod string

const (
HttpMethodGet HttpMethod = "GET"
HttpMethodPost HttpMethod = "POST"
HttpMethodPut HttpMethod = "PUT"
HttpMethodPatch HttpMethod = "PATCH"
HttpMethodDelete HttpMethod = "DELETE"
HttpMethodHead HttpMethod = "HEAD"
HttpMethodOptions HttpMethod = "OPTIONS"
HttpMethodOther HttpMethod = "OTHER"
Comment thread
jb683638 marked this conversation as resolved.
)

type PolicyTemplate struct {
Uuid string `json:"policyEntityUuid"`
ApiPolicyTemplateArguments []PolicyTemplateArg `json:"policyTemplateArguments"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions bundle/manifests/security.brcmlabs.com_l7apis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
type: array
enabled:
type: boolean
httpMethods:
items:
type: string
type: array
locationUrl:
type: string
modifyTs:
Expand Down
4 changes: 4 additions & 0 deletions charts/layer7-operator/crds/l7api-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ spec:
type: array
enabled:
type: boolean
httpMethods:
items:
type: string
type: array
locationUrl:
type: string
modifyTs:
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/security.brcmlabs.com_l7apis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ spec:
type: array
enabled:
type: boolean
httpMethods:
items:
type: string
type: array
locationUrl:
type: string
modifyTs:
Expand Down
4 changes: 4 additions & 0 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6976,6 +6976,10 @@ spec:
type: array
enabled:
type: boolean
httpMethods:
items:
type: string
type: array
locationUrl:
type: string
modifyTs:
Expand Down
9 changes: 8 additions & 1 deletion internal/templategen/portal-api-restman-template.qtpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
----------------------------------------------
Copyright (c) 2026 Broadcom Inc. and its subsidiaries. All Rights Reserved.
AI assistance has been used to generate some or all contents of this file. That includes, but is not limited to, new code, modifying existing code, stylistic edits.


Variables Used:
Expand All @@ -10,6 +12,7 @@ Variables Used:
- portalApi.ApiEnabled
- portalApi.ModifyTs
- portalApi.CustomFields
- portalApi.HttpMethods
- apiServiceXml
- apiFragmentXml
- isSoapAPI
Expand Down Expand Up @@ -59,7 +62,11 @@ Variables Used:
<l7:HttpMapping>
<l7:UrlPattern>/{%s portalApi.SsgUrl %}</l7:UrlPattern>
<l7:Verbs>
{% if isSoapApi == "true" %}
{% if len(portalApi.HttpMethods) > 0 %}
{% for _, verb := range portalApi.HttpMethods %}
<l7:Verb>{%s verb %}</l7:Verb>
{% endfor %}
{% elseif isSoapApi == "true" %}
<l7:Verb>GET</l7:Verb>
<l7:Verb>POST</l7:Verb>
{% else %}
Expand Down
Loading