question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A new parameter 'body' gets added for hash type params

See original GitHub issue

Specs

  • Swagger 2.0
  • Widdershins installation from the branch v3.0

I am using parameters of type hash for our APIs. Swagger generates the JSON as given below

"paths":{"/betaweb/users/sign_in":{"post":{"description":"User Authentication API","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"user[email]","description":"User email","type":"string","required":false},{"in":"formData","name":"user[username]","type":"string","required":false},{"in":"formData","name":"user[password]","description":"User Password","type":"string","required":true}],"responses":{"201":{"description":"Created"},"422":{"description":"Invalid Login Credentials"}},"tags":["users"],"operationId":"User Authentication API"}},

But my Slate Markdown adds a parameter body to my request as below.

screen shot 2017-11-15 at 3 01 41 pm

I couldn’t figure out to remove the body parameter.

And also, the password parameter required is set to true in the Swagger JSON. But the in the documentation, required field for password is set to false

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
arparthasarathicommented, Dec 1, 2017

Thanks a lot for the update Mike!

1reaction
MikeRalphsoncommented, Nov 30, 2017

Widdershins v3.0.0 has just been released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get just GET and POST params as hash in Rails?
Incase you have multiple query* type of parameters you can select them and permit!. Here is a command line explanation
Read more >
ActionController::Parameters - Rails API
This is a list of permitted scalar types that includes the ones supported in XML and JSON requests. This list is in particular...
Read more >
Rails "ActionController::Parameters.to_h" can now receive a ...
ActionController::Parameters.to_h will now receive a block just like Hash#to_h and achieve parity. This gives the ability to customize the ...
Read more >
Handling Parameters - Jumpstart Lab Curriculum - Tutorials
We're passing in a hash of data. This method is preferred because it is shorter to read/write and, more importantly, it doesn't need...
Read more >
Ruby On Rails Tutorial: Controller and Parameters - 2020
The parameters will be cloned and wrapped in the key according to our controller's name by default. The params hash will always contain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found