Skip to content

[Hidi] Unable to slice an OpenApi document using --filter-by-tags or --filter-by-operationIds #1451

@peombwa

Description

@peombwa

Describe the bug
Unable to slice and OpenApi document using --filter-by-tags or --filter-by-operationIds.

To Reproduce
Steps to reproduce the current behavior:

Slicing by --filter-by-tags
➜ hidi transform --openapi "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/default.yaml" --filter-by-tags "users.User" --output "slicedOpenAPI.yml" --clean-output
Slicing by --filter-by-operationids
➜ hidi transform --openapi "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/default.yaml" --filter-by-operationids "users.User.GetUser" --output "slicedOpenAPI.yml" --clean-output

Fail with:

crit: Microsoft.OpenApi.Hidi.Handlers.TransformCommandHandler[0]
      Could not transform the document, reason: No paths found for the supplied parameters.

Expected behavior
A sliced OpenAPI document should be generated based on the provided tags or operationIdsand save it in the designated --output location.

Screenshots/Code Snippets
N/A

Additional context

  • --filter-by-collection works as expected.
Tested using
➜ hidi --version
1.3.2+1bec22207572dc611ea270089cdbd967ecb064c8

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions