Skip to content

Conversation

@leonardehrenfried
Copy link
Contributor

For a Siri-SX subscription request I needed to set the <OperatorRef> field.

I found an example of how to do it in the Siri-ET code and tried to convert it to the Siri-SX one.

However, I'm not sure if I fully understood how these filterMaps are supposed to be used.

@lassetyr Can you check the config example if this is correct?

@lassetyr
Copy link
Contributor

The original idea was that the subscription-config should use an enum-value from SubscriptionPreset, and that this enum would be processed in FilterMapPresets.

Originally, this was done to support defining a list of filter-values - e.g. several lines like this case.

I have not tested the code in this PR, but it looks like it works as expected, and it also seems like a more generic approach that will support most usecases.

Could you also create an example for how this could be used to define a list of values in the subscriptions.yml-file?

@leonardehrenfried
Copy link
Contributor Author

I would need to adjust the parsing code but I think it could work something like this:

filterMap:
  uk.org.siri.siri21.OperatorRefStructure: 
    - "AN_OPERATOR"
    - "ANOTHER_OPERATOR"

Do think that this kind of mechanism is a good idea or do we want something more workflow-specific like:

operatorRef:
  - "AN_OPERATOR"
  - "ANOTHER_OPERATOR"

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.

2 participants