-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[nodejs] Route defined in OpenAPI specification but there is no defined onGET operation #10254
[nodejs] Route defined in OpenAPI specification but there is no defined onGET operation #10254
Comments
Ah! It didn't like my Is this a bug? |
Faced the same issue. |
Hi , I am also encountering the above issue.To rule out issues on my end I tried using the demo OAS3 spec pasted above by @nasht00 . The operatioId does not have any "-" and I see the function with the same name in the controllers directory as the operationId. `'use strict'; var utils = require('../utils/writer.js'); module.exports.getIssue = function getIssue (req, res, next, issueId) { Do you think possibly the node version or any other package version? Although I did try to download to node 10 but still have the same issue. |
@MishaBindra did you get any workaround with your issue |
@bhumikVa-kore , actually the issue in my case seemed to be the package versions . I updated the package.json file to use exact versions and then it worked.I am pasting the dependencies below for which I am using the exact version: "dependencies": { |
@MishaBindra how to determine which package version to use |
@MishaBindra I was able to resolve this issue using the exact versions you mention. Thanks! @bhumikVa-kore suggest, you try setting the versions as pasted in @MishaBindra post above. |
I used the petstore sample ootb and then exported and have not been able to resolve this issue - being my very experience w swagger this is disappointing - i would think their samples would work |
is this problem resolved? I cant seem make it work even with the 3.2.0 version |
hey guys, i know it's been a while. I've been stucked in other issues, anyway. i took a time to check this and the problem is the name used for
@nasht00 |
In my case, the operation id was named this "UnfreezeDoc", so I had to change it to "unfreezeDoc". It should be a camel case. |
Description
I'm using codegen to generate a simple nodejs server. The Swagger UI gets generated just fine.
However if I try to run any of the API, I get
Route defined in OpenAPI specification (/issue/{issueId}) but there is no defined onGET operation.
I've tried both in the swagger ui itself (Try it out), or postman (
http://localhost:8080/issue/123
).Swagger-codegen version
swagger-codegen 3.0.19
Swagger declaration file content or url
I've simplified my api as much as possible for demo purposes.
Command line used for generation
I've tried both using the homebrew version, and the docker version.
Steps to reproduce
In an empty clean directory:
Suggest a fix/enhancement
Is codegen development still active?
The text was updated successfully, but these errors were encountered: