Skip to content

Avoid requiring non-existent fields when using Grape::Entity documentation#673

Merged
dblock merged 1 commit intoruby-grape:masterfrom
qqshfox:patch-3
Jul 5, 2014
Merged

Avoid requiring non-existent fields when using Grape::Entity documentation#673
dblock merged 1 commit intoruby-grape:masterfrom
qqshfox:patch-3

Conversation

@qqshfox
Copy link
Copy Markdown
Contributor

@qqshfox qqshfox commented Jul 4, 2014

When requires :none, except: [:non_existent_field], using: documentation, it may generate the params like this

{
    "paramType": "form",
    "name": "non_existent_field",
    "description": null,
    "type": "String",
    "dataType": "String",
    "required": true
},
{
    "paramType": "path",
    "name": "",
    "description": null,
    "type": "String",
    "dataType": "String",
    "required": true
},
{
    "paramType": "form",
    "name": "required_field",
    "description": null,
    "type": "String",
    "dataType": "String",
    "required": false
}

@dblock
Copy link
Copy Markdown
Member

dblock commented Jul 4, 2014

Thanks. Could you please update CHANGELOG and squash this?

@qqshfox qqshfox changed the title avoid requiring a non-existent field Avoid requiring non-existent fields when using Grape::Entity documentation Jul 4, 2014
@qqshfox
Copy link
Copy Markdown
Contributor Author

qqshfox commented Jul 4, 2014

rebased.

dblock added a commit that referenced this pull request Jul 5, 2014
Avoid requiring non-existent fields when using Grape::Entity documentation
@dblock dblock merged commit 2099c3a into ruby-grape:master Jul 5, 2014
@dblock
Copy link
Copy Markdown
Member

dblock commented Jul 5, 2014

Merged, Thx.

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.

2 participants