File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/Microsoft.OpenApi/MicrosoftExtensions Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ public class OpenApiEnumValuesDescriptionExtension : IOpenApiExtension
4141 public void Write ( IOpenApiWriter writer , OpenApiSpecVersion specVersion )
4242 {
4343 if ( writer is null ) throw new ArgumentNullException ( nameof ( writer ) ) ;
44- if ( specVersion is OpenApiSpecVersion . OpenApi2_0 or OpenApiSpecVersion . OpenApi3_0 &&
45- ! string . IsNullOrEmpty ( EnumName ) &&
44+ if ( ! string . IsNullOrEmpty ( EnumName ) &&
4645 ValuesDescriptions . Any ( ) )
47- { // when we upgrade to 3.1, we don't need to write this extension as JSON schema will support writing enum values
46+ {
4847 writer . WriteStartObject ( ) ;
4948 writer . WriteProperty ( nameof ( Name ) . ToFirstCharacterLowerCase ( ) , EnumName ) ;
5049 writer . WriteProperty ( "modelAsString" , false ) ;
You can’t perform that action at this time.
0 commit comments