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
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
9 changes: 0 additions & 9 deletions src/input.json

This file was deleted.

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