Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet-getdocument support OpenAPI YAML format generation #61041

Open
1 task done
ArturAmpilogov opened this issue Mar 20, 2025 · 1 comment
Open
1 task done

dotnet-getdocument support OpenAPI YAML format generation #61041

ArturAmpilogov opened this issue Mar 20, 2025 · 1 comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-openapi
Milestone

Comments

@ArturAmpilogov
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

dotnet-getdocument is the tool that is used by Microsoft.Extensions.ApiDescription.Server with Microsoft.AspNetCore.OpenApi to generate documentation at build time.

Currently, the tool can generate only JSON OpenAPI spec.
It would be nice to see YAML output as well, which has been commonly used with the Swagger generator.

Describe the solution you'd like

Support a flag to specify output format, for example

<OpenApiGenerateDocumentsOptions>--format yaml</OpenApiGenerateDocumentsOptions>

or similar to dotnet swagger

<OpenApiGenerateDocumentsOptions>--yaml</OpenApiGenerateDocumentsOptions>

Additional context

No response

@martincostello martincostello added area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-openapi and removed area-web-frameworks labels Mar 20, 2025
@captainsafia
Copy link
Member

@ArturAmpilogov Thanks for filing this issue! We're tracking improvements to the build-time generation space via #58353. Specifically, the proposal is to build on top of a new IApiPublisher API to support generation (see #61031).

I can see us achieving this in one of two ways in the new model coming in .NET 10:

  • Registering two publishers openapi-yaml and openapi-json for each format
  • Adding the document format to OpenApiOptions although this might not play well with the YAML endpoint that we previously created

@captainsafia captainsafia added this to the Backlog milestone Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI feature-openapi
Projects
None yet
Development

No branches or pull requests

3 participants