Skip to content

Commit

Permalink
add config for search deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinBettati committed Oct 17, 2024
1 parent 5fb9add commit db24b5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,5 @@ jira-release-version:
go run ./tools/jira-release-version/*.go

.PHONY: generate-schema
generate-schema:
generate-schema: # resource_name is optional, if not provided all configured resources will be generated
@go run ./tools/codegen/main.go $(resource_name)
10 changes: 0 additions & 10 deletions tools/codegen/codespec/string_case.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package codespec

import (
"regexp"
"strings"
)

Expand All @@ -25,12 +24,3 @@ func (snake SnakeCaseString) PascalCase() string {
func (snake SnakeCaseString) LowerCaseNoUnderscore() string {
return strings.ReplaceAll(string(snake), "_", "")
}

func ValidateSnakeCase(s string) bool {
snakeCaseRegex := `^[a-z]+(_[a-z]+)*$`
matched, err := regexp.MatchString(snakeCaseRegex, s)
if err != nil {
return false
}
return matched
}
13 changes: 13 additions & 0 deletions tools/codegen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@ resources:
computed: true

timeouts: ["create", "read", "delete"]

search_deployment:
read:
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment
method: GET
create:
path: /api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment
method: POST
schema:
aliases:
group_id: project_id
ignores: ["links"]
timeouts: ["create", "read", "delete"]

0 comments on commit db24b5d

Please sign in to comment.