moov-io / wire

FedWire funds service file parser and writer. The HTTP server is available in a Docker image and the Go package is available.
https://moov-io.github.io/wire/
Apache License 2.0
81 stars 38 forks source link

API: fedWireMessage is an object, not an array #358

Open DennyWeinberg opened 9 months ago

DennyWeinberg commented 9 months ago

WIRE Version

v0.15.0

What were you trying to do?

I'm creating, parsing and validating WIRE files that contains multiple transactions.

What did you expect to see?

A parsed JSON structure containing all my fed wire messages.

What did you see?

A parsed JSON structure containing ONLY the last fed wire message, others are lost.

The problem is, the API JSON is not a list: https://moov-io.github.io/wire/api/#post-/files/create

{
  "ID": "3f2d23ee214",
  "fedWireMessage": {
    "ID": "3f2d23ee214",
...

So how could that hold multiple messages? fedWireMessage should be an array, not an object.

How can we reproduce the problem?

  1. Call the create API with a WIRE file that contains multiple messages
  2. Check the response, only one message is returned obviously because it's not an array
adamdecaf commented 9 months ago

Yea.. We'll need to make this change. I think a breaking change is appropriate since this is such a major bug.

atonks2 commented 9 months ago

Thanks @DennyWeinberg. I'll be addressing this one soon.

DennyWeinberg commented 8 months ago

Any news here?

atonks2 commented 8 months ago

I've been asking around for sample files to see how bulk/batch files should be formatted, but haven't been able to find anything.

I'll get back to researching this next week.

Denny-g6labs commented 4 months ago

Any news here? :)

atonks2 commented 4 months ago

I haven't been able to find much info about how batch files should be formatted. Do you have any example files you can share @Denny-g6labs?

atonks2 commented 4 months ago

@Denny-g6labs If you have the ability to run some files through PR #394, any feedback would be appreciated. I'd love to hear how those changes handle files from various financial institutions.