Skip to content

PathFinder finds all patterns, who looks like my request path, and he return worst case #226

Closed
@mrkovalchuk

Description

@mrkovalchuk

Good day. Please start from comment in code:
dcb7161#r37991936

In my case PathFinder find three path patterns (with all him staff like a response and more...):
path_pattern (from request): api/some/reourse/{key}/this/path/
Matched patterns with important arg:

  1. api/some/reourse/{key}/ mimetype: json
  2. api/some/reourse/{key}/this/ mimetype: json
  3. api/some/reourse/{key}/this/path/ mimetype: text/csv

Ok. Could be worse. We can see, number three - best match. But code from link say: I'll return first of them. Why? Why we use iterators everywhere, but still return one response for validation? Not the most accurate pattern. Just first. Please look like it be in 0.13.2 version. Radical changes. And I don't understand new logic =(

This behaviour produce error in schema validation process. Schema right. I checked it.

Thanks for help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions