// Copyright © WireMock.Net using System.Collections.Generic; using System.IO; using WireMock.Admin.Mappings; using WireMock.Net.OpenApiParser.Models; using WireMock.Net.OpenApiParser.Settings; namespace WireMock.Net.OpenApiParser; /// /// Parse a OpenApi/Swagger/V2/V3 or Raml to WireMock MappingModels. /// public interface IWireMockOpenApiParser { /// /// Generate from a file-path. /// /// The path to read the OpenApi/Swagger/V2/V3/V31 or Raml file. /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromFile(string path, out OpenApiDiagnostic diagnostic); /// /// Generate from a file-path. /// /// The path to read the OpenApi/Swagger/V2/V3/V31 or Raml file. /// Additional settings /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromFile(string path, WireMockOpenApiParserSettings settings, out OpenApiDiagnostic diagnostic); /// /// Generate from an Microsoft.OpenApi.Models.OpenApiDocument. /// /// The source OpenApiDocument /// Additional settings [optional] /// MappingModel IReadOnlyList FromDocument(object document, WireMockOpenApiParserSettings? settings = null); /// /// Generate from a . /// /// The source stream /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromStream(Stream stream, out OpenApiDiagnostic diagnostic); /// /// Generate from a . /// /// The source stream /// Additional settings /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromStream(Stream stream, WireMockOpenApiParserSettings settings, out OpenApiDiagnostic diagnostic); /// /// Generate from a . /// /// The source text /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromText(string text, out OpenApiDiagnostic diagnostic); /// /// Generate from a . /// /// The source text /// Additional settings /// OpenApiDiagnostic output /// MappingModel IReadOnlyList FromText(string text, WireMockOpenApiParserSettings settings, out OpenApiDiagnostic diagnostic); }