Skip to content

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

Closed

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

Activity

  1. added
    type:bugA broken experience
    bug-fix-vNextBug fixes need to be merged into both master and vNext. Use this tag for vNext bug fix PR.
    and removed
    bug-fix-vNextBug fixes need to be merged into both master and vNext. Use this tag for vNext bug fix PR.
    on Nov 6, 2023
  2. MaggieKimani1 commented on Nov 7, 2023

    @MaggieKimani1
    Contributor

    Try lowercasing the --filter-by-tags value to users.user as it appears in the file:

    image

    Same for --filter-by-operationIds ----> users.user.GetUser

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions