Skip to content

Do not create operations for non-HTTP methods/verbs #692

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

Merged
merged 1 commit into from
Oct 28, 2014
Merged

Do not create operations for non-HTTP methods/verbs #692

merged 1 commit into from
Oct 28, 2014

Conversation

whitlockjc
Copy link
Contributor

For path properties that are not HTTP methods/verbs, do not process them as Swagger operations.

Fixes #678

@webron
Copy link
Contributor

webron commented Oct 28, 2014

@whitlockjc - we're going to add support for the 'search' http method soon. will that require an additional change?

@whitlockjc
Copy link
Contributor Author

That is correct, you'd add 'search' to the list of HTTP method/verbs in the array. The idea here is to only process the real HTTP methods/verbs instead of assuming all path properties are HTTP method/verbs like is happening now. I chose the simplest approach to convey the fix but you can do with this however you want.

@webron
Copy link
Contributor

webron commented Oct 28, 2014

It's not like I know how to do it any better ;) Just wanted to make sure. By the way, patch is already supported by the spec. I just assume that path in the PR is a typo.

@whitlockjc
Copy link
Contributor Author

I updated the previous comment to use 'search' instead of 'patch'. As for 'path' being used instead of 'patch', that's a typo and I'll fix it and update the PR. Would you like me to add 'search' to the list during the process?

@whitlockjc
Copy link
Contributor Author

I've updated the typo and left out 'search' for now since that is an upcoming change.

@webron
Copy link
Contributor

webron commented Oct 28, 2014

Let's follow up OAI/OpenAPI-Specification#133 regarding the search option.

Out of curiosity, wouldn't it be 'safer' to say whatever is "not" x-?

@whitlockjc
Copy link
Contributor Author

Well, you'd also have to do that for parameters and other legitimate operation properties, something that could change over time while the supported list of HTTP methods/verbs will likely stay mostly static. I think the approach in the PR is pretty good, although the list of supported operation HTTP methods/verbs could be refactored into a variable elsewhere.

@webron
Copy link
Contributor

webron commented Oct 28, 2014

👍

fehguy added a commit that referenced this pull request Oct 28, 2014
Do not create operations for non-HTTP methods/verbs
@fehguy fehguy merged commit 424dde2 into swagger-api:master Oct 28, 2014
vincent-zurczak pushed a commit to roboconf/swagger-ui that referenced this pull request Aug 18, 2016
Do not create operations for non-HTTP methods/verbs
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.

swagger-ui gets an error if a path has x- attributes
3 participants