theoomoregbee / sails-hook-swagger-generator

A tool to help generate Swagger specification documentation based on OAS 3.0 for Sails APIs
MIT License
78 stars 33 forks source link

Accept custom responses #35 #57

Closed gitnanji closed 4 years ago

gitnanji commented 4 years ago

Accept custom responses.

Example:

'POST /pets': {
        action: 'addPets',
        controller: 'PetController',
        swagger: {
            summary: "Add a new pet",
            description: "Add a new pet.",
            responses: {
                "200": {
                    "description": "successful operation",
                    "schema": {
                        "$ref": "#/definitions/Pet"
                    }
                },
                "400": {
                    "description": "Invalid ID supplied"
                },
                "404": {
                    "description": "Pet not found"
                }
            },
        }
    },
ghost commented 4 years ago

There were the following issues with this Pull Request

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

theoomoregbee commented 4 years ago

https://github.com/theoomoregbee/sails-hook-swagger-generator/issues/35#issuecomment-626355824