Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

generated retify routes don't contain information for $ref parameters #54

Closed
paul42 opened this issue Jan 7, 2016 · 3 comments
Closed
Milestone

Comments

@paul42
Copy link

paul42 commented Jan 7, 2016

Not a huge deal, but I don't think $ref'd parameters names are coming in... not certain how to get them to be pulled and not certain how swagger sdk works in node?

swagger.json snippet:

"paths": {
        "/churches": {
            "get": {
                "tags": [
                    "church"
                ],
                "summary": "Get all churches",
                "description": "Get a list of all churches based on search parameters",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "$ref": "#/parameters/offsetParam"
                    },
                    {
                        "$ref": "#/parameters/limitParam"
                    }
                ],

routes snippet that were created by yo-swaggerize:

module.exports = {
    /**
     * Get a list of all churches based on search parameters
     * parameters: ,
     * produces: application/json
     */
    get: function (req, res) {
        res.send(501);
    },

I modified the above a bit, so forgive me if it's not a pristine example, but the comments are the interesting part.

I'd love to help out, if you have any pointers on where to drill into I'd love to cut my teeth on a pull request.

Thanks in advance,
Paul

@subeeshcbabu-zz
Copy link
Member

Interesting find. This is where its done if you are up to sending a PR for this - https://github.com/krakenjs/generator-swaggerize/blob/master/app/templates/_handler_restify.js#L10

@paul42
Copy link
Author

paul42 commented Jan 12, 2016

ah dang, forgot to reference this in PR#58

@subeeshcbabu-zz
Copy link
Member

Please check the latest version [email protected]. This should be resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants