spring-restdocs

    0热度

    1回答

    继REST文档入门教程可惜我收到以下错误: java.lang.IllegalArgumentException: WebApplicationContext is required at org.springframework.util.Assert.notNull(Assert.java:115) at org.springframework.test.web.servl

    1热度

    1回答

    我尝试设置的弹簧安置上下文路径使用下面的代码片段嘲笑: private MockMvc mockMvc; @Before public void setUp() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context) .apply(documentationConfiguration(this

    2热度

    1回答

    有没有使用spring-restdocs记录http错误代码的方法?我没有找到差不多的东西上http://docs.spring.io/spring-restdocs/docs/current/reference/html5/ 用一个例子任何帮助,将不胜感激。 问候, 苏里亚

    1热度

    1回答

    将生成的spring-restdoc添加到war文件中的步骤是什么?

    1热度

    1回答

    我looking at the documentation here,所有的例子都使用 MockMvcBuilders.webAppContextSetup 我想这些例子与 MockMvcBuilders.standaloneSetup ,它似乎工作。我觉得如果你能摆脱它,后者更可取。这是否会降低春季休息文档的功能?为什么我不想每次都做后者?为什么文档不使用后者?

    0热度

    1回答

    我跟着的testng示例spring-restdocs 1.1.0.BUILD-SNAPSHOT。我能够通过gradle生成adoc文件。但是当我使用maven时,它不生成doc文件。 MMY 的pom.xml的详细信息如下: <dependency> <groupId>org.springframework.restdocs</groupId> <artifactId>spr

    1热度

    1回答

    我试图使用描述here, 属性方法,但它不被识别。方法关键也不被认可。 我是否缺少静态导入? 我的代码: MvcResult result = mockMvc.perform(post(URL_PREFIX + "/scripts/") .contentType(MediaType.APPLICATION_JSON) .content(asJsonString(script))

    2热度

    1回答

    我使用spring restdocs在我的REST webapi上生成文档;我已经整合了这个东西和我的html生成(maven + asciidoc插件,restassured apis)。 我唯一的问题是,ifeval要么不作为广告或我错了。 我的定制请求fields.snippet看起来是这样的: |=== |Path|Type|Description|Optional {{#field

    0热度

    1回答

    我喜欢使用TDD方法来记录spring-rest-docs中的restful api。不过,我喜欢Swagger规范支持的“API Playground”功能。我希望有一种两全其美的方法。 有没有办法从spring rest文档构建swagger2规范?可能会通过构建自定义请求/响应预处理器。 你有什么想法或建议吗?

    2热度

    1回答

    我使用spring-restdocs进行spring单元测试。 这是我mockmvc代码: mockMvc.perform(fileUpload("/api/enterprise/uploadImage") .file(imageFile) .with(csrf().asHeader()) .params(params) ).andExpect(s