0

For the content in the yaml file which is as below I can't figure out why sonarqube is throwing an issue saying that "missing document start "---" (document-start) " highlighting swagger:'2.0'.

swagger: '2.0'
info:
  title: Sample API
  description: API description in Markdown.
  version: 1.0.0
paths:
 /users:
    get:
        summary: Returns a list of users.
        description: Optional extended description in Markdown.
        produces:
                  - application/json
                  responses:
HiteshB
  • 1
  • 2
  • Yaml file starts with `---` to mark the beginning of file. Though it is not needed everyone as it can run without it but it is good to have for yaml parser implementers. More details here: https://stackoverflow.com/questions/50788277/why-3-dashes-hyphen-in-yaml-file – Sourav Jun 11 '21 at 02:09
  • Just add the `---` to the beginning of yaml file and run the sonar analysis. – Sourav Jun 11 '21 at 02:09

0 Answers0