Error: failed to load base spec from <base> with error converting YAML to JSON: yaml: unmarshal errors
Closed this issue ยท 11 comments
Despite locally it works perfectly with .deb from https://github.com/Tufin/oasdiff/releases/tag/v1.9.6 and same base
and rev
files, in GitHub Action I get:
Error: failed to load base spec from "openapi/oh.yaml" with error converting YAML to JSON: yaml: unmarshal errors:
line 7991: mapping key "empty" already defined at line 7980
line 8048: mapping key "empty" already defined at line 8037
line 8107: mapping key "empty" already defined at line 8096
line 8159: mapping key "empty" already defined at line 8148
line 8216: mapping key "empty" already defined at line 8205
line 8287: mapping key "empty" already defined at line 8276
line 8344: mapping key "empty" already defined at line 8333
https://github.com/mwithi/openhospital-api/actions/runs/6936878852/job/18869869828#step:12:15
base: oh.yaml.txt (link)
rev: oh_rev.yaml.txt (link)
Note: I'm using my fork inspired by #19, but the error is the same with oasdiff/oasdiff-action/breaking@main
Despite locally it works perfectly with .deb from https://github.com/Tufin/oasdiff/releases/tag/v1.9.6 and same
base
andrev
files, in GitHub Action I get:Error: failed to load base spec from "openapi/oh.yaml" with error converting YAML to JSON: yaml: unmarshal errors: line 7991: mapping key "empty" already defined at line 7980 line 8048: mapping key "empty" already defined at line 8037 line 8107: mapping key "empty" already defined at line 8096 line 8159: mapping key "empty" already defined at line 8148 line 8216: mapping key "empty" already defined at line 8205 line 8287: mapping key "empty" already defined at line 8276 line 8344: mapping key "empty" already defined at line 8333
https://github.com/mwithi/openhospital-api/actions/runs/6936878852/job/18869869828#step:12:15
base: oh.yaml.txt (link) rev: oh_rev.yaml.txt (link)
Note: I'm using my fork inspired by #19, but the error is the same with
oasdiff/oasdiff-action/breaking@main
It is working for me, see:
- running action: https://github.com/oasdiff/oasdiff-action/actions/runs/6948164192
- PR including your specs: #22
- below the output from github:
Thank you @effoeffi, any hint? maybe my yamel is wrong? Do you see something not correct?
https://github.com/mwithi/openhospital-api/blob/test-OH2-246_base/.github/workflows/openapi.yml
Thanks
Thank you @effoeffi, any hint? maybe my yamel is wrong? Do you see something not correct? https://github.com/mwithi/openhospital-api/blob/test-OH2-246_base/.github/workflows/openapi.yml
Thanks
I did not check your fork.
May I ask, why do you prefer to work with a fork?
Hi @mwithi,
I noticed that the link to base
above downloads oh.yaml.txt while your GitHub action output shows that you are comparing openapi/oh.yaml
(not .txt).
Perhaps this is the problem?
Hi @mwithi, I noticed that the link to
base
above downloads oh.yaml.txt while your GitHub action output shows that you are comparingopenapi/oh.yaml
(not .txt). Perhaps this is the problem?
@reuvenharrison no, I've renamed them .txt because otherwise GitHub won't accept the upload
Thank you @effoeffi, any hint? maybe my yamel is wrong? Do you see something not correct? https://github.com/mwithi/openhospital-api/blob/test-OH2-246_base/.github/workflows/openapi.yml
ThanksI did not check your fork. May I ask, why do you prefer to work with a fork?
@effoeffi because I'm simulating contributions from other devs
@effoeffi Are these services still working? https://www.oasdiff.com/diff-as-a-service
@reuvenharrison should I open this issue in https://github.com/Tufin/oasdiff ?
Sorry my mistake: it turned out that the problem was in the base file initially provided in the repo and not in the generated revision which was really ok indeed. Lesson learnt: to always revise assumptions! ๐
Thank you all for the support and congrats for this great tool! ๐
@effoeffi Are these services still working? https://www.oasdiff.com/diff-as-a-service
@mwithi Yes it is working. Please, join our community in slack, we will continue the conversation in there
https://join.slack.com/t/oasdiff/shared_invite/zt-27l6y20xw-hcwzpcA7v8FobfRogTCgtg