Skip to content

Commit

Permalink
refactor: change property names to camel case
Browse files Browse the repository at this point in the history
format #2

Signed-off-by: Florin-Mihai Anghel <fanghel@google.com>
  • Loading branch information
anghelflorinm committed Oct 1, 2024
1 parent a5059d0 commit 01240cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions docs/schema/v0/flag_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
"$ref": "#/$defs/objectType"
}
],
"required": ["flag_type", "default_value"]
"required": ["flagType", "defaultValue"]
},
"booleanType": {
"type": "object",
"properties": {
"flag_type": {
"flagType": {
"type": "string",
"enum": ["boolean"]
},
"default_value": {
"defaultValue": {
"type": "boolean"
},
"description": {
Expand All @@ -57,11 +57,11 @@
"stringType": {
"type": "object",
"properties": {
"flag_type": {
"flagType": {
"type": "string",
"enum": ["string"]
},
"default_value": {
"defaultValue": {
"type": "string"
},
"description": {
Expand All @@ -73,11 +73,11 @@
"integerType": {
"type": "object",
"properties": {
"flag_type": {
"flagType": {
"type": "string",
"enum": ["integer"]
},
"default_value": {
"defaultValue": {
"type": "integer"
},
"description": {
Expand All @@ -89,11 +89,11 @@
"floatType": {
"type": "object",
"properties": {
"flag_type": {
"flagType": {
"type": "string",
"enum": ["float"]
},
"default_value": {
"defaultValue": {
"type": "number"
},
"description": {
Expand All @@ -105,11 +105,11 @@
"objectType": {
"type": "object",
"properties": {
"flag_type": {
"flagType": {
"type": "string",
"enum": ["object"]
},
"default_value": {
"defaultValue": {
"type": "object"
},
"description": {
Expand Down
4 changes: 2 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ func unmarshalFlagManifest(data []byte, supportedFlagTypes map[generator.FlagTyp
}
for flagKey, iFlagData := range flags {
flagData := iFlagData.(map[string]interface{})
flagTypeString := flagData["flag_type"].(string)
flagTypeString := flagData["flagType"].(string)
flagType := stringToFlagType[flagTypeString]
if !supportedFlagTypes[flagType] {
log.Printf("Skipping generation of flag %q as type %v is not supported for this language", flagKey, flagTypeString)
continue
}
docs := flagData["description"].(string)
defaultValue := getDefaultValue(flagData["default_value"], flagType)
defaultValue := getDefaultValue(flagData["defaultValue"], flagType)
btData.Flags = append(btData.Flags, &generator.FlagTmplData{
Name: flagKey,
Type: flagType,
Expand Down

0 comments on commit 01240cc

Please sign in to comment.