ePages-de / ePages-de/restdocs-api-spec
Improve failure output to make debugging /failure fixing in tests simpler
- Dominant language
- Kotlin
- Stars
- 427
- Forks
- 116
- Avg merge
- 23h 54m
- Merged PRs (30d)
- 1
Description
### Origin situation
I accidently defined a wrong type in my test (I used String.class instead of JsonFieldType.STRING) which led to a `resources.json` containing:
```json
, {
"attributes" : { },
"description" : "my text...",
"ignored" : false,
"path" : "content[].metaData.xyz",
"type" : "java.lang.String",
"optional" : true
}, {
```
which leads to gradle failure with:
```bash
Task openapi3 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task 'openapi3'.
> unknown field type java.lang.string
```
That was all output.
Of course this is my fault, but to find the problem wasn't easy - at the beginning I did not recognize that the `resource.json` output inside `build/generated-snippets/myTargetFolder` is full used to generate openapi parts and there you can find the location of the problem etc. etc.
### Wanted
It would be nice to have
- the location of the problematic `resource.json` or
- the problematic test case, or
- the path/attributes or
- anything else that makes it simpler to locate the problematic part
inside the gradle output in failure case.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.