Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api/v1/Datenpaket* does not respect format argument #48

Closed
janjagusch opened this issue Jun 5, 2020 · 5 comments
Closed

api/v1/Datenpaket* does not respect format argument #48

janjagusch opened this issue Jun 5, 2020 · 5 comments

Comments

@janjagusch
Copy link

The api/v1/Datenpaket* route does not convert the content at the provided uri to the defined format. Instead, it seems to return the unconverted content.

Steps to reproduce

docker build -t dgv.xport -f Dockerfile . # Build image
docker run -p 2517:2517 gdv.xport # Run container

curl -X GET "http://localhost:2517/api/v1/Datenpaket*?format=JSON&uri=http%3A%2F%2Fwww.gdv-online.de%2Fvuvm%2Fmusterdatei_bestand%2Fmusterdatei_041222.txt" -H "accept: */*"

Expected result

The content in the provided uri, converted to JSON.

Actual result

The raw content in the provided uri.

00019999 XXX Versicherung AG           BRBRIENNEE,J�RGEN             220720042207200499990099991.91.91.92.12.12.12.12.1   1.51.31.62.0      1.51.4                                                                              1.1         1 0000     Z0ZAG0011
00019999 XXX Versicherung AG           BRBRIENNEE,J�RGEN             220720042207200499990099991.01.01.01.01.0      1.01.01.1      1.01.0                                                                                                              Z0ZAG0022
01009999  030      599999999990199990099992Kitzelpf�tze                                                Martina                                           D  52222 Stolberg (Rhld.)         Sebeneteriestr. 44                    11111979D  01            99  21
01009999  030      59999999999019999009999           B4LTTT                                               1111111111  10000000                                                                                                                      1          2
02009999  030      59999999999019999009999201052004010520090105200511  0000000001        01052004100000         EUR000000041141                              0           B4LTTT                   04100001052004                                   EUR1        1
02109999  030      5999999999901999900999910105200401052009010520040901 0000000000000000000 EUR0000000000000000000000000000000411410000000000 0001000                                                      000000                                               
02209999  030      599999999990199990099990000011Kitzelpf�tze                  000000Kitzelpf�tze                  Martina                       111119791000Hausfrau                      A 1EUR0000000000000000041141010520040000000001052004          1      
02209999  030      59999999999019999009999000001200000000001130500000000000001419500000000000000000000000000000000000000000000000000000000000000000000000010000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000  000000    X
# Output truncated for visibility

Additional information

The same behavior has been observed with the other format options (CSV, HTML, ...). In fact, the route accepts any string as format (e.g. asdf) and returns a 200 status code.

@oboehm
Copy link
Owner

oboehm commented Jun 7, 2020

The snapshot on the actual develop branch no longer ignores the format argument.

PS: You could als use api/vi/Datenpaket.json as JSON endpoint:

curl -X GET "http://localhost:2517/api/v1/Datenpaket.json?uri=http%3A%2F%2Fwww.gdv-online.de%2Fvuvm%2Fmusterdatei_bestand%2Fmusterdatei_041222.txt" -H "accept: */*"

@janjagusch
Copy link
Author

janjagusch commented Jun 8, 2020

oh, i didn't understand that /Datenpaket* implied that you can add the file format extensions there, thanks for the hint!

if you want users to know about this feature (i guess that depends on whether or not you want them to use the format argument) maybe consider adding this functionality to the documentation. :)

@oboehm
Copy link
Owner

oboehm commented Jun 8, 2020

Swagger documentation is already updated ;-)

@oboehm
Copy link
Owner

oboehm commented Jun 8, 2020

v4.1.0 is out where this problem is fixed. So ticket is closed now.

@oboehm oboehm closed this as completed Jun 8, 2020
@Klausus01
Copy link

Hi Jan,
have you seen the survey at the end of this project? Oli inserted it a few days ago.
Please have a look. It would be very helpful if the were no need to modify the "Bezeichner-Konstanten" because of the comming GDV version.
Regards klaus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants