-
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
[develop 2.0] nickname generator fails with Path Parts #274
Comments
…ts for auto-generated operationId #274
Quick question, because it relates to OAI/OpenAPI-Specification#29. I want to try and match the swagger-codegen behavior in other projects if possible. I tried to test it out but I'm having trouble figuring out how to run samples on the develop_2.0 branch. It looks like you're generating method names based on the path + http method. So |
looks like we need special handling of this. |
Could this have regressed, possibly? Importing a description with path params but no operationid is causing complaints about unsupported characters. |
@earth2marsh can you please share a sample? |
@earth2marsh - that's because you have a typo there. You use |
Sorry, it looks like I linked to the wrong revision of that spec where I had later added the operationid to test it. :facepalm @webron try this: https://gist.githubusercontent.com/earth2marsh/db8ab2ffcb4895e78d14/raw/0241924f47061a5f6668874651926779a781df9f/apm.json If you bring that into swagger-codegen, then you should see the error as it tries to use the brace char to create the operationId. |
@earth2marsh - do you get errors for a specific language? Just tried running it with the java client generator and didn't get any errors. However, I'm not sure that's the sample you wanted to share because in your original post you mentioned the path params seem to be causing the issue and the sample has no path parameters. |
@webron I'm not sure what happened here—I must have had some wires crossed somewhere. You're totally right that my sample doesn't actually cover the issue I described, and I can't seem to reproduce my original issue. My apologies for the wild goose chase! I'm going to go back to the start again and see if I can make this happen predictably. |
@earth2marsh - no worries, it's better to check on issues that can't be reproduced thanto not be aware of ones that can :) |
When an
operationId
is not specified, the codegen logic makes invalid method names when path params are presentThe text was updated successfully, but these errors were encountered: