You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using django-silver version 0.7.0 installed through pip with Django 1.11, Python 2.7, djangorestframework version: 3.8.2
I am testing invoice creation through the API. I can create invoices without any problem (when adding appropriate currency related fields ;-) using httpie.
When I try to issue an invoice using the PATCH method indicated in the documentation, I get a 450 Method Not Allowed error:
This is indeed an old and weird part of the API.
You can view the code here and indeed only PUT is allowed in code.
I think the logic behind it was that you create a transition (request), you don't just patch the state field.
The endpoint should've been somewhat similar to the newer payment method endpoint where the cancel transition has it's own endpoint and you send POST requests.
It might be worth reworking the transition endpoints for documents. The subscription ones look OK at a glance.
Regarding the docs, having them statically written means at some point they will no longer be in sync with the actual API. We were using Django Swagger at some point to generate the API docs, but I don't really remember what happened to that.
Hello!
I am using django-silver version 0.7.0 installed through pip with Django 1.11, Python 2.7, djangorestframework version: 3.8.2
I am testing invoice creation through the API. I can create invoices without any problem (when adding appropriate currency related fields ;-) using httpie.
When I try to issue an invoice using the PATCH method indicated in the documentation, I get a 450 Method Not Allowed error:
When I use the PUT method, it works:
I am relatively new to Django & I don't know much about DRF. Is it a documentation problem? Am I missing something?
Thanks.
jérôme
The text was updated successfully, but these errors were encountered: