简体   繁体   English

将昂首阔步的ui整合到吊床上

[英]Integrate the swagger ui into hammock

I am building up a CDI/REST Environment as basis for several projects by using hammock. 我正在建立一个CDI / REST环境,作为使用吊床的几个项目的基础。 What I would like to have besides CDI and REST is also json schema for generating payload classes and an automatically generated REST API documentation via swagger ui. 除了CDI和REST之外,我想要的还有用于生成有效负载类的json模式和通过swagger ui自动生成的REST API文档。 I am now at the point where everything works (Weld3, Resteasy, Undertow, Swagger Core, Json Schema). 我现在处于一切正常的地步(Weld3,Resteasy,Undertow,Swagger Core,Json Schema)。 The only thing missing is the integration of swagger UI into my hammock stack. 唯一缺少的是将swagger UI整合到我的吊床堆栈中。 In another project I already worked with swagger UI. 在另一个项目中,我已经使用了swagger UI。 As far as I know it is based on HTML + JS with an entry point index.hml. 据我所知,它基于HTML + JS,带有入口点index.hml。 How do I integrate this into my hammock stack. 如何将其整合到我的吊床堆栈中。 How to tell the undertow that there is a index.html and where to find it ? 如何告诉底层有一个index.html以及在哪里可以找到它? I think my question is not only related to swagger, but to the idea to have the hammock stack with additional static html content. 我认为我的问题不仅与swagger有关,而且与吊床堆栈有额外的静态html内容有关。

John Ament has added a swagger module for Swagger 2.0-rc3 to Hammock 2.1-SNAPHOT (will be released as part of Hammock 2.1): John Ament为Swagger 2.0-rc3添加了一个swagger模块到Hammock 2.1-SNAPHOT(将作为Hammock 2.1的一部分发布):

https://github.com/hammock-project/hammock/tree/master/swagger https://github.com/hammock-project/hammock/tree/master/swagger

As for hosting Swagger UI inside a Hammock app, you can add a few files from swagger-ui/dist/* to Hammock's static resources path: 至于在Hammock应用程序中托管Swagger UI,您可以将一些文件从swagger-ui/dist/*到Hammock的静态资源路径:

https://github.com/hammock-project/hammock/wiki/Native-Filters#static-resources https://github.com/hammock-project/hammock/wiki/Native-Filters#static-resources

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM