Code Monkey home page Code Monkey logo

Comments (8)

melloware avatar melloware commented on May 29, 2024 1

@eschweitzer-iris interested in submitting a PR to fix it?

from orval.

eschweitzer-iris avatar eschweitzer-iris commented on May 29, 2024 1

@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.

eschweitzer-iris avatar eschweitzer-iris commented on May 29, 2024 1

@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.

eschweitzer-iris avatar eschweitzer-iris commented on May 29, 2024

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.

melloware avatar melloware commented on May 29, 2024

Excellent

from orval.

eschweitzer-iris avatar eschweitzer-iris commented on May 29, 2024

Hey @melloware, been trying to get familiarized with the repo and a few questions have popped up.

  1. 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.

  2. 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.

melloware avatar melloware commented on May 29, 2024

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.

anymaniax avatar anymaniax commented on May 29, 2024

@eschweitzer-iris let me know if you have any question on the codebase. I am more active on discord

from orval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.