Skip to content

Inline schema for parameters missing type property #8

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

Closed
skhwang opened this issue Jun 16, 2015 · 0 comments
Closed

Inline schema for parameters missing type property #8

skhwang opened this issue Jun 16, 2015 · 0 comments

Comments

@skhwang
Copy link

skhwang commented Jun 16, 2015

Swagger UI from Swagger.io recently added the support for the inline schema.

Here is the issue:
swagger-api/swagger-ui#1133

and here is the commit that fixed it:
swagger-api/swagger-js@91eff39

I have noticed that the inline schema swagger node generates is missing type property for schema object.

The following inline schema displays "undefined" under Data Type column of Swagger UI's parameter view.

"parameters": [
{
  "name": "body",
  "in": "body",
  "required": false,
  "schema": {
    "properties": {
      "message": {
        "type": "string"
      }
    }
  }
}
]

does not work

The following inline schema displays the model correctly under Data Type column.

"parameters": [
{
  "name": "body",
  "in": "body",
  "required": false,
  "schema": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string"
      }
    }
  }
}
]

works

Based on the fact that the first example works fine in Swagger Editor (http://editor.swagger.io/) but not in Swagger UI, I am a little puzzled whether this type property should be there by the spec though.

codymwalker added a commit to codymwalker/node-red-node-swagger that referenced this issue Jun 18, 2015
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

No branches or pull requests

1 participant