diff --git a/cli/src/Cli.elm b/cli/src/Cli.elm index 3edd567..d20f9c1 100644 --- a/cli/src/Cli.elm +++ b/cli/src/Cli.elm @@ -876,7 +876,7 @@ decodeMaybeYaml oasPath input = Ok jsonFromYaml else - case Yaml.Decode.fromString yamlToJsonValueDecoder input of + case Yaml.Decode.fromString yamlToJsonValueDecoder (input++"\n") of Err yamlError -> -- If it errored out, it might be valid JSON that the yaml parser can't handle case Json.Decode.decodeString Json.Value.decoder input of @@ -899,6 +899,7 @@ decodeMaybeYaml oasPath input = Ok decoded -> Ok decoded + Ok jsonFromYaml -> Ok jsonFromYaml