Closed joeyhorst closed 2 years ago
@joeyhorst do we have any standard format of partners_id because I simply gave 123456789 and reponse got created with no error. Besides I am able to provide a value as an integer. However , under response it is getting converted into String.
I am not sure whether it should accept an integer or throw an error ?
Date is working fine , when I passed as a string , it has thrown an error in honey badger - https://app.honeybadger.io/projects/80734/faults/84341031#notice-comments
But when I am giving any invalid year during this scenario its not throwing any error only asset is not getting created , ideally it should throw an error if year is not valid.
The partners_id
is a string and accepts anything basically (also an integer). As such we need to specify in the docs that it is a string.
For year
we need to specify that it is a 4 digit integer. We don't check and expect the user to fill in the right integer. It is also specified in the api-docs that you can only submit data for the last 5 years (2021, 2020, 2019, 2018, 2017).
What you need to check for the date are values like wat_data_from
from http://gresb.github.io/api-docs/#data-dictionary. I'm not sure what the date format should be but the user mentioned it expected an integer.
@joeyhorst That I checked it was accepting only date not integer.
The
partners_id
is a string and accepts anything basically (also an integer). As such we need to specify in the docs that it is a string.For
year
we need to specify that it is a 4 digit integer. We don't check and expect the user to fill in the right integer. It is also specified in the api-docs that you can only submit data for the last 5 years (2021, 2020, 2019, 2018, 2017).What you need to check for the date are values like
wat_data_from
from http://gresb.github.io/api-docs/#data-dictionary. I'm not sure what the date format should be but the user mentioned it expected an integer.
@joeyhorst Yes I agree its an integer so String accepts it but actually string accepts the value in enclosed double quotes so thought to double whether its fine or not.
Flagged by a user, so haven't checked myself.