Skip to content

Validation errors and warnings are not handled in OAS resolverΒ #562

@ubiuser

Description

@ubiuser

An important use case for having fully resolved OpenAPI specifications is to generate code from them. When the document has validation errors and unresolved references then it is useless for this purpose.

Unfortunately, OpenAPI specs are incomplete for most APIs: hmrc/income-tax-mtd-changelog#318
Even though these public API specs should be fixed in their respective repositories, this service should probably either warn the user about validation errors or not to return incomplete specifications at all.

Parsing and bundling is handled in the fetchOasResolved function, where the construct that holds validation errors and warnings seems to be only logged at info level (see parserResult.getMessages()).

Should handleFailure be called instead of handleSuccess when parserResult.getMessages() != null ?

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