-
Notifications
You must be signed in to change notification settings - Fork 63
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
Add documantation for customization of path object #25
Comments
This is something which I also discovered recently while looking closer at the sequelize example: const doc = {
description: 'Operations about Users.',
definitions: {
'UserPaginate': swagger.definition({
attributes: {
data: Sequelize.ARRAY('users')
}
}, {
extends: ['paginate']
})
},
definition: swagger.definition(model),
securities: ['find'],
find: {
parameters: [{
description: 'Get examples by name',
in : 'query',
required: false,
name: 'email',
type: 'string'
}],
responses: {
'200': {
description: 'successful operation',
schema: {
'$ref': '#/definitions/UserPaginate'
}
}
}
}
}; As you see you can define response with |
Oh thats exactly what i need. Thanks @arddor ! Documentation for that feature would be really helpful ;) |
If someone would like to add the documentation (just a quick example or paragraph with an explanation) feel free to edit the README. It'll then just become part of the main docs with the official release. |
If someone can post a basic documentation for this, it will be really helpful. I am currently doing this.
and register it here.
This is the response i am getting. Obviously I am not able to get the doc here. Also I am not able to get the swagger.definition part from above. Where is swagger defined? |
My example using mongoose :
|
This is all configurable by now. Documentation and examples were added with version 1.0.0. |
Currently, I see no way of editing the path object inside the servcie. Only the definitions get parsed.
It would be great to add some information to the path object e.g. to set possible responses.
it could look something like this:
The text was updated successfully, but these errors were encountered: