Skip to content

[Subscription API] Purpose of Filter schema object in OAS not clear #1040

@HenriKorver

Description

@HenriKorver

In the OAS for the Subscription API the Filter object is included:

Filter:
      title: "Filter"
      description: "A filter from a selection of multiple filter types and dialects"
      type: object
      additionalProperties: true

The Filter object is used in all the filter dialects as the basis of the allOf construction, for instance in the ExactFilter:

ExactFilter:
      allOf:
        - $ref: "#/components/schemas/Filter"
        - type: object
          title: "exact filter"
          description: "This filter evaluates to 'true' if the 'value' exactly matches the value of the indicated CloudEvents context attribute"
          properties:
            exact:
              $ref: "#/components/schemas/CloudEventsAttribute"
          additionalProperties: false

It is not clear for me what the purpose is of this allOf construction with the Filter object as basis schema. It seems that the Filter object offers an extension mechanism to the standard filter dialects (All, Any, Not, Exact, Suffix, Prefix, etc.) because it contains the clause additionalProperties: true. Could somebody give me a concrete example of a JSON filter expression where this is used?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions