Skip to content

Commit ea52da0

Browse files
committed
Add Documentation for x: in params
1 parent 972d9a8 commit ea52da0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,20 @@ or, for more definitions:
10841084
route_setting :x_def, [{ for: 422, other: 'stuff' }, { for: 200, some: 'stuff' }]
10851085
```
10861086

1087+
- `params` extension, add a `x` key to the `documentation` hash :
1088+
```ruby
1089+
requires :foo, type: String, documentation: { x: { some: 'stuff' } }
1090+
```
1091+
this would generate:
1092+
```json
1093+
{
1094+
"in": "formData",
1095+
"name": "foo",
1096+
"type": "string",
1097+
"required": true,
1098+
"x-some": "stuff"
1099+
}
1100+
```
10871101

10881102
#### Response examples documentation <a name="response-examples"></a>
10891103

0 commit comments

Comments
 (0)