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
Add line and line stop to plattform api #96
Conversation
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.
Great job so far, almost there.
Besides my comments, please have a look at the spec/ioki/platform_api_spec.rb
. There you can add some specs for the added endpoints 👍
lib/ioki/apis/platform_api.rb
Outdated
), | ||
Endpoints.crud_endpoints( | ||
:line_stop, | ||
base_path: [API_BASE_PATH, 'lines', :id], |
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.
I guess line_stops
are also part of the product resource. In that case you need to adjust the base_path
to:
base_path: [API_BASE_PATH, 'products', :id, 'lines', :id]
@@ -0,0 +1,20 @@ | |||
# frozen_string_literal: true |
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.
All attributes that can be send to triebwerk via platform api (see LineSchema
and LineUpdateSchema
) should have the on: [:create, :read, :update]
setting. Otherwise, these attributes will get filtered out of the request on create
or update
.
Thank you for the review Tom. I will look on it and apply the changes. Edit: All changes are applied. |
4130b76
to
ef46d37
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.
Nice! Looks good to me 🆗
No description provided.