Comments (15)
@wouterkroes Yes we can discuss it here or you directly open a pull request
from orval.
@anymaniax No problem, happy to help! 👍
- I think it is faster if you yourself add CLI project feature example code.
- I added some details about the vscode extension on the docs page.
- I updated the text in the docs from the last point.
Pushed all changes to my PR.
from orval.
Done thanks 🎉
from orval.
@anymaniax I would like to help! What is the next step?
from orval.
@wouterkroes Thanks. First could be interesting to check if everything is well explained or if there is a need of adding some information. After that, I would like to add more guides and more examples
from orval.
@anymaniax sure thing! How would you receive the feedback if find something not well explained? Where should I put it, here?
from orval.
@anymaniax Okay, I have read all the documentation and in general I think it looks good! 💯
I have created a PR with small tweaks -> #181
Besides the PR I have some remarks/questions:
- CLI Project feature (https://orval.dev/reference/cli)
I could not find an example of how to use the CLI project feature.
Maybe add an example orval config where project
is used?
- VSCode extension (https://orval.dev/reference/integration)
To me, it unclear what the VSCode Orval extension does?
It is not clearly stated in the VSCode marketplace.
Maybe it is a good idea to promote/explain why to use this extension in the docs
"Generate, valid, cache and mock in your React and Angular applications all with your OpenAPI specification."
It could also be used for Vue or Svelte. So I would recommend making it more general
Something like "Generate, valid, cache, and mock in your frontend applications all with your OpenAPI specification."
from orval.
@wouterkroes awesome job!
- For the first point, it's a good idea.
- For the vscode extension, I need to update the orval version on it first and it's can be used to search for orval config in your opened workspace and run orval without a terminal. Could be a good idea to promote it yes!
- And for the last point, you can add it to your pull request it's a good idea.
Thanks a lot for your help. It's beginning to be difficult to maintain everything me.
from orval.
Thanks! Can I already merge your pull request?
from orval.
Yes, the pull request is ready to go
from orval.
Hi there!
I also would like to help a bit :)
For me it was mutator section was unclear.
- I didn't get what are the properties
name
anddefault
stands for. I had to look through the source code to get it right. I think that example with two mutators is needed to understand thatname
stands for exported mutator function name.default
prop is still a bit confusing for me because mutator isn't defined as a default export function. And I didn't get why the line withdefault
prop is commented?true
is a default value or not? - I'd recommend to switch from CJS to es modules in
orval.config.js
because it's more easy to use and there noimport {defineConfig} from 'orval'
in provided examples. - There three examples of
custom-instance.ts
and it's quite hard to read and detect the difference them. I think 2 examples will be enough there is no need to provide an extra example for an alias prop.
// @ts-ignore
promise.cancel = () => {
source.cancel('Query was cancelled by React Query');
};
is a legacy approach I'd recommend to update this.
from orval.
Any help is welcome. For point 4, I am currently working on it. But for example, svelte query doesn't have that feature yet so I thought about something to handle that case but it will take a bit of time to implement it
from orval.
While upgrading React Query from v3 to v4, I noticed this method of cancellng requests is either removed or deprecated. I say either or as v4 migration guide says it's been removed while the documentation still instructs to use this syntax for older Axios versions.
https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4#the-cancel-method-on-promises-is-no-longer-supported
https://tanstack.com/query/v4/docs/guides/query-cancellation#using-axios-v0220
from orval.
Hello @ristomatti, normally it's removed in v4 and needs to be updated in the doc too
from orval.
@anymaniax Thanks! I've just been trying to figure out if it is or not. I just figured though we have this configuration on a custom instance even though we're generating only Axios requests 🙂.
from orval.
Related Issues (20)
- Using multiple clients HOT 1
- MSW: set the language of faker.js HOT 3
- Fix Enabled Reactivity HOT 4
- Need for better performance HOT 8
- Core: support `writeOnly` to only use property in mutation HOT 3
- Support for wildcard HTTP responses HOT 1
- Get rid of TData generic in axios query function declaration HOT 2
- Orval does not expose the "enabled" query option HOT 5
- Axios: Ability to override individual configuration
- MSW: Enum types should be generated "as const" in mocks HOT 13
- Zod Query Params Validator is unusable with URLSearchParams for booleans/numbers
- Disable minification for output package
- Hangs at 100% CPU usage while generating client code HOT 8
- TanStack Query v5 HOT 13
- Zod: generate wrong validation for type string format date HOT 2
- Refs are not handled in schema properties HOT 2
- Keys of objects being CUIDs (randomly generated each run) HOT 2
- TanStack react query v5 marks `queryKey` as required HOT 17
- Nullable objects are missing ` | null` HOT 3
- SyntaxError: Unexpected token '||=' when running Orval on Linux on Github CI HOT 2
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.