-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Bug:
we need to convert V3 swagger to V2 and transform the examples, but examples part in request/responses/components are missing after converting V3 swagger to V2.
v3 swagger file: https://github.com/linkedin-developers/job-posting-development-tools/blob/master/OpenAPI-specification/job_posting_v2.yaml
To Reproduce
Steps to reproduce the current behavior:
- run project Microsoft.OpenApi.Workbench
- copy the content of v3 swagger file and paste it to "input content" area
- choose JSON for Format, choose V2.0 for Version and click button "Convert"
Expected behavior
examples should display in V2 swagger.
Screenshots/Code Snippets
stack trace:
Microsoft.OpenApi.dll!Microsoft.OpenApi.Models.OpenApiDocument.SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) Line 143 C#
Microsoft.OpenApi.dll!Microsoft.OpenApi.Extensions.OpenApiSerializableExtensions.Serialize<Microsoft.OpenApi.Models.OpenApiDocument>(Microsoft.OpenApi.Models.OpenApiDocument element, Microsoft.OpenApi.Writers.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) Line 125 C#
Microsoft.OpenApi.dll!Microsoft.OpenApi.Extensions.OpenApiSerializableExtensions.Serialize<Microsoft.OpenApi.Models.OpenApiDocument>(Microsoft.OpenApi.Models.OpenApiDocument element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, Microsoft.OpenApi.OpenApiFormat format, Microsoft.OpenApi.Writers.OpenApiWriterSettings settings) Line 94 C#
Microsoft.OpenApi.Workbench.dll!Microsoft.OpenApi.Workbench.MainModel.WriteContents(Microsoft.OpenApi.Models.OpenApiDocument document) Line 312 C#
Microsoft.OpenApi.Workbench.dll!Microsoft.OpenApi.Workbench.MainModel.ParseDocument() Line 279 C#
Microsoft.OpenApi.Workbench.dll!Microsoft.OpenApi.Workbench.MainWindow.Button_Click(object sender, System.Windows.RoutedEventArgs e) Line 26 C#

