Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operations with body and form params should be disallowed #704

Open
gheine opened this issue Nov 22, 2017 · 0 comments
Open

Operations with body and form params should be disallowed #704

gheine opened this issue Nov 22, 2017 · 0 comments

Comments

@gheine
Copy link
Contributor

gheine commented Nov 22, 2017

The request body can either contain a json body or be form encoded. Thus mixing the two should not be possible. Example:

{
  "name": "test",
  "base_url": "http://localhost.com",
  "apidoc": {
    "version": "0.11.48"
  },
  "models": {
    "test": {
      "fields": [
        {
          "name": "id",
          "type": "string"
        }
      ]
    }
  },
  "resources": {
    "test": {
      "operations": [
        {
          "method": "POST",
          "path": "/foo",
          "parameters": [
            {
              "name": "bar",
              "type": "string",
              "location": "form"
            }
          ],
          "body" : {
            "type" : "test"
          },
          "responses": {
            "204": { "type": "unit" }
          }
        }
      ]
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants