Skip to content

YamlContractConverter throws exception on non SCC DSL Yaml files #1036

@springframeworkguru

Description

@springframeworkguru

Problem:
During build processing, when using alternative contract DSL, such as SCC OpenAPI, if the file does not produce a contract, file is then passed to the YamlContractConverter. Since the file does not conform to the expected YamlContract schema, an exception is thrown in processing, failing the build.

Solution:
Update isAccepted method of YamlContractConverter to parse file. If exceptions are thrown in parsing, log error and return false - thus skipping processing of the file.

I had a email thread with @marcingrzejszczak on this issue. Documenting here, and I will be submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions