Comments (6)
The generateEachHttpStatus option allows you to generate each http response
that you define as a schema within OpenAPI
. Does it solve your question?
from orval.
I think this is similar to #1318, do you have any use case outside of when an endpoint returns a oneOf response? The linked pr solves that use case in the next release
from orval.
our use-case is testing of BE services
we can easily reuse faker data for plenty of service code tests and in rare cases where Schema is missing we can always inject required schema to generate faker
Beauty of our situation is that we are attaching Swagger decorators to every key out of the box due to reusable decorators within our code and even internal data structures end up having Swagger schema if needed
but because tests don't think about Request/Response
it would be very weird for back-end developers to use getShoppingCartControllerGetByIdResponseMock
instead of shoppingCartDtoMock
from orval.
Also currently Orval is generating only faker code for Response but many our test cases would benefit from access to request mock
that would allow us to replace huge pile of static test data with generated faker code
from orval.
@karlismelderis-mckinsey
well, i don't think about backend testing. I wanna more understand, so could you show me some sample code for testing ?
from orval.
Let's narrow down the scope for our ask
if Orval can generate faker code to cover Request Schema that will help us to generate data for e2e/black-box tests
anything we need for integration/unit tests we will solve differently not to couple things up to much
from orval.
Related Issues (20)
- Zod: oneOf with regex and string().email() missing 'regex' variable type HOT 1
- ReactQuery: pageParams not inheriting initialPageParam type (always unknown)
- ReactQuery: useQuery not inherit data from select HOT 2
- Zod: preprocess enable except on response? HOT 7
- OpenAPI spec parsing bug HOT 11
- Feature Request: Ability to exit on validation warnings HOT 4
- useCallback not imported when a custom instance is used with tags.
- ErrorType should be providable within the config HOT 1
- Add option for @ts-nocheck for all files in config HOT 1
- MSW: Incorrect Import Generated for Enum in Mock Files HOT 2
- FETCH: Custom headers provided in options are overwritten for POST HOT 7
- Blob in body x-www-form-urlencoded generates a type error
- Inline properties in `AllOf` that is not a ref HOT 4
- Orval default headers for POST override the ones I passed in options.headers HOT 2
- Angular: improve return type of requests to match observed value
- Orval fails to find my custom instance mutator when there's `await import` inside of it
- Documenting debugging within Orval Project
- Axios client generated on one file with function retuning object
- Is there a migration guide to v7? HOT 1
- Out of memory error using zod client HOT 1
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 orval.