Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0dc267c
Add a mock OpenApiDocument
MaggieKimani1 Oct 12, 2021
0ecca08
Add tests for filtering validation
MaggieKimani1 Oct 12, 2021
2f4a1c8
Add an OpenApi filtering service for filtering an OpenApiDocument bas…
MaggieKimani1 Oct 12, 2021
8e45f8b
Add necessary packages
MaggieKimani1 Oct 12, 2021
f270b90
Simplify using statement and switch condition
MaggieKimani1 Oct 12, 2021
9cda4fb
Use static class reference
MaggieKimani1 Oct 18, 2021
af61c14
Add --filterbyOperationId command option
MaggieKimani1 Oct 18, 2021
d24442d
Add filterByOperationId param and logic
MaggieKimani1 Oct 18, 2021
501e88c
Add static modifier
MaggieKimani1 Oct 18, 2021
d5b1b5e
Clean up and add xml comments
MaggieKimani1 Oct 18, 2021
4016ba1
Add a class that visits the OpenApi operations and returns the search…
MaggieKimani1 Oct 18, 2021
73bef22
Add a search result object model
MaggieKimani1 Oct 18, 2021
a1d46e5
Copies OpenApiOperation references to the new subset document
MaggieKimani1 Oct 18, 2021
b3c79eb
Copy OpenApiInfo and components from the source document to the new s…
MaggieKimani1 Oct 20, 2021
cd5f3fa
Add an info object to the mock document
MaggieKimani1 Oct 20, 2021
3c43ea1
Clean up: Remove unnecessary params
MaggieKimani1 Oct 20, 2021
43f48ec
Remove package reference
MaggieKimani1 Oct 21, 2021
8ba33cd
Revert "Remove package reference"
MaggieKimani1 Oct 21, 2021
2397e9d
Update the Public API interface text file
MaggieKimani1 Oct 26, 2021
d13dcf4
Remove unnecessary package dependency
MaggieKimani1 Oct 26, 2021
00dd9c4
Allow filtering for multiple operationIds
MaggieKimani1 Nov 1, 2021
3f3dae0
Add check for writing to an already existing file
MaggieKimani1 Nov 1, 2021
27ab7f7
Copy over all Info properties
MaggieKimani1 Nov 2, 2021
c3c0abc
Add license header
MaggieKimani1 Nov 2, 2021
dbd8d92
Clean up and add XML documentations for public methods
MaggieKimani1 Nov 2, 2021
a689c36
Copy over extensions object to new document
MaggieKimani1 Nov 2, 2021
deaa2fe
Move declaration closer to first reference point
MaggieKimani1 Nov 3, 2021
015b3cd
Code cleanup
MaggieKimani1 Nov 4, 2021
ac94489
Merge branch 'vnext' into mk/add-filter-commandOption
darrelmiller Nov 5, 2021
d259cc1
Remove [Fact] attribute
MaggieKimani1 Nov 5, 2021
f2102cc
Merge remote-tracking branch 'origin/mk/add-filter-commandOption' int…
MaggieKimani1 Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move declaration closer to first reference point
  • Loading branch information
MaggieKimani1 committed Nov 3, 2021
commit deaa2fed7de2b21464307018ba5af574c5fd7128
4 changes: 1 addition & 3 deletions src/Microsoft.OpenApi.Tool/OpenApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ public static void ProcessOpenApiDocument(
}

var stream = GetStream(input);

OpenApiDocument document;

var result = new OpenApiStreamReader(new OpenApiReaderSettings
{
ReferenceResolution = resolveExternal ? ReferenceResolutionSetting.ResolveAllReferences : ReferenceResolutionSetting.ResolveLocalReferences,
RuleSet = ValidationRuleSet.GetDefaultRuleSet()
}
).ReadAsync(stream).GetAwaiter().GetResult();

OpenApiDocument document;
document = result.OpenApiDocument;

// Check if filter options are provided, then execute
Expand Down