-
Notifications
You must be signed in to change notification settings - Fork 68
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
Seems to not generate good parameter value in a snippet when examples
is used instead of example
#81
Seems to not generate good parameter value in a snippet when examples
is used instead of example
#81
Comments
examples
is used instead of example
for parametersexamples
is used instead of example
Ok, after inspecting your code, looks like the issue is likely upstream (in openapi-sampler perhaps?) |
No, looks like we can address the issue right in this repo: openapi-snippet/openapi-to-har.js Lines 350 to 352 in 2e6c2c9
I'll give it a try. If there is no |
Also need to fix up this method: openapi-snippet/openapi-to-har.js Lines 222 to 242 in 2e6c2c9
|
If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Fix ErikWittern#81
Please consider #86 as a potential solution |
If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Note: The value of the fist entry must have type `string`. If no suitable value is found, then the code snippet will not have a value. Fix ErikWittern#81
If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Note: The value of the fist entry must have type `string`. If no suitable value is found, then the code snippet will not have a value. Fix ErikWittern#81
If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Note: The value of the fist entry must have type `string`. If no suitable value is found, then the code snippet will not have a value. Fix ErikWittern#81
If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Note: The value of the fist entry must have type `string`. If no suitable value is found, then the code snippet will not have a value. Fix ErikWittern#81
This commit does several related things. * consider examples for parameter values If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Fix ErikWittern#81 * implement support for explode for array and object (for simple and form styles only and only for query, path and header parameters) Fix ErikWittern#83 * Fix 3 test scenarios that showed unexploded form parameters when explode should have default to true This was documented in ErikWittern#83 * Resolve $ref nodes for header parameters Fix ErikWittern#84 * Add a full suite of tests for parameters. Only form and simple style were tested as the library seems to have no current support for other styles.
This commit does several related things. * consider examples for parameter values If `example` isn't set for a parameter, then go ahead and check for `examples`. If that is present, then use the value from the first entry as the parameter value. Fix ErikWittern#81 * implement support for explode for array and object (for simple and form styles only and only for query, path and header parameters) Fix ErikWittern#83 * Fix 3 test scenarios that showed unexploded form parameters when explode should have default to true This was documented in ErikWittern#83 * Resolve $ref nodes for header parameters Fix ErikWittern#84 * Add a full suite of tests for parameters. Only form and simple style were tested as the library seems to have no current support for other styles.
We use
examples
in our parameter definitions. But it appears that opneapi-snippet doesn't inspect these and only considers theexample
key when generating values for parameters in a code snippet.I'm not familiar with your code-base but I'll take a look at what it might take to just use
examples[0].value
whenexample
is missing.The text was updated successfully, but these errors were encountered: