Comments (8)
@eschweitzer-iris interested in submitting a PR to fix it?
from orval.
@melloware I won't be able to get to it for a week or so since we are in a pretty important chunk of work, but one of my co-workers has contributed before so I am interested in helping out. So if no one has solved it in the next week I can put myself in the ring to find a solution.
from orval.
@melloware I was able to setup a good working env this morning. I have it now that I can run the generation process using Intellj's debugger giving me a much better insight into the code itself. This should really accelerate my understanding of the code and therefore finding the solution quicker! The samples are perfect for working off of and in combination of the debugger I should additionally be able to create better test suites now 😄
from orval.
Hey folks,
Experiencing the same issue as the post author, I was able to find a work around for the mean time.
content:
application/json:
schema:
type: object
properties:
allResources:
type: object
properties:
resources:
type: array
items:
type: string
required:
- resources
additionalProperties: true <--- work around
It outputs this which allows me to use additionalProperties.
export type GetResources= {
resources: string[];
[key: string]: any;
}
I believe logic to allow this workaround to work is here:
https://github.com/anymaniax/orval/blob/e7f2e5d3ed401c9dbdbaafa502452447537507d4/packages/core/src/getters/object.ts#L120C2-L123
from orval.
Excellent
from orval.
Hey @melloware, been trying to get familiarized with the repo and a few questions have popped up.
-
What are some of the key files to maybe dig into to get a better understanding about how things are running? I didn't see much documentation in my initial exploration of the code, so any starting points would be great.
-
Are there any examples of what a ContextSpecs should look like beyond the typing? I have a few tests that I am trying to setup to get my development process running and would like to make sure that I have a good knowledge of the inputs of the function.
Continuing to work on this issue, and have started.
from orval.
Not much. I am still newer @anymaniax is the author but I usually just kind of look for places where I think the bug is and work backwards through the code.
from orval.
@eschweitzer-iris let me know if you have any question on the codebase. I am more active on discord
from orval.
Related Issues (20)
- TypeScript: Variable is used before being assigned / Block-scoped variable used before its declaration
- "WARNING: `import.meta` is not available" after updating to 6.24.0 HOT 11
- Support for Svelte Query v5 HOT 1
- Node16 or bundler module resolution causes TS2742 error HOT 1
- Missing import of enum const in generated mock when using split mode HOT 5
- Mock TypeError custom override HOT 7
- Possibility of TS2563 error for mock generation HOT 5
- TS2300 Duplicate identifier: duplicated imports when `mock` enabled HOT 7
- Allow overriding entire handler function in generated MSW handlers, not just response object
- Invalid typescript generation for empty schema HOT 4
- msw generation does not import used models HOT 1
- Mock generation doesn't guarantee the required property mocking
- Is possible ignore the changes in the line of OpenAPI spec version ? HOT 2
- Another duplicate export edge case
- Specify mock property overrides for a specific schema HOT 2
- Support replacing types with custom ones when transforming the input HOT 5
- React Query: Regression in 6.25.0 caused by #1207 HOT 5
- Is possible ignore the changes in the line of OpenAPI spec version ?
- Orval generates wrong import paths in ESM-only package HOT 3
- Pass an additional option object in fetcher function when using custom axios instance HOT 5
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.