orval: Reading property of undefined

After switching to v6.9.0 I’ve faced with an error:

 TypeError: Cannot read properties of undefined (reading 'properties')

for some schemas. Unfortunately there is no ability to run generation in verbose mode to identify where the error is.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

ok I have the error thanks

Nice will take a look and try to do a fix asap

Yeah, I have one and removing it fixes the issue. Discriminator looks like this:

components:
  schemas:
    Shape:
      type: object
      required:
         - name
      properties:
        name:
          $ref: "#/components/schemas/Name"
      discriminator: {
        propertyName: name
        mapping:
          Rectangle: "#/components/schemas/Rectangle"
    
   Rectangle: {
      type: object
      allOf:
        - $ref": "#/components/schemas/Shape"
        - type: object
           properties:
             somePropName:
               type: string

    Name:
      type: string
      readOnly: true

Should be fixed with 6.9.1

I don’t have any issue on my side just that I needed to modify your schema a bit you seem to have a problem with { in your schema no?

no, extra { is not the case. I’ll try to find a way to reproduce this bug

Do you have a schema to reproduce this?

Unfortunately, right now - I’m not 😦