Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9ff9789
Merge pull request #1846 from microsoft/vnext
MaggieKimani1 Sep 30, 2024
b5b11f5
Merge pull request #1860 from microsoft/vnext
irvinesunday Oct 4, 2024
97f8450
Merge pull request #1873 from microsoft/vnext
irvinesunday Oct 14, 2024
8c64b50
Merge pull request #1885 from microsoft/vnext
irvinesunday Oct 22, 2024
3e0a83f
Merge pull request #1898 from microsoft/vnext
irvinesunday Oct 29, 2024
18482f3
Merge pull request #1906 from microsoft/vnext
MaggieKimani1 Nov 6, 2024
d7b19ce
Merge pull request #1908 from microsoft/vnext
MaggieKimani1 Nov 7, 2024
df5d0c7
Merge pull request #1914 from microsoft/vnext
MaggieKimani1 Nov 12, 2024
55352f1
ci: updates main with the latest ci changes
baywet Dec 19, 2024
a3c6c83
fix: removes extraneous download artifact task
baywet Dec 19, 2024
662e9d7
fix: hidi GH release
baywet Dec 19, 2024
1ae06b1
fix: redundant artifact upload
baywet Dec 19, 2024
e521230
Merge pull request #2005 from microsoft/ci/updates-to-main
baywet Dec 19, 2024
166747f
fix: removes actions steps that create extraneous tags
baywet Dec 20, 2024
ff52d83
fix: updates output syntax for tag version
baywet Dec 20, 2024
2fcda79
ci: moves create github release to its own job
baywet Dec 20, 2024
ee99c4d
nit: fixes indent
baywet Dec 20, 2024
2efd4eb
Merge pull request #2017 from microsoft/fix/ci-hidi-gh-upload-to-main
baywet Dec 20, 2024
c3d0c15
Merge pull request #2015 from microsoft/dev
baywet Dec 20, 2024
e7dfa1a
fix: reverts to a regular variable for the tag value
baywet Dec 20, 2024
5a824bb
ci: fix artefacts path
baywet Dec 20, 2024
249ff45
Merge pull request #2021 from microsoft/fix/ci-tag-value-to-main
baywet Dec 20, 2024
cce2495
Merge pull request #2028 from microsoft/dev
baywet Dec 24, 2024
e861c08
fix: removes all obsolete APIs
baywet Jan 2, 2025
e478b75
chore: updates public api document
baywet Jan 2, 2025
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
10 changes: 0 additions & 10 deletions src/Microsoft.OpenApi/Interfaces/IStreamLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT license.

using System;
using System.ComponentModel;
using System.IO;
using System.Threading.Tasks;
using Microsoft.OpenApi.Models;
Expand All @@ -20,14 +19,5 @@ public interface IStreamLoader
/// <param name="uri">Identifier of some source of an OpenAPI Description</param>
/// <returns>A data object that can be processed by a reader to generate an <see cref="OpenApiDocument"/></returns>
Task<Stream> LoadAsync(Uri uri);

/// <summary>
/// Use Uri to locate data and convert into an input object.
/// </summary>
/// <param name="uri"></param>
/// <returns></returns>
[Obsolete("Use the Async overload")]
[EditorBrowsable(EditorBrowsableState.Never)]
Stream Load(Uri uri);
}
}
13 changes: 1 addition & 12 deletions src/Microsoft.OpenApi/Reader/Services/DefaultStreamLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT license.

