Skip to content

Improve error messages to include an idea where the error occurred #1330

@St0rmdrag0n

Description

@St0rmdrag0n

Is your feature request related to a problem? Please describe.
After upgrading to 0.19.0, I get this error when parsing my OpenAPI 3.0.3 yaml:

TypeError: conversion from UnionIntFloat to Decimal is not supported

I am guessing that it doesn't like some data format in my yaml. However, my yaml is over 9000 lines, and the error gives me no idea what object it was parsing when the error occurred, so I would have to go line by line to try and find it.

Describe the solution you'd like
When an exception is thrown during generation, show the path (such as components/schemas/MyObject/properties/myField) that was being parsed to aid in debugging

Describe alternatives you've considered
I've tried using the --debug flags and I tried taking a best guess at what the problem might be, but we're not having any success.

Additional context
Add any other context or screenshots about the feature request here.
Screenshot 2023-05-22 at 1 14 45 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions