2017-05-02 25 views
0

私のプロジェクト要件では、SwaggerでAPI仕様を記述することが求められます。私はこのチュートリアルを次のです:APIHandymanSwaggerで解析エラーを取得する

私はUIに次のYAMLに合格している:

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

私はいずれかを理解するだろうこれに関するポインタ。

+0

この仕様は有効です。 1)ページを保存して更新する。 2)先頭のインデントを削除し、行を手動で再インデントします。 – Helen

+1

ありがとう!!それはちょうどglitchyだったようです –

答えて

-1

また、このツールにあなたの闊歩をインポートしようとすることができます

https://apibldr.com

それはまた、あなたが視覚的にあなたのAPIの定義を構築できます。

関連する問題