-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
575aace
to
67ea1f0
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.
We have to discuss this change again.
-
This list currently only consists of
StopEventResponse
from the documentation, which now isOJPStopEventDelivery
. But apparently when I removed unused structures in 0168dcd4 it was overlooked theseErrorMessage
s are not part of the output at all.
I wonder now whether this was the correct choice back then to simply remove these structures - how are error messages regarding a whole response transported now? The current state seems to only be able to transport an error message for a singleStopEventResult
, but not for the wholeOJPStopEventDelivery
. Do we have to re-addErrorMessage
at a base delivery level? -
Is
Code
inErrorMessageStructure
the correct place to document all the codes for all the responses or should they rather be documented each in theErrorMessage
where they may occur, e.g. https://github.com/VDVde/OJP/blob/changes_for_v1.1/OJP/OJP_StopEvents.xsd#L194 -
Currently there are only the error codes of some stopEvent documented in the xsd in this commit, the documentation has a lot more, e.g.
STOPEVENT_LASTSERVICEOFTHISLINE
,FARES_STOPPOINTUNKNOWN
, ... which are missing here.
@sgrossberndt You have a lengthy comment here. It seems it does not relate to this change. Should we discuss it in a separate issue? Can you create it then?
|
No, this lengthy comment is exactly about this change. There is no use merging this pull request before we have discussed the points in this comment. In order to be able to find it for the discussion I will add it to the issue though. |
|
755bb0f
to
c732bf9
Compare
c291fcf
to
b541ecb
Compare
You can find TRIAS releases at https://github.com/VDVde/TRIAS/releases, most recent is v1.3 but v1.4 will be released in the near future |
I am also torn. I see the proposed solution with a structure but subcategories in the enum name as a good compromise |
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 still wonder why we change ErrorMessage to "Problem" maybe this choice of words can be explained.
Part of the commit message: https://datatracker.ietf.org/doc/html/rfc7807 and also. Errorstructures by Service (and perhaps a general one) and have a complete list as annex to the standard rendered by the documentation engine. |
@sgrossberndt updated: Is this ok for you now? |
# Conflicts: # docs/generated/OJP.html
* `OJP_Common.xsd` now only contains the `ProblemDetailGroup` shared by all `ProblemStructure`s * Renamed `ProblemStructure` to `OJPGenericProblemStructure` and moved it to `OJP_RequestSupport.xsd` as it is only used there * Moved the `Problem` element to `FareResultStructure` so `StopFareResult` and `StaticFareResult` may also contain a problem and removed it from `TripFareResult` and `MultiTripFareResult` * Moved the problem definitions to the bottom of each file and have them in the same order everywhere * Renamed some problem types: * `OTHER` to `OJPGENERIC_OTHER` * `FARES_*` to `FARE_*` * `MULTIPOINTTRIP_NOTALLPOINTSCOVERED` to `TRIP_MULTIPOINT_NOTALLPOINTSCOVERED` * `MULTIPOINTTRIP_TOOMANYPOINTS` to `TRIP_MULTIPOINT_TOOMANYPOINTS` * Added the missing `Problem` element for the `TripInfoProblemStructure` * fixed some typos
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.
Proposal for commit message when squashing:
- Renamed
ErrorMessage
toProblem
in accordance to RFC 7807,Code
toType
,Text
toTitle
and addedDetails
andLogData
- Added dedicated ProblemStructures for each request, enumerating the possible types, some of which were previously only defined in the documentation, some not defined at all.
- Added the
Problem
element toPlaceResultStructure
andTripInfoResultStructure
- Added the
Problem
element toFareResultStructure
soStopFareResult
andStaticFareResult
may also contain one and removed it fromTripFareResult
andMultiTripFareResult
- Renamed some problem types (in comparison to the former documentation):
FARES_*
toFARE_*
MULTIPOINTTRIP_NOTALLPOINTSCOVERED
toTRIP_MULTIPOINT_NOTALLPOINTSCOVERED
MULTIPOINTTRIP_TOOMANYPOINTS
toTRIP_MULTIPOINT_TOOMANYPOINTS
ErrorMessage
toProblem
in accordance to RFC 7807,Code
toType
,Text
toTitle
and addedDetails
andLogData
Problem
element toPlaceResultStructure
andTripInfoResultStructure
Problem
element toFareResultStructure
soStopFareResult
andStaticFareResult
may also contain one and removed it fromTripFareResult
andMultiTripFareResult
FARES_*
toFARE_*
MULTIPOINTTRIP_NOTALLPOINTSCOVERED
toTRIP_MULTIPOINT_NOTALLPOINTSCOVERED
MULTIPOINTTRIP_TOOMANYPOINTS
toTRIP_MULTIPOINT_TOOMANYPOINTS
Fixes: #111