@@ -535,45 +535,6 @@ private static string ConvertByteArrayToString(byte[] hash)
535535 return Workspace ? . ResolveReference < IOpenApiReferenceable > ( uriLocation ) ;
536536 }
537537
538- /// <summary>
539- /// Parses a local file path or Url into an Open API document.
540- /// </summary>
541- /// <param name="url"> The path to the OpenAPI file.</param>
542- /// <param name="settings"></param>
543- /// <returns></returns>
544- public static ReadResult Load ( string url , OpenApiReaderSettings ? settings = null )
545- {
546- return OpenApiModelFactory . Load ( url , settings ) ;
547- }
548-
549- /// <summary>
550- /// Reads the stream input and parses it into an Open API document.
551- /// </summary>
552- /// <param name="stream">Stream containing OpenAPI description to parse.</param>
553- /// <param name="format">The OpenAPI format to use during parsing.</param>
554- /// <param name="settings">The OpenApi reader settings.</param>
555- /// <returns></returns>
556- public static ReadResult Load ( Stream stream ,
557- string format ,
558- OpenApiReaderSettings ? settings = null )
559- {
560- return OpenApiModelFactory . Load ( stream , format , settings ) ;
561- }
562-
563- /// <summary>
564- /// Reads the text reader content and parses it into an Open API document.
565- /// </summary>
566- /// <param name="input">TextReader containing OpenAPI description to parse.</param>
567- /// <param name="format"> The OpenAPI format to use during parsing.</param>
568- /// <param name="settings">The OpenApi reader settings.</param>
569- /// <returns></returns>
570- public static ReadResult Load ( TextReader input ,
571- string format ,
572- OpenApiReaderSettings ? settings = null )
573- {
574- return OpenApiModelFactory . Load ( input , format , settings ) ;
575- }
576-
577538 /// <summary>
578539 /// Parses a local file path or Url into an Open API document.
579540 /// </summary>
@@ -589,39 +550,35 @@ public static async Task<ReadResult> LoadAsync(string url, OpenApiReaderSettings
589550 /// Reads the stream input and parses it into an Open API document.
590551 /// </summary>
591552 /// <param name="stream">Stream containing OpenAPI description to parse.</param>
592- /// <param name="format">The OpenAPI format to use during parsing.</param>
593553 /// <param name="settings">The OpenApi reader settings.</param>
594554 /// <param name="cancellationToken">Propagates information about operation cancelling.</param>
595555 /// <returns></returns>
596- public static async Task < ReadResult > LoadAsync ( Stream stream , string format , OpenApiReaderSettings ? settings = null , CancellationToken cancellationToken = default )
556+ public static async Task < ReadResult > LoadAsync ( Stream stream , OpenApiReaderSettings ? settings = null , CancellationToken cancellationToken = default )
597557 {
598- return await OpenApiModelFactory . LoadAsync ( stream , format , settings , cancellationToken ) ;
558+ return await OpenApiModelFactory . LoadAsync ( stream , settings : settings , cancellationToken : cancellationToken ) ;
599559 }
600560
601561 /// <summary>
602562 /// Reads the text reader content and parses it into an Open API document.
603563 /// </summary>
604564 /// <param name="input">TextReader containing OpenAPI description to parse.</param>
605- /// <param name="format"> The OpenAPI format to use during parsing.</param>
606565 /// <param name="settings">The OpenApi reader settings.</param>
607566 /// <returns></returns>
608- public static async Task < ReadResult > LoadAsync ( TextReader input , string format , OpenApiReaderSettings ? settings = null )
567+ public static async Task < ReadResult > LoadAsync ( TextReader input , OpenApiReaderSettings ? settings = null )
609568 {
610- return await OpenApiModelFactory . LoadAsync ( input , format , settings ) ;
569+ return await OpenApiModelFactory . LoadAsync ( input , settings : settings ) ;
611570 }
612571
613572 /// <summary>
614573 /// Parses a string into a <see cref="OpenApiDocument"/> object.
615574 /// </summary>
616575 /// <param name="input"> The string input.</param>
617- /// <param name="format"></param>
618576 /// <param name="settings"></param>
619577 /// <returns></returns>
620- public static ReadResult Parse ( string input ,
621- string ? format = null ,
622- OpenApiReaderSettings ? settings = null )
578+ public static async Task < ReadResult > ParseAsync ( string input ,
579+ OpenApiReaderSettings ? settings = null )
623580 {
624- return OpenApiModelFactory . Parse ( input , format , settings ) ;
581+ return await OpenApiModelFactory . ParseAsync ( input , settings ) ;
625582 }
626583 }
627584
0 commit comments