Comments (13)
@soartec-lab You should be able to reproduce here https://github.com/velin-deity/test-mutator
from orval.
OK I marked help wanted. I don't use mutators in my projects but maybe @soartec-lab can answer.
from orval.
I think yours is just a symptom of this: #886
I have a feeling you are using Vite and Vite now assumes ESM incorrectly
from orval.
I am using Vite, indeed. I'm struggling to understand how Vite impacts the work of the Orval CLI tool.
from orval.
Yeah its weird its because Vite assumes all your code and libraries are ESM modules and Orval is not...it is a CJS module right now. I don't quite fully understand the Vite bundler and how it works I have to admit.
from orval.
What I meant is that the warning is issued when running orval --config ./configs/orval.config.ts
. Nothing Vite-related should be getting executed at this stage, so I don't see how the two relate. Is orval transpiling mutator
files? If so, would providing a separate tsconfig help here?
from orval.
@velin-deity any help would be appreciated if you want to track this one down.
from orval.
I do want to solve the issue but I still need help understanding how the CLI works. More importantly, what actually happens when a mutator
is added?
from orval.
oh I just checked I used an Axios Mutator with Vite
and I see the same warning import.meta.env.
as you I just ignore it.
import Axios, { AxiosError, RawAxiosRequestConfig } from "axios";
export const AXIOS_INSTANCE = Axios.create({ baseURL: import.meta.env.REACT_APP_API_SERVER! });
from orval.
Ok, I'll take a look this too.
from orval.
If you don't mind, could you please tell me the minimal files, such as "mutator.ts" and "orval.config.js", that would allow me to reproduce this?
from orval.
Hi, this thread still has the needs_reproducer tag. Is there anything more we can do aside from @velin-deity's previous comment?
from orval.
@deity-jeroen
Thank you. I think it's going to take some time before I can look into this and start taking action.
from orval.
Related Issues (20)
- Wrong exit code on failure HOT 5
- Model filename casing HOT 5
- Range error when using nested $ref in schema.json HOT 2
- MSW: anyOf items using allOf msw mock generation bug HOT 1
- OpenAPI: Support for `const` boolean & integer values
- Orval generates some enums that are used before they are declared HOT 2
- The additionalProperties field in OpenAPI schema makes build fail HOT 3
- Mock: Invalid mocked values when useDates enabled HOT 4
- `allParamsOptional` config option does not work in combination with custom query options mutators
- [website] Search results link to the wrong page
- Content-Type header with application/json should be assumed if there is a request body HOT 2
- MSW: Error using oneOf nested inside allOf HOT 1
- nullable: true generated a bad result with $ref
- Fetch: `multipart/form-data` content type header should not be set in fetch client
- Vue Query: Handling of undefined data
- Vue Query: error ref contains a ref to a Promise HOT 11
- OpenAPI validation appears to not be working HOT 3
- New Client: xior HOT 2
- Orval generated mutation way to add more input vars then from open-api spec required...
- Axios: only generates successful response bodies
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.