The example accountId from the API doc isn’t much relevant and reflects an invalid value
## Linked issue
## Type of change
— [x] 🐞 Bug fix (non-breaking change which fixes an issue)
— [ ] 🛠 New feature (non-breaking change which adds functionality)
— [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
— [x] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
— [x] 🔨 New or improved tests for existing code
— [ ] ⛑ git-flow chore (backport, hotfix, etc)
## Developer checklist
— [x] I have read the [style guide](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/style-guide.md) document, and my code follows the code style of this project.
— [ ] If my code deals with exceptions, it follows the [guidelines](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/exceptions.md).
— [x] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on [cardanodocs.com](https://github.com/input-output-hk/cardanodocs.com), amending the inline [Haddock](https://www.haskell.org/haddock/) comments, any relevant README file or one of the document listed in the [docs](https://github.com/input-output-hk/cardano-sl/tree/develop/docs) directory.
## Testing checklist
— [x] I have added tests to cover my changes.
— [x] All new and existing tests passed.
## QA Steps
1) Run a cardano-node
2) Visit https://localhost:8091/docs/v1/index/ — you will see changes showed bellow
3) Roundtrip tests pass (the screenshot bellow)
## Screenshots (if available)
`accountIndex` in request body shows correct value range
`accountIndex` on description on the right picks correct value (not bellow the minimum)
`accountId` (same thing as `accountIndex`) in request params shows correct value range
@KtorZ I wonder why did we ended up with `accountId` and `accountIndex` json keys for the same thing. Is it still too late to unify it? (it would be a breaking change for exchanges)
You can view, comment on, or merge this pull request online at:
— Commit Summary —
* [CO-319] Fix account index swagger example
* [CO-319] Add roundtrip tests
— File Changes —
M wallet-new/src/Cardano/Wallet/API/V1/Migration/Types.hs (8)
M wallet-new/src/Cardano/Wallet/API/V1/Swagger.hs (4)
M wallet-new/src/Cardano/Wallet/API/V1/Types.hs (52)
M wallet-new/test/MarshallingSpec.hs (29)
— Patch Links —