@@ -64,7 +64,37 @@ public static async Task<OpenApiDocument> FromYamlAsync(string data, string docu
64
64
=> await FromYamlAsync ( new StringReader ( data ) , documentPath , expectedSchemaType , referenceResolverFactory ,
65
65
cancellationToken ) ;
66
66
67
- /// <summary>Creates a Swagger specification from a YAML string.</summary>
67
+ /// <summary>Creates a Swagger specification from a YAML text stream.</summary>
68
+ /// <param name="data">The JSON or YAML data.</param>
69
+ /// <param name="cancellationToken">The cancellation token.</param>
70
+ /// <returns>The <see cref="OpenApiDocument"/>.</returns>
71
+ public static Task < OpenApiDocument > FromYamlAsync ( TextReader data , CancellationToken cancellationToken = default )
72
+ {
73
+ return FromYamlAsync ( data , null , SchemaType . Swagger2 , null , cancellationToken ) ;
74
+ }
75
+
76
+ /// <summary>Creates a Swagger specification from a YAML text stream.</summary>
77
+ /// <param name="data">The JSON or YAML data.</param>
78
+ /// <param name="documentPath">The document path (URL or file path) for resolving relative document references.</param>
79
+ /// <param name="cancellationToken">The cancellation token.</param>
80
+ /// <returns>The <see cref="OpenApiDocument"/>.</returns>
81
+ public static Task < OpenApiDocument > FromYamlAsync ( TextReader data , string documentPath , CancellationToken cancellationToken = default )
82
+ {
83
+ return FromYamlAsync ( data , documentPath , SchemaType . Swagger2 , null , cancellationToken ) ;
84
+ }
85
+
86
+ /// <summary>Creates a Swagger specification from a YAML text stream.</summary>
87
+ /// <param name="data">The JSON or YAML data.</param>
88
+ /// <param name="documentPath">The document path (URL or file path) for resolving relative document references.</param>
89
+ /// <param name="expectedSchemaType">The expected schema type which is used when the type cannot be determined.</param>
90
+ /// <param name="cancellationToken">The cancellation token.</param>
91
+ /// <returns>The <see cref="OpenApiDocument"/>.</returns>
92
+ public static Task < OpenApiDocument > FromYamlAsync ( TextReader data , string documentPath , SchemaType expectedSchemaType , CancellationToken cancellationToken = default )
93
+ {
94
+ return FromYamlAsync ( data , documentPath , expectedSchemaType , null , cancellationToken ) ;
95
+ }
96
+
97
+ /// <summary>Creates a Swagger specification from a YAML text stream.</summary>
68
98
/// <param name="data">The JSON or YAML data as a reader.</param>
69
99
/// <param name="documentPath">The document path (URL or file path) for resolving relative document references.</param>
70
100
/// <param name="expectedSchemaType">The expected schema type which is used when the type cannot be determined.</param>
0 commit comments