Closed boxman0617 closed 3 years ago
Thanks for the PR. According to https://docs.mapbox.com/api/maps/uploads/#create-an-upload private
is still an allowed parameter. I'd like some :eyes: from the API team to look at this first to comment on if it's an API issue, or something the API changed, therefore the docs need changing, then something we can fix here.
I'm hesitant to roll with this fix without knowing what's going on on the API side.
@andrewharvey Totally agree. I'd like to know what changed. The docs https://docs.mapbox.com/api/maps/#create-an-upload state that private is an optional field, but any time that is added to the request the message: 'The request body contains the invalid property "private".',
message is returned from the API.
I tried it on my project without the "private" field and it worked just fine.
Let me know what the end result of this is as I would either like to merge this PR and update my deps or keep the workaround i have till a fix is made.
Thank you!
@katydecorah @danswick Do you know if this is a problem with the API docs, or the API? Trying to workout if this is something the SDK should fix or the API/docs?
@andrewharvey @katydecorah @danswick Any word on this?
@andrewharvey just ran into the same issue that this PR addresses. Can confirm createUpload
service fails because of the default private
field being passed in the body. Any update would appreciated.
@andrewharvey just ran into the same issue that this PR addresses. Can confirm createUpload service fails because of the default private field being passed in the body. Any update would appreciated.
Because of the conflict between what the API documentation says (which says you can pass private
) and the actual behaviour of the API (which returns an error when you do). I'm not that keen on making a decision on this, because it's not clear if this is just a bug in the API that should be fixed, or it was a breaking change made to the API which we should address here.
As I said earlier on this thread, personally I'm hesitant to make a change without a resolution from Mapbox about this issue. To progress this, I'd suggest to raise a ticket with Mapbox through the official support channel, and if you do get an update, please share back here.
Based on https://github.com/mapbox/mapbox-sdk-js/issues/392
I removed all of the instances of the use "private" and updated the tests.
Tested the request without private and the API was successful.