terran4j / commons Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
启动成功后,访问api2Doc主页,点击具体链接后,后台报错:
java.lang.NoClassDefFoundError: com/vladsch/flexmark/parser/ParserEmulationProfile
请问如何添加在header中Authorization的参数说明
rt,谢谢。
希望以后可以支持dubbo
就是不能支持post请求的 @requestbody
api2doc设计和效果很赞
我想可以导出所有的文档,单独对外提供一个静态服务,这样更方便也更安全
还有如果api详情页面可以添加api测试功能就更好了
thanks
比如一个方法有10个参数,这个参数可能不需要传递,怎么在生成的文档中去掉,
很期待下一个版本
http header有对应的注解么?
公司项目对通用返回结构的属性定义会有所区别,能否支持自定义的形式
引入该lib后,启动tomcat报以下错误:
SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
集成后直接SOE了,日志超200000行,看不见具体原因,
at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serializeContents(ObjectArraySerializer.java:256)
at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:216)
at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:26)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:704)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:690)
大部分都是这些错误
能否支持@requestbody参数,并支持把Object类型的参数继续展开显示
自定义请求参数类型,如我上传的数据不是直接通过参数上传,而是通过其它的方式上传的参数,但同时我也需求请求参数的注释。能提供方式吗?
然后就是返回的类型问题,请添加一下泛型的返回类型如list、hashmap等。
如题
将spring boot版本降回到2.1.5.RELEASE 能正常访问
请求路径拼接缺少类上定义的@RequestMapping路径
代码是不是都没有人维护了,都没有更新过了,还有一个大问题就是不支持泛型
为了将是否必须修改为是,我加入了@PathVariable修饰,但是url示例却不见了
希望能提供自定义修改界面及导出功能 期待下一版本!
Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/Users/trevor/.m2/repository/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.jar
at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:132)
at org.springframework.boot.devtools.restart.ChangeableUrls.fromClassLoader(ChangeableUrls.java:98)
at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:91)
at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:55)
at org.springframework.boot.devtools.restart.Restarter.(Restarter.java:140)
at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:551)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:68)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
at com.coinsea.CoinApi.main(CoinApi.java:16)
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.IOUtils.readFully(IOUtils.java:65)
at java.util.jar.JarFile.getBytes(JarFile.java:425)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
at java.util.jar.JarFile.getManifest(JarFile.java:180)
at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromManifestClassPathAttribute(ChangeableUrls.java:153)
at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:129)
... 17 more
在工程pom中添加
<dependency> <groupId>com.github.terran4j</groupId> <artifactId>terran4j-commons-api2doc</artifactId> <version>1.0.1</version> </dependency>
启动springboot,访问/api2doc/home.html
控制台输出:No FreeMarker view found for URL: api2doc/home.ftl
添加如下配置后才能找到模板文件:
@Configuration public class FreeMarkerConfig { @Autowired protected freemarker.template.Configuration configuration; @PostConstruct public void setTemplatePath() { //设置api2doc视图模板路径 configuration.setClassForTemplateLoading(Api2Doc.class, "/templates/"); } }
我觉得这个应该不需要开发再自行配置的,请帮忙看下!
api2doc是作者一堆开源项目中的一个,作者拉了一个很大的架构,什么都有,忙不过来吧?
其实api2doc就像作者在Readme里介绍的,相比swagger还是有一点优势和生存空间的,swagger主要的优点就是自动测试,但是的确很少有人用,测试的工具很多。
但是api2doc发展太慢了,很多类型和属性都不支持,而且对springboot各版本测试不够,经常出错,楼下所说的home.html打不开,以及java.lang.StackOverflowError: null错误我都遇到了。
建议认真把这个做好,会有很多人用的!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.