Skip to content

Version 7.5+ broken NameError: name 'NestedFilterConfig' is not defined #120

@charlesverge

Description

@charlesverge

This is causing unit tests to fail.

Branch protection rules might help out as looks like two releases where done with broken libraries automatically.

src/courier/types/filter.py has a circular dependency. It looks like an issue with the spec or the generator.

NameError: name 'NestedFilterConfig' is not defined

Looking at the spec I see

    Filter:
      title: Filter
      oneOf:
        - $ref: "#/components/schemas/SingleFilterConfig"
        - $ref: "#/components/schemas/NestedFilterConfig"

And

FilterConfig:
      title: FilterConfig
      oneOf:
        - $ref: "#/components/schemas/SingleFilterConfig"
        - $ref: "#/components/schemas/NestedFilterConfig"

Which only FilterConfig is referenced.

    NestedFilterConfig:
      title: NestedFilterConfig
      type: object
      description: The operator to use for filtering
      properties:
        rules:
          type: array
          items:
            $ref: "#/components/schemas/FilterConfig"
      required:
        - rules
      allOf:
        - $ref: "#/components/schemas/BaseFilterConfig"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions