2016-10-27 2 views
0

Implementation NotesDescription을 내 Swagger UI에 추가하려고합니다. 다음과 같이 구현 그러나 어느 쪽도 UI에 표시되지 :Swagger UI에 구현 노트 및 설명 추가

{ 
"swagger" : "2.0", 
"info" : { 
    "description" : "The definition of the Rest API to service plugin over https on port 9443.", 
    "version" : "1.0", 
    "title" : "Plugin Rest API", 
    "contact" : { 
     "name" : "John Doe", 
     "email" : "[email protected]" 
    } 
}, 
"basePath" : "/service", 
"tags" : [ { 
    "name" : "service" 
    } ], 
"schemes" : [ "https" ], 
"paths" : { 
"/entry" : { 
    "get" : { 
     "notes" : "This is a note", 
     "method" : "get", 
     "tags" : [ "service" ], 
     "summary" : "Get an entry by first name and last name", 
     "description" : "This is a description", 
     "operationId" : "getEntry", 
     "produces" : [ "application/xml", "application/json" ], 
     "parameters" : [ { 
      "name" : "first", 
      "in" : "query", 
      "description" : "The first name", 
      "required" : true, 
      "type" : "string" 
     }, { 
     "name" : "last", 
     "in" : "query", 
     "description" : "The last name", 
     "required" : true, 
     "type" : "string" 
    } ], 
    "responses" : { 
     "200" : { 
     "description" : "Matching entry, or entries, if any, were returned", 
     "schema" : { 
      "$ref" : "#/definitions/Service" 
     } 
     } 
    } 
    }, 

나는 내 코드에서 잘못하고있는 무슨 확실하지 않다. 다양한 샘플 swagger.json 파일에서 테스트 해 보았는데 제대로 작동하지 않는 것 같습니다.

+0

표시되지 않는 필드는 무엇입니까? 요약, 설명 등? – fehguy

+0

설명 및 메모 @fehguy – SVN600

답변

1

노트는 멋진 필드가 아닙니다. documentation

설명 필드가 두 번째로 기록되므로 첫 번째 필드가 재정의되었습니다.