infobloxopen / seal

Apache License 2.0
16 stars 11 forks source link

GH-119: Return offending swagger yaml in error msg on yaml unmarshal error #120

Closed rchowinfoblox closed 3 years ago

rchowinfoblox commented 3 years ago

DEMO: FATA[0000] could not create policy compiler error="Swagger yaml unmarshal error: error converting YAML to JSON: yaml: line 12: mapping values are not allowed in this context:\n# This is a bad swagger, there should be no \"none\" after \"bad.widget:\"\nopenapi: \"3.0.0\"\ncomponents:\n schemas:\n allow:\n type: object\n properties:\n notify:\n type: boolean\n x-seal-type: action\n bad.widget: none\n x-seal-default-action: allow\n x-seal-actions:\n - allow\n x-seal-verbs:\n - throw\n - swim\n type: object\n properties:\n id:\n type: string\n name:\n type: string\n\n"