2017-05-02 7 views
0

프로젝트 요구 사항은 Swagger로 API 사양을 작성해야합니다.Swagger로 구문 분석 오류 받기

swagger: '2.0' 

info: 
    version: '1.0.0' 
    title: 'Simple API' 
    description: 'A simple API to learn how to write OPEN API Specificaiton' 

# Added by API Auto Mocking Plugin 
host: virtserver.swaggerhub.com 
basePath: /xxxxxxx/Simple_API/1.0.0 
schemes: 
- https 

paths: 
    /persons: 
    get: 
     summary: Gets some persons 
     description: Returns a list containing all persons. 
     responses: 
     200: 
      description: A list of Person 
      schema: 
      type: array 
      items: 
       required: 
       - username 
       properties: 
       firstName: 
        type: string 
       lastName: 
        type: string 
       username: 
        type: string 

내가 컴파일러에서이 오류를 얻고있다 :

enter image description here

내가 어떤 감사합니다 나는 UI에 다음 YAML을 통과 APIHandyman

:이 자습서를 따라하고 이것에 대한 포인터.

+0

사양이 유효합니다. 시도 할 것 : 1) 페이지 저장 및 새로 고침; 2) 선행 들여 쓰기를 삭제하고 행을 수동으로 다시 들여 쓰기하십시오. – Helen

+1

감사합니다 !! 그것이 단지 glitchy 인 것처럼 보인다 –

답변

-1

또한이 도구로 자신감을 가져 오려고 할 수는 :

https://apibldr.com

그것은 또한 당신이 시각적으로 API 정의를 구축 할 것입니다.