-
Notifications
You must be signed in to change notification settings - Fork 147
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-4: ordering #573
API-4: ordering #573
Conversation
9ebe42b
to
e0b06fe
Compare
e0b06fe
to
db7a8ab
Compare
a37f6f2
to
b802609
Compare
b802609
to
7bf3204
Compare
7bf3204
to
6047366
Compare
@paroga I think this is ready now, care to review? |
ca76347
to
c6250de
Compare
3949916
to
4a081f6
Compare
I'm slowly proposing to merge this, if there are no further objections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe i missed something, but expected some additional tests:
- do api calls return the correct content? (at least check the
id
and/or a relevant property likename
) i only see some tests which validate the content forGET /orders
- do api calls perform any work? does a
DELETE
really removes the element from the database and not just returns the expected status code?
we have the chance to improve our test coverage with the new api endpoints, so we should try to write tests for as many relevant cases as possible
The swagger_spec uses Apivore which checks that all responses are conforming to the Swagger/OpenAPI specification in doc/.
That's a good point, which I have stepped over perhaps a bit too lightly.
I agree that is a good opportunity, will write tests for modifying methods. |
4a081f6
to
f8b178e
Compare
does it also also check if the correct items are returned or does it only check for the schema? |
fc91f5e
to
822ec12
Compare
It only checks for the schema, which is an approach we've already adopted. Updating data is new here, I'd be happy to include specs for that. |
agree
thanks |
id: | ||
type: integer | ||
name: | ||
type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to add description
to all properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Except, perhaps id
and name
(which are self-explanatory).
822ec12
to
186620a
Compare
15e9912
to
a7892e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (beside the missing newline)
many thanks for the additional tests!
a7892e4
to
74e455c
Compare
Part four of #429 in chunks, continued from #572:
/api/v1/orders(/:id)
/api/v1/order_articles(/:id)
/api/v1/group_order_articles(/:id)
with CRUD/api/v1/article_categories(/:id)
Updating single
GroupOrderArticle
s is something (I believe) we don't really do elsewhere. I've looked into this years ago in the foodcoop-adam fork, and used something similar here.total_price
(first check if Apivore might test that)