Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ea99575
Add filter by collection parameter and logic
MaggieKimani1 Dec 7, 2021
e2d189c
Add library for json serialization
MaggieKimani1 Dec 7, 2021
4b3722f
Move declaration closer to assignment
MaggieKimani1 Dec 7, 2021
494e59c
Add necessary usings
MaggieKimani1 Dec 7, 2021
4789c87
Add condition that forbids filtering two params at the same time
MaggieKimani1 Dec 7, 2021
03a6b54
Add method for formatting url string to get the query path
MaggieKimani1 Dec 7, 2021
dd1fab6
MaggieKimani1 Dec 7, 2021
00a0545
Create predicate based on the urls from the postman collection
MaggieKimani1 Dec 7, 2021
0cf02d4
Use object initializer
MaggieKimani1 Dec 7, 2021
13b351d
Fix line formatting
MaggieKimani1 Dec 7, 2021
23a8991
Check expression for null
MaggieKimani1 Dec 7, 2021
21c1f20
Move declaration to the outer scope
MaggieKimani1 Dec 7, 2021
1915ae6
Clean up code
MaggieKimani1 Dec 7, 2021
4a940c9
Fix line formatting
MaggieKimani1 Dec 7, 2021
66a032e
Add extra params to predicate function
MaggieKimani1 Dec 14, 2021
ea8ef07
Add extra params to predicate
MaggieKimani1 Dec 14, 2021
bc05c20
Fetch operationTypes and clean urls and pass them to our predicate fu…
MaggieKimani1 Dec 14, 2021
718956f
Use server url to format the incoming request urls from collection
MaggieKimani1 Dec 14, 2021
9570383
Simplify and clean up code
MaggieKimani1 Dec 14, 2021
d1ce642
Move declaration close to assignment; wrap line of code
MaggieKimani1 Dec 14, 2021
fd6d8b0
Remove unnecessary parenthesis
MaggieKimani1 Dec 14, 2021
1dc9bcc
Clean up
MaggieKimani1 Dec 14, 2021
c752fcb
Concat operationType with url and use it for matching in our predicate
MaggieKimani1 Dec 14, 2021
e80e286
Clean up comments
MaggieKimani1 Dec 14, 2021
c96bc16
Add sample postman collections for testing
MaggieKimani1 Dec 14, 2021
f0bfe01
Add server object
MaggieKimani1 Dec 14, 2021
3caa0bf
Add unit tests for slicing based on postman collection
MaggieKimani1 Dec 14, 2021
62d0975
Update public Api text file
MaggieKimani1 Dec 14, 2021
1dd1cd5
Merge branch 'vnext' into mk/filter-by-collection
MaggieKimani1 Dec 14, 2021
8fc8afe
Merge branch 'vnext' into mk/filter-by-collection
darrelmiller Dec 15, 2021
640e7dc
Remove redundant ()
MaggieKimani1 Dec 16, 2021
e555680
Remove trailing backslash
MaggieKimani1 Dec 16, 2021
619350e
Use var for consistency
MaggieKimani1 Dec 16, 2021
b3d040e
Rename predicate args
MaggieKimani1 Dec 16, 2021
0cf947b
Address PR feedback
MaggieKimani1 Dec 17, 2021
71399f6
Code cleanup
MaggieKimani1 Dec 17, 2021
df40781
Update package version
MaggieKimani1 Jan 11, 2022
29d207c
Capitalize postman and add necessary usings
MaggieKimani1 Jan 11, 2022
d0312ac
Move the json document parsing logic to OpenApiService
MaggieKimani1 Jan 11, 2022
bf2d0fe
Only add the available operations types if they are present in the po…
MaggieKimani1 Jan 11, 2022
422cdb2
Add public class access modifier
MaggieKimani1 Jan 14, 2022
7cc3e86
Add project reference and update framework to .net 50
MaggieKimani1 Jan 14, 2022
63b7373
Refactor tests
MaggieKimani1 Jan 14, 2022
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
Add server object
  • Loading branch information
MaggieKimani1 committed Dec 14, 2021
commit f0bfe017fc14e6cc08a1fd536782b52132e09af7
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System.Collections.Generic;
using System.Security.Policy;
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Interfaces;
using Microsoft.OpenApi.Models;
using System.Collections.Generic;

namespace OpenAPIService.Test
namespace Microsoft.OpenApi.Tests.UtilityFiles
{
/// <summary>
/// Mock class that creates a sample OpenAPI document.
Expand All @@ -28,6 +29,13 @@ public static OpenApiDocument CreateOpenApiDocument()
Title = "People",
Version = "v1.0"
},
Servers = new List<OpenApiServer>
{
new OpenApiServer
{
Url = "https://graph.microsoft.com/v1.0"
}
},
Paths = new OpenApiPaths()
{
["/"] = new OpenApiPathItem() // root path
Expand Down Expand Up @@ -723,7 +731,6 @@ public static OpenApiDocument CreateOpenApiDocument()
}
}
};

return document;
}
}
Expand Down