using System;
using System.ComponentModel;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
Expand All @@ -17,7 +16,7 @@ namespace Microsoft.OpenApi.Reader.Services
public class DefaultStreamLoader : IStreamLoader
{
private readonly Uri baseUrl;
private HttpClient _httpClient = new();
private readonly HttpClient _httpClient = new();

/// <summary>
/// The default stream loader
Expand All @@ -27,16 +26,6 @@ public DefaultStreamLoader(Uri baseUrl)
{
this.baseUrl = baseUrl;
}
/// <inheritdoc/>

[Obsolete]
[EditorBrowsable(EditorBrowsableState.Never)]
public Stream Load(Uri uri)
{
#pragma warning disable VSTHRD002 // Avoid problematic synchronous waits
return LoadAsync(uri).GetAwaiter().GetResult();
#pragma warning restore VSTHRD002 // Avoid problematic synchronous waits
}

/// <summary>
/// Use Uri to locate data and convert into an input object.
Expand Down
10 changes: 0 additions & 10 deletions src/Microsoft.OpenApi/Validations/ValidationRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ public class ValidationRule<T> : ValidationRule
{
private readonly Action<IValidationContext, T> _validate;

/// <summary>
/// Initializes a new instance of the <see cref="ValidationRule"/> class.
/// </summary>
/// <param name="validate">Action to perform the validation.</param>
[Obsolete("Please use the other constructor and specify a name")]
public ValidationRule(Action<IValidationContext, T> validate)
: this (Guid.NewGuid().ToString("D"), validate)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ValidationRule"/> class.
/// </summary>
Expand Down
50 changes: 0 additions & 50 deletions src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,13 @@

namespace Microsoft.OpenApi.Writers
{
/// <summary>
/// Indicates if and when the writer should convert references into complete object renderings
/// </summary>
[Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public enum ReferenceInlineSetting
{
/// <summary>
/// Render all references as $ref.
/// </summary>
DoNotInlineReferences,
/// <summary>
/// Render all local references as inline objects
/// </summary>
InlineLocalReferences,
/// <summary>
/// Render all references as inline objects.
/// </summary>
InlineAllReferences
}

/// <summary>
/// Configuration settings to control how OpenAPI documents are written
/// </summary>
public class OpenApiWriterSettings
{
[Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
private ReferenceInlineSetting referenceInline = ReferenceInlineSetting.DoNotInlineReferences;

internal LoopDetector LoopDetector { get; } = new();
/// <summary>
/// Indicates how references in the source document should be handled.
/// </summary>
[Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public ReferenceInlineSetting ReferenceInline
{
get { return referenceInline; }
set
{
referenceInline = value;
switch (referenceInline)
{
case ReferenceInlineSetting.DoNotInlineReferences:
InlineLocalReferences = false;
InlineExternalReferences = false;
break;
case ReferenceInlineSetting.InlineLocalReferences:
InlineLocalReferences = true;
InlineExternalReferences = false;
break;
case ReferenceInlineSetting.InlineAllReferences:
InlineLocalReferences = true;
InlineExternalReferences = true;
break;
}
}
}
/// <summary>
/// Indicates if local references should be rendered as an inline object
/// </summary>
public bool InlineLocalReferences { get; set; }
Expand Down
15 changes: 0 additions & 15 deletions test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@ namespace Microsoft.OpenApi.Interfaces
}
public interface IStreamLoader
{
[System.Obsolete("Use the Async overload")]
System.IO.Stream Load(System.Uri uri);
System.Threading.Tasks.Task<System.IO.Stream> LoadAsync(System.Uri uri);
}
}
Expand Down Expand Up @@ -1401,8 +1399,6 @@ namespace Microsoft.OpenApi.Reader.Services
public class DefaultStreamLoader : Microsoft.OpenApi.Interfaces.IStreamLoader
{
public DefaultStreamLoader(System.Uri baseUrl) { }
[System.Obsolete]
public System.IO.Stream Load(System.Uri uri) { }
public System.Threading.Tasks.Task<System.IO.Stream> LoadAsync(System.Uri uri) { }
}
}
Expand Down Expand Up @@ -1653,8 +1649,6 @@ namespace Microsoft.OpenApi.Validations
}
public class ValidationRule<T> : Microsoft.OpenApi.Validations.ValidationRule
{
[System.Obsolete("Please use the other constructor and specify a name")]
public ValidationRule(System.Action<Microsoft.OpenApi.Validations.IValidationContext, T> validate) { }
public ValidationRule(string name, System.Action<Microsoft.OpenApi.Validations.IValidationContext, T> validate) { }
}
}
Expand Down Expand Up @@ -1876,8 +1870,6 @@ namespace Microsoft.OpenApi.Writers
public OpenApiWriterSettings() { }
public bool InlineExternalReferences { get; set; }
public bool InlineLocalReferences { get; set; }
[System.Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public Microsoft.OpenApi.Writers.ReferenceInlineSetting ReferenceInline { get; set; }
}
public class OpenApiYamlWriter : Microsoft.OpenApi.Writers.OpenApiWriterBase
{
Expand All @@ -1895,13 +1887,6 @@ namespace Microsoft.OpenApi.Writers
public override void WriteValue(string value) { }
protected override void WriteValueSeparator() { }
}
[System.Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")]
public enum ReferenceInlineSetting
{
DoNotInlineReferences = 0,
InlineLocalReferences = 1,
InlineAllReferences = 2,
}
public sealed class Scope
{
public Scope(Microsoft.OpenApi.Writers.ScopeType type) { }
Expand Down
Loading