Skip to content

Add Agency.brandingUrl to GTFS GraphQL #6137

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

Closed
wants to merge 1 commit into from

Conversation

JustCris654
Copy link
Contributor

@JustCris654 JustCris654 commented Oct 10, 2024

Summary

Add Agency.brandingUrl property in the schema.graphql and it's implementation

Unit tests

Write a few words on how the new code is tested.

  • Was any manual verification done? Yes, I tested with the graphiql frontend if the brandingUrl is correctly valorized and returned
  • Do all tests
    pass the continuous integration service
    ? Yes

Documentation

I added a proper doc comment in the graphql schema

@JustCris654 JustCris654 requested a review from a team as a code owner October 10, 2024 09:32
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.86%. Comparing base (802d8ed) to head (d6b3772).
Report is 147 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6137   +/-   ##
==========================================
  Coverage      69.86%   69.86%           
+ Complexity     17495    17494    -1     
==========================================
  Files           1976     1976           
  Lines          74711    74712    +1     
  Branches        7643     7643           
==========================================
+ Hits           52195    52196    +1     
  Misses         19866    19866           
  Partials        2650     2650           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried changed the title graphql schema add Agency.brandingUrl Add Agency.brandingUrl to GTFS GraphQL Oct 11, 2024
@@ -1,9 +1,11 @@
//THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
package org.opentripplanner.apis.gtfs.generated;

import graphql.relay.Connection;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unused imports (I know it's annoying).

@@ -1,6 +1,7 @@
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
package org.opentripplanner.apis.gtfs.generated;

import java.util.HashMap;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@@ -88,6 +88,8 @@ type Agency implements Node {
"""
types: [AgencyAlertType]
): [Alert]
"URL to the logo of the agency"
brandingUrl: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that I has been imported for quite a while but I cannot actually find this in the GTFS spec. Can you point me towards it?

If it's not in the specification, we would not like to expose in the API and instead remove it from the data model.

If you're keen to use it, can you open a PR or issue on the GTFS spec repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I didn't find it in the GTFS spec but in the onebusaway model as optional so I thought it could be added also in the Graphql schema also as optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there is no way to add brandingUrl aside from opening a Issue or PR to the GTFS spec repo?

Copy link
Member

@leonardehrenfried leonardehrenfried Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really would like to not expose anything that isn't in the spec. If you want to discuss this, you can come to the dev meeting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a mistake to have it in OBA and OTP in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks. I'll mark this PR as closed then

@leonardehrenfried leonardehrenfried marked this pull request as draft October 11, 2024 12:44
@t2gran t2gran added this to the Rejected milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants