lib/oas_parser/path.rb in oas_parser-0.16.0 vs lib/oas_parser/path.rb in oas_parser-0.17.0
- old
+ new
@@ -17,10 +17,10 @@
a.compact
end
def endpoint_by_method(method)
definition = raw[method]
- raise StandardError.new('So such endpoint exists') unless definition
+ raise OasParser::MethodNotFound.new("HTTP method not found: '#{method}'") unless definition
OasParser::Endpoint.new(self, method, definition)
end
def parameter_keys
path.scan(/{(.+?)}/).flatten