Comments (8)
Hey @cwc-products ! Thanks for the ticket! If I understand the ask here its to have request parameters respect the given example
when available, and use spoofed data when an example
is not available. Please let me know if I am not understanding.
I believe I would extend this to the current implementation to say that the priority would go to data provided via custom-values
, then in-spec examples
, then default to spoofed data.
The custom value option is useful when you want to 1. generate multiple test suites with different data and 2. you don't want to clutter your API spec with potentially large examples. In the example you've provided it might seem like overkill, but I believe it is useful for data injection during generation.
If my understanding/proposal is correct, I can work on it soon, or you can submit a PR if you are interested in contributing. Let me know how you'd like to proceed.
Thanks again for the ticket.
from oatts.
It also looks like from that example that the spoofed path param data isn't URL safe. I will open a separate bug for that!
from oatts.
Hi @noahdietz, thanks for the quick response. It looks like you understand the request correctly. I would love to contribute and given I have time I'll get a feature branch up and running.
Thanks
from oatts.
Awesome! Make sure to take a look at the contributing guidelines for the repo and I look forward to your PR.
from oatts.
Hey @cwc-products just wanted to check in and see if you have any questions on this enhancement.
I've assigned it to you, but if at any point you don't think you'll be able to finish it up, just assign it back to me or comment here and I can pick it up! Thanks again for helping out and contributing!
from oatts.
@noahdietz thanks for checking in, I haven't had a chance to start work on this due to shifting priorities, but I hope to take a look at it this week.
from oatts.
@cwc-products hey checking in! I know that things are busy and I really appreciate your willingness to help & get involved. If you still want to take the issue, I'm happy to support that! But if at any point you'd like to relinquish the issue, that is totally cool 😄 just reassign!
from oatts.
The fix in #25 was released in [email protected]. Please give it a shot.
from oatts.
Related Issues (17)
- Optional parameters are always included HOT 1
- Nullable values are required to not be null HOT 1
- Using uuid format in parametesr HOT 3
- Values in header will not be overwritten when specified in custom values file HOT 1
- spoofed request parameters aren't URL safe HOT 1
- Body is not generated automatically HOT 6
- Nested definitions are not well recognized
- Generate tests for specific set of operations for a particular path HOT 1
- Keep package up-to-date in npm HOT 2
- Json body in request when testing POST HOT 3
- Expose handlebars object to add custom helpers
- Empty request body for openapi 3.0 specs HOT 2
- OAS v3.x.x Support HOT 1
- Oatts throws an error while running mocha command HOT 5
- support for multiple status code entries in custom values generating multiple tests
- replace query string with entire object from custom values HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oatts.