Skip to content
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

Merged
merged 8 commits into from May 31, 2022

Conversation

ozb-ioki
Copy link
Contributor

No description provided.

@ozb-ioki ozb-ioki added the PR: playing around do not look at this yet, playing around with ideas label May 19, 2022
@ozb-ioki ozb-ioki self-assigned this May 19, 2022
@ozb-ioki ozb-ioki added PR: ready for review and removed PR: playing around do not look at this yet, playing around with ideas labels May 19, 2022
@ozb-ioki ozb-ioki requested a review from ans-ioki May 19, 2022 12:31
@ozb-ioki ozb-ioki marked this pull request as ready for review May 19, 2022 12:31
Copy link
Contributor

@tom-ioki tom-ioki left a 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 👍

),
Endpoints.crud_endpoints(
:line_stop,
base_path: [API_BASE_PATH, 'lines', :id],
Copy link
Contributor

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
Copy link
Contributor

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.

@ozb-ioki
Copy link
Contributor Author

ozb-ioki commented May 26, 2022

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 👍

Thank you for the review Tom. I will look on it and apply the changes.

Edit: All changes are applied.

@ozb-ioki ozb-ioki force-pushed the add-line-and-line-stop-to-plattform-api branch from 4130b76 to ef46d37 Compare May 27, 2022 09:05
@ozb-ioki ozb-ioki requested a review from tom-ioki May 27, 2022 09:06
Copy link
Contributor

@tom-ioki tom-ioki left a 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 🆗

@ozb-ioki ozb-ioki merged commit 2793873 into main May 31, 2022
@ozb-ioki ozb-ioki deleted the add-line-and-line-stop-to-plattform-api branch May 31, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants