File tree Expand file tree Collapse file tree 2 files changed +175
-171
lines changed
src/Microsoft.OpenApi/Services Expand file tree Collapse file tree 2 files changed +175
-171
lines changed Original file line number Diff line number Diff line change 33
44namespace Microsoft . OpenApi ;
55/// <summary>
6- /// Defines a policy for matching and transforming OpenAPI JSON Pointer paths
6+ /// Defines a policy for matching and transforming OpenAPI JSON Pointer path segments
77/// between specification versions.
88/// </summary>
99internal interface IOpenApiPathRepresentationPolicy
1010{
1111 /// <summary>
12- /// Determines whether this policy can handle the given path .
12+ /// Attempts to transform the given path segments to the equivalent in the target version .
1313 /// </summary>
14- /// <param name="path">The JSON Pointer path to evaluate.</param>
15- /// <returns><c>true</c> if this policy applies to the given path; otherwise, <c>false</c>.</returns>
16- bool IsMatch ( string path ) ;
17-
18- /// <summary>
19- /// Transforms the given path to its equivalent in the target specification version.
20- /// </summary>
21- /// <param name="path">The JSON Pointer path to transform.</param>
22- /// <returns>The transformed path, or <c>null</c> if the path has no equivalent in the target version.</returns>
23- string ? GetVersionedPath ( string path ) ;
14+ /// <param name="segments">The pre-parsed path segments (without the <c>#/</c> prefix).</param>
15+ /// <param name="result">
16+ /// When this method returns <c>true</c>, contains the transformed path or <c>null</c>
17+ /// if the path has no equivalent in the target version.
18+ /// </param>
19+ /// <returns><c>true</c> if this policy handled the path; <c>false</c> to try the next policy.</returns>
20+ bool TryGetVersionedPath ( string [ ] segments , out string ? result ) ;
2421}
You can’t perform that action at this time.
0 commit comments