diff --git a/docs/schema/v0/flag_manifest.json b/docs/schema/v0/flag_manifest.json index 0adceb6..da02e97 100644 --- a/docs/schema/v0/flag_manifest.json +++ b/docs/schema/v0/flag_manifest.json @@ -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": { @@ -57,11 +57,11 @@ "stringType": { "type": "object", "properties": { - "flag_type": { + "flagType": { "type": "string", "enum": ["string"] }, - "default_value": { + "defaultValue": { "type": "string" }, "description": { @@ -73,11 +73,11 @@ "integerType": { "type": "object", "properties": { - "flag_type": { + "flagType": { "type": "string", "enum": ["integer"] }, - "default_value": { + "defaultValue": { "type": "integer" }, "description": { @@ -89,11 +89,11 @@ "floatType": { "type": "object", "properties": { - "flag_type": { + "flagType": { "type": "string", "enum": ["float"] }, - "default_value": { + "defaultValue": { "type": "number" }, "description": { @@ -105,11 +105,11 @@ "objectType": { "type": "object", "properties": { - "flag_type": { + "flagType": { "type": "string", "enum": ["object"] }, - "default_value": { + "defaultValue": { "type": "object" }, "description": { diff --git a/src/input.json b/src/input.json deleted file mode 100644 index 791dfec..0000000 --- a/src/input.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "flags": { - "myOpenFeatureFlag":{ - "flag_type": "boolean", - "default_value": false, - "description": "This is a flag." - } - } -} \ No newline at end of file diff --git a/src/main.go b/src/main.go index adc3075..bfc8051 100644 --- a/src/main.go +++ b/src/main.go @@ -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,