openTdataCH / ojp-sdk

Meta OJP SDK repo
MIT License
4 stars 0 forks source link

TR TimedLeg is missing DestinationText #38

Open vasile opened 1 month ago

vasile commented 1 month ago

At the moment there is no <DestinationText> (and <DestinationStopPointRef>)

It is present in v1, any ETA when will be available in v2?

<ojp:Service>
    <ojp:OperatingDayRef>2024-05-17</ojp:OperatingDayRef>
    <ojp:JourneyRef>ch:1:sjyid:100001:964-001</ojp:JourneyRef>
    <siri:LineRef>ojp:91006:H</siri:LineRef>
    <siri:DirectionRef>R</siri:DirectionRef>
    <ojp:Mode>
        <ojp:PtMode>rail</ojp:PtMode>
        <siri:RailSubmode>interRegionalRailService</siri:RailSubmode>
        <ojp:Name>
            <ojp:Text xml:lang="de">Zug</ojp:Text>
        </ojp:Name>
        <ojp:ShortName>
            <ojp:Text xml:lang="de">IC</ojp:Text>
        </ojp:ShortName>
    </ojp:Mode>
    <ojp:PublishedLineName>
        <ojp:Text xml:lang="de">IC6</ojp:Text>
    </ojp:PublishedLineName>
    <ojp:OperatorRef>ojp:11</ojp:OperatorRef>
    <ojp:DestinationStopPointRef>8500010</ojp:DestinationStopPointRef>
    <ojp:DestinationText>
        <ojp:Text xml:lang="de">Basel SBB</ojp:Text>
    </ojp:DestinationText>
</ojp:Service>
r3to commented 3 weeks ago

DestinationText is optional on XSD (but required for our use case)

OriginText is mandatory according to the XSD but missing in the response

https://vdvde.github.io/OJP/develop/index.html#ServiceGroup

TO-mdv commented 2 weeks ago

SH-3136 OJP2.0 TR Ausgabe und und </ojp:DestinationText>

TO-mdv commented 2 weeks ago

Release on PROD on 27.6.2024

r3to commented 4 days ago

I assumed, that DestinationText refers to the last stop of the service (where the service terminates) and not the last stop of the parent trip (LegAlight).

So for a trip from Berne to Zurich with IC 8 I expected DestinationText to be "Romanshorn" and not "Zürich HB" and OriginText to be "Brig" instead of "Bern"

@TO-mdv did I misunderstand the documentation or is it currently returning the wrong information?

Edit: I've just double checked with https://www.öv-info.ch/de On those responses, DestinationText is referring to the Service. So it looks like an error on OJP2.0.

vasile commented 3 days ago

@r3to can also confirm is a bug, in OJP 1.0 you get Romanshorn for an IC8 service

<ojp:Service>
    <ojp:OperatingDayRef>2024-07-02</ojp:OperatingDayRef>
    <ojp:JourneyRef>ch:1:sjyid:100001:823-002</ojp:JourneyRef>
    <siri:LineRef>ojp:91081:A</siri:LineRef>
    <siri:DirectionRef>H</siri:DirectionRef>
....
    <ojp:PublishedLineName>
        <ojp:Text xml:lang="de">IC81</ojp:Text>
    </ojp:PublishedLineName>
    <ojp:OperatorRef>ojp:11</ojp:OperatorRef>
    <ojp:DestinationStopPointRef>8506121</ojp:DestinationStopPointRef>
    <ojp:DestinationText>
        <ojp:Text xml:lang="de">Romanshorn</ojp:Text>
    </ojp:DestinationText>
</ojp:Service>
TO-mdv commented 3 days ago

Yes, you're both right. I create a bug for this issue. Thanks!