Skip to content
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

Verify if combination of (method) path and operation exists #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dynamind
Copy link

Hi,

The validator causes false positives if there exists a given path and a given operation in the class but they do not belong together. Example:

Given this implementation:

@Path("/")
public class SomeResource {
    @GET 
    @Path("/foo") 
    public Response foo() { ... }

    @POST 
    @Path("/bar")
    public Response bar() { ... }
}

And this YAML:

paths:
  /foo:
    post:
      ...
  /bar:
    get:
      ...

The test matched on path /foo and /bar, GET and POST, causing a false positive.

Please consider this enhancement, and thanks for creating this awesome library.

@tarlog
Copy link
Contributor

tarlog commented Mar 13, 2016

Thank you for the PR. I'll try to find time to review and merge.

Cheers!

@dynamind dynamind force-pushed the master branch 2 times, most recently from cbe62ac to a979dd8 Compare March 16, 2016 17:05
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