Generate OpenAPI Document in YAML Format #58234
-
| I am using the .NET 9 RC version of Microsoft.AspNetCore.OpenApi. The default behavior of MapOpenApi seems to generate the OpenAPI document in JSON format. After reviewing the documentation, I couldn't find a way to configure the format to YAML. Is this possible? | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            martincostello
          
      
      
        Oct 4, 2024 
      
    
    Replies: 1 comment 2 replies
-
| There's no built-in ability to generate YAML for OpenAPI in .NET 9. I've added the ability to do so to a library I've been working on if that's useful to you: https://github.com/martincostello/openapi-extensions | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
      Answer selected by
        davidfowl
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
There's no built-in ability to generate YAML for OpenAPI in .NET 9.
I've added the ability to do so to a library I've been working on if that's useful to you: https://github.com/martincostello/openapi-extensions