Skip to content

Calling OpenApiDocument.Parse without the format parameter should not fail #1951

Description

@darrelmiller

Describe the bug
A clear and concise description of what the bug is.

Code To Reproduce

OpenApiReaderRegistry.RegisterReader("yaml",newOpenApiYamlReader());varstringOpenApiDoc="""openapi: 3.1.0info: title: Sample API version: 1.0.0paths: {}""";varreadResult=OpenApiDocument.Parse(stringOpenApiDoc);

Expected behavior
Document should parse without error.

Screenshots/Code Snippets

Error message returned

OpenAPI document is invalid:
Please provide the correct format, 'o' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions