Skip to content

Fix a config parsing error message #1047

@mwasilew2

Description

@mwasilew2

When config version parsing fails for both versions, the error message contains a reference to an error object. It references err, but it's always nil and the errors that actually contain useful details are oldErr and newErr. See: https://github.com/deepmap/oapi-codegen/blob/29ebe3262399dbbf9d9ce612757e50cd2ec2862f/cmd/oapi-codegen/oapi-codegen.go#L136-L161

Exposing those details to the user of the oapi-codegen cli would help with troubleshooting issues with the config file.

Example issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions