Skip to content

error: SyntaxError: '=>' expected as a result of empty oneOfs #810

Closed
@deannashih

Description

@deannashih

Hi! Looks like any field with an empty oneOf is causing the script to error out with a syntax error:
error: SyntaxError: '=>' expected

In my specific case, it's

SyntaxError: '=>' expected. (237:16)
  235 |
  236 | };
> 237 | "MetaQuote": ();

In the input file, MetaQuote is defined as:

MetaQuote:
      oneOf: []
      discriminator:
        propertyName: meta_serialization_key
        mapping: {}

Only after I removed all fields with an empty oneOf did the script stop erroring out.

It may be similar to #561, where the fix was made for empty enums.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions