Skip to content

Commit

Permalink
feat: [CDS-98275]: Add skipRepoValidation for gitops application (#534)
Browse files Browse the repository at this point in the history
* feat: [CDS-98275]: Add skipRepoValidation for gitops application

Signed-off-by: Mirko Teodorovic <[email protected]>

* feat: [CDS-98275]: Add skipRepoValidation for gitops application, update model

Signed-off-by: Mirko Teodorovic <[email protected]>

---------

Signed-off-by: Mirko Teodorovic <[email protected]>
  • Loading branch information
mteodor authored Jun 28, 2024
1 parent e7dd75c commit c8572fd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
16 changes: 13 additions & 3 deletions harness/nextgen/api_applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Creates application in project.
* @param "ProjectIdentifier" (optional.String) - Project Identifier for the Entity.
* @param "ClusterIdentifier" (optional.String) -
* @param "RepoIdentifier" (optional.String) -
* @param "SkipRepoValidation" (optional.Bool) -
@return Servicev1Application
*/

Expand All @@ -46,7 +47,8 @@ type ApplicationsApiAgentApplicationServiceCreateOpts struct {
OrgIdentifier optional.String
ProjectIdentifier optional.String
ClusterIdentifier optional.String
RepoIdentifier optional.String
RepoIdentifier optional.String
SkipRepoValidation optional.Bool
}

func (a *ApplicationsApiService) AgentApplicationServiceCreate(ctx context.Context, body ApplicationsApplicationCreateRequest, agentIdentifier string, localVarOptionals *ApplicationsApiAgentApplicationServiceCreateOpts) (Servicev1Application, *http.Response, error) {
Expand Down Expand Up @@ -82,6 +84,9 @@ func (a *ApplicationsApiService) AgentApplicationServiceCreate(ctx context.Conte
if localVarOptionals != nil && localVarOptionals.RepoIdentifier.IsSet() {
localVarQueryParams.Add("repoIdentifier", parameterToString(localVarOptionals.RepoIdentifier.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.SkipRepoValidation.IsSet() {
localVarQueryParams.Add("skipRepoValidation", parameterToString(localVarOptionals.SkipRepoValidation.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}

Expand Down Expand Up @@ -502,7 +507,7 @@ ApplicationsApiService Get returns an application by name
*/

type ApplicationsApiAgentApplicationServiceGetOpts struct {
QueryRefresh optional.String
QueryRefresh optional.String
QueryProject optional.Interface
QueryResourceVersion optional.String
QuerySelector optional.String
Expand Down Expand Up @@ -3033,12 +3038,14 @@ Update updates an application.
* @param optional nil or *ApplicationsApiAgentApplicationServiceUpdateOpts - Optional Parameters:
* @param "ClusterIdentifier" (optional.String) -
* @param "RepoIdentifier" (optional.String) -
* @param "SkipRepoValidation" (optional.Bool) -
@return Servicev1Application
*/

type ApplicationsApiAgentApplicationServiceUpdateOpts struct {
ClusterIdentifier optional.String
RepoIdentifier optional.String
SkipRepoValidation optional.Bool
}

func (a *ApplicationsApiService) AgentApplicationServiceUpdate(ctx context.Context, body ApplicationsApplicationUpdateRequest, accountIdentifier string, orgIdentifier string, projectIdentifier string, agentIdentifier string, requestApplicationMetadataName string, localVarOptionals *ApplicationsApiAgentApplicationServiceUpdateOpts) (Servicev1Application, *http.Response, error) {
Expand Down Expand Up @@ -3069,7 +3076,10 @@ func (a *ApplicationsApiService) AgentApplicationServiceUpdate(ctx context.Conte
if localVarOptionals != nil && localVarOptionals.RepoIdentifier.IsSet() {
localVarQueryParams.Add("repoIdentifier", parameterToString(localVarOptionals.RepoIdentifier.Value(), ""))
}
// to determine the Content-Type header
if localVarOptionals != nil && localVarOptionals.SkipRepoValidation.IsSet() {
localVarQueryParams.Add("skipRepoValidation", parameterToString(localVarOptionals.SkipRepoValidation.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}

// set Content-Type header
Expand Down
4 changes: 2 additions & 2 deletions harness/nextgen/docs/ApplicationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Name | Type | Description | Notes
**projectIdentifier** | **optional.**| Project Identifier for the Entity. |
**clusterIdentifier** | **optional.**| |
**repoIdentifier** | **optional.**| |

**skipRepoValidation** | **optional.**| |
### Return type

[**Servicev1Application**](servicev1Application.md)
Expand Down Expand Up @@ -961,7 +961,7 @@ Name | Type | Description | Notes

**clusterIdentifier** | **optional.**| |
**repoIdentifier** | **optional.**| |

**skipRepoValidation** | **optional.**| |
### Return type

[**Servicev1Application**](servicev1Application.md)
Expand Down
1 change: 1 addition & 0 deletions harness/nextgen/model_servicev1_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ type Servicev1Application struct {
CreatedAt time.Time `json:"createdAt,omitempty"`
LastModifiedAt time.Time `json:"lastModifiedAt,omitempty"`
Stale bool `json:"stale,omitempty"`
SkipRepoValidation bool `json:"skipRepoValidation,omitempty"`
}

0 comments on commit c8572fd

Please sign in to comment.