picimako / wiremocha

WireMock framework integration for the IntelliJ platform.
https://plugins.jetbrains.com/plugin/18860-wiremocha
1 stars 0 forks source link

Inspection to simplify multi-mapping mapping files to single ones #33

Closed picimako closed 2 years ago

picimako commented 2 years ago

Summary

In stub mapping files, where only a single request-response mapping is defined within the mappings property can be simplified by unwrapping the mapping and removing the mappings property.

Tasks

//to { "request": { ... }, "response" : { ... } }


- Make sure to keep any other properties specified.
- In case there is a `meta` property specified as well, besides `mappings`, don't report anything, because the meta might contain important properties that can be lost if users are not cautious enough when using the quick fix.

## To be clarified
- Look into other properties if they need special care.
picimako commented 2 years ago

Completed in v1.0.6.