Skip to content

Commit 924661c

Browse files
committed
Update tool to parse 3.1 docs
1 parent cb394dc commit 924661c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Microsoft.OpenApi.Workbench/MainModel.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
@@ -11,6 +11,7 @@
1111
using Microsoft.OpenApi.Extensions;
1212
using Microsoft.OpenApi.Models;
1313
using Microsoft.OpenApi.Reader;
14+
using Microsoft.OpenApi.Readers;
1415
using Microsoft.OpenApi.Services;
1516
using Microsoft.OpenApi.Validations;
1617

@@ -158,6 +159,7 @@ public OpenApiSpecVersion Version
158159
_version = value;
159160
OnPropertyChanged(nameof(IsV2_0));
160161
OnPropertyChanged(nameof(IsV3_0));
162+
OnPropertyChanged(nameof(IsV3_1));
161163
}
162164
}
163165

@@ -185,6 +187,12 @@ public bool IsV3_0
185187
set => Version = OpenApiSpecVersion.OpenApi3_0;
186188
}
187189

190+
public bool IsV3_1
191+
{
192+
get => Version == OpenApiSpecVersion.OpenApi3_1;
193+
set => Version = OpenApiSpecVersion.OpenApi3_1;
194+
}
195+
188196
/// <summary>
189197
/// Handling method when the property with given name has changed.
190198
/// </summary>

src/Microsoft.OpenApi.Workbench/MainWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
</StackPanel>
4141
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
4242
<Label>Version:</Label>
43+
<RadioButton GroupName="Format" Content="V3.1.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_1}" />
4344
<RadioButton GroupName="Format" Content="V3.0.1" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV3_0}" />
4445
<RadioButton GroupName="Format" Content="V2.0" Padding="5" Height="24" VerticalAlignment="Top" IsChecked="{Binding IsV2_0}" />
4546
</StackPanel>

0 commit comments

Comments
 (0)