Skip to content

When CSDL filter and http resource supplied for HIDI input, it fails because ApplyFilter expects a local file but not a URL address #1124

@MazZzDaI

Description

@MazZzDaI

When CSDL filter and http resource supplied for HIDI input, it fails because ApplyFilter expects a local file but not a URL address.

Error:
Unhandled exception: System.InvalidOperationException: Could not transform the document, reason: The filename, directory name, or volume label syntax is incorrect. : 'C:\dev\OpenAPI.NET\src\Microsoft.OpenApi.Hidi\bin\Debug\net7.0\https:\share.dudarenko.dev\data\metadata'

To reproduce, start HIDI with the following args:
.\Microsoft.OpenApi.Hidi.exe transform --csdl-filter some-filter-file.txt --csdl https://share.dudarenko.dev/data/metadata
where "https://share.dudarenko.dev/data/metadata" is the link to a CSDL file

Issue appears when both --csdl-filter and --csdl parameters specified.

Problem is in Microsoft.OpenApi.Hidi\OpenApiService.cs\ApplyFilter method. It accepts string, but from the invocation a stream passed.

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