-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Hi,
So my API expects a POST request with params in this manner:
The problem is that it has a 'Section' field. You are not actually going to use it, but the fact that is required means that you need to pass a value. And if you do, then it breaks everything. If you edit the HTML using Chrome Inspector and remove that field, then everything works fine.
How can I remove the section field? Maybe the schema I am sending is wrong?
The schema data swagger UI is receiving was generated by grape-swagger, and is this:
{
"apiVersion": "v2",
"swaggerVersion": "1.2",
"resourcePath": "",
"apis": [
{
"path": "/api/v2/eclasses/{eclass_id}/roster/sections.{format}",
"operations": [
{
"produces": [
"application/json"
],
"notes": "",
"summary": "Add section to a class",
"nickname": "POST-api--version-eclasses--eclass_id-roster-sections---format-",
"httpMethod": "POST",
"parameters": [
{
"paramType": "path",
"name": "eclass_id",
"description": "Eclass id",
"type": "Integer",
"dataType": "Integer",
"required": true
},
{
"paramType": "form",
"name": "section",
"description": null,
"type": "Hash",
"dataType": "Hash",
"required": true
},
{
"paramType": "form",
"name": "section[name]",
"description": null,
"type": "String",
"dataType": "String",
"required": true
}
]
}
]
},
],
"basePath": "http://localhost:9292"
}Metadata
Metadata
Assignees
Labels
No labels
