Skip to content
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

display code samples when path has a parameter in it #44

Closed
coderbec opened this issue Nov 25, 2019 · 3 comments
Closed

display code samples when path has a parameter in it #44

coderbec opened this issue Nov 25, 2019 · 3 comments

Comments

@coderbec
Copy link

I have a created a folder that is "v1@messages" which has a post.cs file in it for the csharp code sample, but when I put the get.cs file in there and try to build it produces the following error:

throw Error('Code sample for non-existing operation: "' + path + '",' + verb);

If I move it out of there into it's own folder it produces the same error. I have tried with this folder name:

"v1@messages@{messageId}"
and
"v1@messages@messageId"

What else should I try? Also, this should be updated in the readme for code samples.

@adamaltman
Copy link
Member

Sorry, I didn't see this before.

We are releasing a new version soon where this will be moot.

However, what is the filename for the corresponding path?

@bel0v
Copy link

bel0v commented Jan 21, 2020

I'm getting the same error. I've created a new repo and following the cli steps added an existing spec.yaml and enabled the "splitting" setting. It split the file for me allright, with paths and components folders, but it cannot build or run due to this error ^
The definitions have links in them like this:

$ref: '#/components/schemas/Error'

after a bit of debugging I see that in the thrown error the path equals to '/echo' and the verb is 'post'. operation is undefined.
I haven't yet found out where those come from.

--
Okay, the problem was that there were code_samples generated. I deleted them and everything built.

@RomanHotsiy
Copy link
Member

Closing as stale. Feel free to reopen if this is still an issue.

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

No branches or pull requests

4 participants