cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger error : Structural error What should I modify?

Occasional Visitor

Swagger error : Structural error What should I modify?

 

I am building an API documentation, I`m new to programming in general and this is the first time I work in Swagger.

This is my code:

 

/stareMesaj:
post:
  tags:
    - Metode disponibile
  summary: Stare mesaj
  description: Call de verificat stare mesaj. More soon.
  operationId: stareMesaj
  responses:
    '200':
      description: Ultimele 60 zile -  Nu aveti drept de interogare     stare pentru mesaj
      headers:
        X-Rate-Limit:
          description: calls per hour allowed by the user
          schema:
            type: integer
            format: int32
        X-Expires-After:
          $ref: '#/components/headers/ExpiresAfter'
      content:
        application/json:
          schema:
            type: string
          examples:
            response:
              value: Hello world!
        application/xml:
          schema:
            type: string
        text/csv:
          schema:
            type: string

On the responses tag I get the following error:

 

Structural error at paths./stareMesaj.post.responses
should only have three-digit status codes, `default`, and vendor      extensions (`x-*`) as properties
Jump to line 395

What is the problem here ?

 

Thanks in advance

New Here?
Join us and watch the welcome video:
Watch the new Interview