Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rspec-rails-swagger
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
rspec-rails-swagger
Commits
db0a1d45
Commit
db0a1d45
authored
Sep 25, 2016
by
andrew morton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make rubocop happy
parent
cf36412a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
formatter.rb
lib/rspec/swagger/formatter.rb
+2
-2
request_builder.rb
lib/rspec/swagger/request_builder.rb
+1
-1
No files found.
lib/rspec/swagger/formatter.rb
View file @
db0a1d45
...
...
@@ -23,7 +23,7 @@ module RSpec
document
=
document_for
(
metadata
[
:swagger_document
])
path_item
=
path_item_for
(
document
,
metadata
[
:swagger_path_item
])
operation
=
operation_for
(
path_item
,
metadata
[
:swagger_operation
])
response
=
response_for
(
operation
,
metadata
[
:swagger_response
])
response_for
(
operation
,
metadata
[
:swagger_response
])
end
def
close
(
_notification
)
...
...
@@ -93,7 +93,7 @@ module RSpec
if
examples
[
"application/json"
].
present?
begin
examples
[
"application/json"
]
=
JSON
.
parse
(
examples
[
"application/json"
])
rescue
JSON
::
ParserError
=>
e
rescue
JSON
::
ParserError
end
end
examples
...
...
lib/rspec/swagger/request_builder.rb
View file @
db0a1d45
...
...
@@ -65,7 +65,7 @@ module RSpec
base_path
=
document
[
:basePath
]
||
''
# Find params in the path and replace them with values defined in
# in the example group.
path
=
base_path
+
metadata
[
:swagger_path_item
][
:path
].
gsub
(
/(\{.*?\})/
)
do
|
match
|
base_path
+
metadata
[
:swagger_path_item
][
:path
].
gsub
(
/(\{.*?\})/
)
do
|
match
|
# QUESTION: Should check that the parameter is actually defined in
# `parameters` before fetch a value?
instance
.
send
(
match
[
1
...-
1
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment