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

Rename ErrorMessage to Problem, split into specific types, revise output #203

Merged
merged 29 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1227fab
added the error messages from the documenation
ue71603 Jun 1, 2022
14be2a2
Travis CI update [skip ci]
Jun 1, 2022
67ea1f0
Fix errors, formatting and translation
sgrossberndt Aug 23, 2022
97040c6
Travis CI update [skip ci]
Aug 23, 2022
f7e7fa3
Error handling new
ue71603 Oct 18, 2022
b541ecb
Added the error codes from the documentation
ue71603 Jun 1, 2022
36c9e27
Merge branch 'error_messeges_in_xsd' of https://github.com/VDVde/OJP …
ue71603 Oct 26, 2022
bcdefe2
ErrorMessage => Problem (according to RFC
ue71603 Oct 26, 2022
2892deb
Travis CI update [skip ci]
Oct 26, 2022
a7ac8db
Error codes added
trurlurl Nov 3, 2022
0b7f0af
Travis CI update [skip ci]
Nov 3, 2022
2032ccc
Merge branch 'changes_for_v1.1' into error_messeges_in_xsd
ue71603 Nov 4, 2022
0e4c890
Travis CI update [skip ci]
Nov 4, 2022
4eff032
Update OJP_Fare.xsd
ue71603 Nov 4, 2022
f71f414
Update OJP_FareSupport.xsd
ue71603 Nov 4, 2022
9d21a7a
Update OJP_RequestSupport.xsd
ue71603 Nov 4, 2022
7e0d8ba
Update OJP_StopEvents.xsd
ue71603 Nov 4, 2022
8ce365a
Update OJP_Trips.xsd
ue71603 Nov 4, 2022
2ae0d43
Update OJP_Trips.xsd
ue71603 Nov 4, 2022
d2b9b52
Travis CI update [skip ci]
Nov 4, 2022
225523d
changes from Stephan
ue71603 Nov 4, 2022
cebcd71
Travis CI update [skip ci]
Nov 4, 2022
279898d
reorganised error codes
ue71603 Dec 6, 2022
b6202f5
Travis CI update [skip ci]
Dec 6, 2022
69c0c1c
Merge branch 'changes_for_v1.1' into error_messeges_in_xsd
sgrossberndt Dec 7, 2022
ddf0925
Restructured and fixed multiple issues
sgrossberndt Dec 7, 2022
5a1cc52
Travis CI update [skip ci]
Dec 7, 2022
7b5a062
Merge branch 'changes_for_v1.1' into error_messeges_in_xsd
sgrossberndt Dec 15, 2022
8ac1783
Revert aligning order of attributes in WaitDuration
sgrossberndt Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions OJP/OJP_Common.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,28 @@
<xs:annotation>
<xs:documentation>========================================== General ==========================================</xs:documentation>
</xs:annotation>
<xs:complexType name="ErrorMessageStructure">
<xs:group name="ProblemDetailGroup">
<xs:annotation>
<xs:documentation>Structured error messages</xs:documentation>
<xs:documentation>Detailed description of the problem.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Code" type="xs:normalizedString">
<xs:element name="Title" type="InternationalTextStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>Code of the error situation.</xs:documentation>
<xs:documentation>Title of the problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Text" type="InternationalTextStructure" minOccurs="0">
<xs:element name="Details" type="InternationalTextStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>Description of the error situation.</xs:documentation>
<xs:documentation>Explanation of the problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="LogData" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Additional log data.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:group>
<xs:complexType name="PrivateCodeStructure">
<xs:annotation>
<xs:documentation>Code within scope of a private referential system</xs:documentation>
Expand Down
10 changes: 5 additions & 5 deletions OJP/OJP_Fare.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
<xs:documentation>ID of this result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="FareProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this FARE result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="StopFareResult" type="StopFareResultStructure">
<xs:annotation>
Expand Down Expand Up @@ -207,11 +212,6 @@
<xs:documentation>Structure of a Multi Trip Fare Request result</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ErrorMessage" type="ErrorMessageStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Result-specific error messages.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TripFareProductReference" type="TripFareProductReferenceStructure" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Non-empty list of trip references in the corresponding MultiTripFareRequestStructure</xs:documentation>
Expand Down
73 changes: 68 additions & 5 deletions OJP/OJP_FareSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,6 @@
<xs:documentation>Structure of a Single Trip Fare Request result</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ErrorMessage" type="ErrorMessageStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Result-specific error messages </xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="TripLegRangeGroup" minOccurs="0"/>
<xs:element name="PassedZones" type="TariffZoneListInAreaStructure" minOccurs="0">
<xs:annotation>
Expand Down Expand Up @@ -486,4 +481,72 @@
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================== Problems ==========================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="FareProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Types of problems that may be returned in responses to FARE requests.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="FARE_OUTOFAREA">
<xs:annotation>
<xs:documentation>The trip planning has found a route that leaves the area of the fare authority.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_JOURNEYNOTPERMITTED">
<xs:annotation>
<xs:documentation>The trip planning result suggests a service which is not permitted by the fare authority.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_ADDITIONALCHARGES">
<xs:annotation>
<xs:documentation>Passengers may be charged additional fees (e.g.: for road tolls or seat reservation).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_ADDITIONALTICKETS">
<xs:annotation>
<xs:documentation>Additional tickets may be necessary because only parts of the passenger trip could be covered.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_ROUTENOTFEASIBLE">
<xs:annotation>
<xs:documentation>Fare calculation is not possible because the suggested trip is not in compliance with the fare regulations, e.g. because of round trips, TripLegs that go forth and return or exceed the maximal total trip duration.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_ALREADYCOVERED">
<xs:annotation>
<xs:documentation>The ticket that has been specified in the request is valid for the suggested trip (or parts of it as defined by TripLegRange).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_DATEOUTOFRANGE">
<xs:annotation>
<xs:documentation>The fare request cannot be processed because there is no information available for the requested date.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_STOPPOINTUNKNOWN">
<xs:annotation>
<xs:documentation>The fare request cannot be processed because the requested stop is unknown.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="FARE_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FareProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to FARE requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="FareProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the FARE problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
103 changes: 103 additions & 0 deletions OJP/OJP_PlaceSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,107 @@
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================== Problems ==========================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="LocationProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Types of problems that may be returned in responses to LOCATION requests.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="LOCATION_NORESULTS">
<xs:annotation>
<xs:documentation>No location objects could be found that match the input data.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_UNSUPPORTEDTYPE">
<xs:annotation>
<xs:documentation>The requested location types are not supported by the service.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_UNSUPPORTEDCOMBINATION">
<xs:annotation>
<xs:documentation>The combination of input data (text string, coordinates, geographical restrictions) cannot be processed by the service.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_NOREFINEMENT">
<xs:annotation>
<xs:documentation>The given location object could not be refined.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_USAGEIGNORED">
<xs:annotation>
<xs:documentation>The usage type has been ignored.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_UNSUPPORTEDPTMODES">
<xs:annotation>
<xs:documentation>The service does not support any restrictions by transport modes.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_UNSUPPORTEDLOCALITY">
<xs:annotation>
<xs:documentation>The service does not support any restrictions by localities.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="LOCATION_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="LocationProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to LOCATION requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="LocationProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the LOCATION problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ExchangePointsProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Types of problems that may be returned in responses to EXCHANGE POINTS requests</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="EXCHANGEPOINTS_NORESULTS">
<xs:annotation>
<xs:documentation>No exchange points could be found that match the query criteria.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EXCHANGEPOINTS_UNKNOWNDESTINATIONSYSTEM">
<xs:annotation>
<xs:documentation>The destination system given in the request parameters is unknown.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EXCHANGEPOINTS_UNKNOWNADJACENTSYSTEM">
<xs:annotation>
<xs:documentation>One or more of the adjacent systems given in the request parameters are unknown.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EXCHANGEPOINTS_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ExchangePointProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in responses to EXCHANGE POINTS requests.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="ExchangePointsProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the EXCHANGE POINTS problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
14 changes: 12 additions & 2 deletions OJP/OJP_Places.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
</xs:complexType>
<xs:complexType name="PlaceResultStructure">
<xs:sequence>
<xs:element name="Problem" type="LocationProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this LOCATION result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Place" type="PlaceStructure"/>
<xs:element name="Complete" type="xs:boolean">
<xs:annotation>
Expand Down Expand Up @@ -152,7 +157,7 @@
</xs:element>
<xs:element name="NumberOfResults" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>Maximum number of results to be returned. The service is allowed to return fewer objects if reasonable or otherwise appropriate. If the number of matching objects is expected to be large (eg: in the case that all objects should be delivered) this parameter can be used to partition the response delivery into smaller chunks. The place information service is expected to support a response volume of at least 500 objects within one single response.</xs:documentation>
<xs:documentation>Maximum number of results to be returned. The service is allowed to return fewer objects if reasonable or otherwise appropriate. If the number of matching objects is expected to be large (e.g.: in the case that all objects should be delivered) this parameter can be used to partition the response delivery into smaller chunks. The place information service is expected to support a response volume of at least 500 objects within one single response.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ContinueAt" type="xs:nonNegativeInteger" minOccurs="0">
Expand Down Expand Up @@ -324,14 +329,19 @@
</xs:group>
<xs:complexType name="ExchangePointsResultStructure">
<xs:sequence>
<xs:element name="Problem" type="ExchangePointProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Problems related to this EXCHANGE POINTS result.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Place" type="PlaceStructure">
<xs:annotation>
<xs:documentation>Place object that describes this exchange point.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TravelDurationEstimate" type="xs:duration" minOccurs="0">
<xs:annotation>
<xs:documentation>Rough estimate of the travel duration from the specified refrence place to this exchange point.</xs:documentation>
<xs:documentation>Rough estimate of the travel duration from the specified reference place to this exchange point.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="WaitDuration" type="xs:duration" minOccurs="0" default="PT0M">
Expand Down
58 changes: 58 additions & 0 deletions OJP/OJP_RequestSupport.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
<xs:documentation>Calculation time.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Problem" type="OJPGenericProblemStructure" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>OJP generic problem for the whole delivery.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="SubscriptionRequestContextGroup">
Expand Down Expand Up @@ -178,4 +183,57 @@
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:annotation>
<xs:documentation>========================================== Problems ==========================================</xs:documentation>
</xs:annotation>
<xs:simpleType name="OJPGenericProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Types of problems that may be returned in case of generic problems with the request.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="OJPGENERIC_REQUESTNOTSUPPORTED">
<xs:annotation>
<xs:documentation>The server does not support the specific request (e.g.: MultiPointTripRequest).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_FEATURENOTSUPPORTED">
<xs:annotation>
<xs:documentation>The server does not support the requested feature (e.g.: parameter NotVia in TripRequest).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_LANGUAGENOTSUPPORTED">
<xs:annotation>
<xs:documentation>For the display of texts within the result, the server (at least in the context of this request) does not support the requested language.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_EXCEPTIONFROMREQUESTEDLANGUAGE">
<xs:annotation>
<xs:documentation>When displaying texts within the result, the server does not support the requested language for all occurring text elements.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_DATAFRAMEREFNOTAVAILABLE">
<xs:annotation>
<xs:documentation>The server cannot provide the requested data frame (data version).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="OJPGENERIC_OTHER">
<xs:annotation>
<xs:documentation>A problem has occurred that does not have a specific problem type.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OJPGenericProblemStructure">
<xs:annotation>
<xs:documentation>Problem that may be returned in case of generic problems with the request.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Type" type="OJPGenericProblemTypeEnumeration">
<xs:annotation>
<xs:documentation>Type of the generic problem.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:group ref="ProblemDetailGroup"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Loading