问题标签 [spring-auto-restdocs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
45 浏览

spring-restdocs - 我如何在 spring auto restdocs 中记录内部集合约束

我正在尝试记录集合(NotBlank 和大小)的内部约束,例如:

我可以使用内置功能吗?

PS:我在这里找到了约束解决的地方,在修改此方法后,我可以访问所需的约束,但 NotBlank 属于片段中的Optional 字段

0 投票
0 回答
34 浏览

spring-restdocs - JsonIgnore 不适用于 Spring Rest-Docs

我已经创建了一个端点并为它实现了一个 rest-doc。https://scacap.github.io/spring-auto-restdocs/

然后我为它创建了一个模拟测试方法:

因此,spring rest-docs 生成带有 @JsonIgnore 字段的文档。

有没有办法从 spring rest-docs 中忽略这个 @JsonIgnore 字段?