방금 완료 한 마법사 (dropwizard.io) &을 방금 완성했습니다. 이 샘플 앱에 Swagger (swagger.io)를 통합하고 싶습니다. 내가 발견Dropwizard에 통합 된 Swagger
- github.com/federecio/dropwizard-swagger-sample-app
생성 된 JSON은 매우 유사한 것으로 보인다
이미지 (i.stack.imgur.com/QzhPa.png)
를 사용했다 제 접근법에서 잘못된 점을 제게 말해 줄 수 있습니까? 대단히 감사합니다. https://github.com/geoHeil/dropwizardSwaggerIntegrationNotWorking
편집 :
for api - docs {
"apiVersion": "0.0",
"swaggerVersion": "1.2",
"apis": [{
"path": "/sample"
}, {
"path": "/hello-world",
"description": "Operations about greetings"
}]
}
for sample {
"apiVersion": "0.0",
"swaggerVersion": "1.2",
"basePath": "http://geoHeil.local:8080",
"resourcePath": "/sample",
"apis": [{
"path": "/sample",
"operations": [{
"method": "GET",
"summary": "Sample endpoint",
"notes": "",
"type": "void",
"nickname": "get",
"authorizations": {},
"parameters": []
}]
}, {
"path": "/sample/hello-with-path-param/{name}",
"operations": [{
"method": "GET",
"summary": "Sample endpoint with path param",
"notes": "",
"type": "void",
"nickname": "getWithPathParam",
"authorizations": {},
"parameters": [{
"name": "name",
"required": true,
"type": "string",
"paramType": "path"
}]
}]
}, {
"path": "/sample/hello-with-query-param",
"operations": [{
"method": "GET",
"summary": "Sample endpoint with query param",
"notes": "",
"type": "void",
"nickname": "getWithQueryParam",
"authorizations": {},
"parameters": [{
"name": "name",
"required": false,
"type": "string",
"paramType": "query"
}]
}]
}]
}
for hello - world {
"apiVersion": "0.0",
"swaggerVersion": "1.2",
"basePath": "http://geoHeil.local:8080",
"resourcePath": "/hello-world",
"apis": [{
"path": "/hello-world",
"operations": [{
"method": "GET",
"summary": "Greetings endpoint",
"notes": "",
"type": "void",
"nickname": "sayHello",
"authorizations": {},
"parameters": [{
"name": "name",
"required": false,
"items": {
"type": "string"
},
"paramType": "query"
}]
}]
}]
}
어떤 swagger-ui 버전을 사용하십니까? swagger-ui.js 파일의 맨 위를 확인할 수 있습니다. – Ron
사용하신 사람 : io.federecio dropwizard-자신감 0.5.2 사진 내가에 버전 정보를 찾을 수 없습니다 https://www.dropbox.com/s/bsvfpvahp3ari3r/Swagger_UI.png?dl=0 찾을 수 있습니다 js 파일의 맨 위. –
하지만 JS 콘솔에서 UncaughtType 오류 같은 일부 오류가 나타납니다 –