Skip to content

Make CreateFilteredDocument filter out unused components #2665

@erwinkramer

Description

@erwinkramer

Is your feature request related to a problem? Please describe.
Currently, the CreateFilteredDocument method doesn't filter out any component that is left over after filtering out operations.

Describe the solution you'd like
FilterDocumentOptions type or something similar that allows me to have a more advanced filtering behavior. Which should have a revamped copy implementation:

private static void CopyReferences(OpenApiDocument target)

Additional context
Try to filter the Graph API spec from https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/refs/heads/master/openapi/v1.0/openapi.yaml with the current implementation to get a clear picture as to why it's an issue. It leaves so many components (particularly the schemas) it's just not practical to use at the moment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions