Forum Discussion

dipakm's avatar
dipakm
Occasional Visitor
4 years ago
Solved

Getting error in swaggger editor for valid YAML

I have following yaml which I was trying to use in swagger editor.      swagger: '2.0' info: title: API specification license: name: 'This is my API.' description: Sample API version:...
  • HKosova's avatar
    4 years ago

    The indentation is wrong. The lines starting from "get:" and until "definitions:" should have an extra indent. In other words, get should be inside '/endpoint'.

     

    # Correct
    paths:
      '/endpoint':
        get:   # <---------
          ...